]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/modelCDMPackage.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / modelCDMPackage.cpp
index a2ee6c8669d8e7b7f1f890e3c33e24990e758b56..cd24c04f04b8df0e69bc3f90c22e9a9dcd1a6b41 100644 (file)
@@ -48,6 +48,7 @@ modelCDMPackage::modelCDMPackage()
 
 modelCDMPackage::modelCDMPackage(const std::string& path, const std::string& name, const int& level)
 {
+  std::cout << "creating package: " + path + "\n";
   this->type = wxDIR_DIRS;
   this->name = name;
   //Get Package Name
@@ -351,22 +352,22 @@ bool modelCDMPackage::SetDescription(const std::string& description, std::string
 }
 
 modelCDMBlackBox* modelCDMPackage::CreateBlackBox(
+    std::string*& result,
     const std::string& name,
     const std::string& type,
     const std::string& format,
+    const std::string& categories,
     const std::string& authors,
     const std::string& authorsEmail,
-    const std::string& categories,
     const std::string& description
 )
 {
-  //TODO: implement method
-  return NULL;
+  return this->src->CreateBlackBox(result,name, this->namePackage, type,format,categories,authors,authorsEmail,description);
 }
 
 const bool modelCDMPackage::Refresh(std::string*& result)
 {
-  std::cout << "refreshing package" << std::endl;
+  std::cout << "refreshing package " << this->namePackage << std::endl;
   this->type = wxDIR_DIRS;
 
   //Get Package Name
@@ -481,7 +482,7 @@ const bool modelCDMPackage::Refresh(std::string*& result)
 
               //check if folder already exist
               bool found = false;
-              for (int i = 0;!found && i < this->children.size(); i++)
+              for (int i = 0; !found && i < this->children.size(); i++)
                 {
                   if (this->children[i]->GetName() == stdfileName)
                     {
@@ -526,7 +527,7 @@ const bool modelCDMPackage::Refresh(std::string*& result)
           else
             {
               bool found = false;
-              for (int i = 0; i <!found && this->children.size(); i++)
+              for (int i = 0; !found && i < this->children.size(); i++)
                 {
                   if (this->children[i]->GetName() == stdfileName)
                     {