]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/modelCDMPackageSrc.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / modelCDMPackageSrc.cpp
index a5f3080c40ec171b0e5bf4337a6507c6073e0097..529bfe2c32b40f39313b5063982b943e4d0d6f77 100644 (file)
@@ -116,7 +116,7 @@ modelCDMPackageSrc::modelCDMPackageSrc(modelCDMIProjectTreeNode* parent, const s
 
 modelCDMPackageSrc::~modelCDMPackageSrc()
 {
-  for (int i = 0; i < this->blackBoxes.size(); i++)
+  for (int i = 0; i < (int)(this->blackBoxes.size()); i++)
     {
       if(this->blackBoxes[i] != NULL)
         {
@@ -147,7 +147,7 @@ modelCDMBlackBox* modelCDMPackageSrc::CreateBlackBox(
   std::vector<std::string> words;
   CDMUtilities::splitter::split(words, name, " \n\",/\\'", CDMUtilities::splitter::no_empties);
   std::string bbName;
-  for (int i = 0; i < words.size(); i++)
+  for (int i = 0; i < (int)(words.size()); i++)
     {
       bbName += words[i];
     }
@@ -158,7 +158,7 @@ modelCDMBlackBox* modelCDMPackageSrc::CreateBlackBox(
   if(words.size() > 0)
     {
       bbCategories = words[0];
-      for (int i = 1; i < words.size(); i++)
+      for (int i = 1; i < (int)(words.size()); i++)
         {
           bbCategories += "," + words[i];
         }
@@ -172,7 +172,7 @@ modelCDMBlackBox* modelCDMPackageSrc::CreateBlackBox(
   if(words.size() > 0)
     {
       bbAuthors = words[0];
-      for (int i = 1; i < words.size(); i++)
+      for (int i = 1; i < (int)(words.size()); i++)
         {
           bbAuthors += "," + words[i];
         }
@@ -186,7 +186,7 @@ modelCDMBlackBox* modelCDMPackageSrc::CreateBlackBox(
   if(words.size() > 0)
     {
       bbDescription = words[0];
-      for (int i = 1; i < words.size(); i++)
+      for (int i = 1; i < (int)(words.size()); i++)
         {
           bbDescription += "," + words[i];
         }
@@ -196,7 +196,7 @@ modelCDMBlackBox* modelCDMPackageSrc::CreateBlackBox(
   if(words.size() > 0)
     {
       bbDescription += words[0];
-      for (int i = 1; i < words.size(); i++)
+      for (int i = 1; i < (int)(words.size()); i++)
         {
           bbDescription += words[i];
         }
@@ -209,15 +209,23 @@ modelCDMBlackBox* modelCDMPackageSrc::CreateBlackBox(
   //create command
   std::string command = "bbCreateBlackBox";
   command += " \"" + this->path + "\"";
+#ifdef _WIN32
+  command += " " + package;
+  command += " " + bbName;
+  command += " " + type;
+  command += " " + format;
+#else
   command += " \"" + package + "\"";
   command += " \"" + bbName + "\"";
   command += " \"" + type + "\"";
   command += " \"" + format + "\"";
+#endif
   command += " \"" + bbAuthors + "\"";
   command += " \"" + bbDescription + "\"";
   command += " \"" + bbCategories + "\"";
 
   //excecute command
+  //wxMessageBox(crea::std2wx("Command: ->" + command + "<-"),_T("Creating Black Box"),wxOK | wxICON_INFORMATION);
   if(system(command.c_str()))
     {
       result = new std::string("Error executing command '" + command + "'");
@@ -297,7 +305,7 @@ const bool modelCDMPackageSrc::Refresh(std::string*& result)
           std::string folderName = stdfileName;
           //check if they already exist
           bool found = false;
-          for (int i = 0; !found && i < this->children.size(); i++)
+          for (int i = 0; !found && i < (int)(this->children.size()); i++)
             {
               if (this->children[i]->GetName() == folderName)
                 {
@@ -340,7 +348,7 @@ const bool modelCDMPackageSrc::Refresh(std::string*& result)
           else
             {
               bool found = false;
-              for (int i = 0; !found && i < this->children.size(); i++)
+              for (int i = 0; !found && i < (int)(this->children.size()); i++)
                 {
                   if (this->children[i]->GetName() == stdfileName)
                     {
@@ -362,7 +370,7 @@ const bool modelCDMPackageSrc::Refresh(std::string*& result)
           if(stdfileName.substr(stdfileName.size() - 2, 2) == ".h" && stdfileName.substr(0,2) == "bb")
             {
               bool found = false;
-              for (int i = 0; i < this->blackBoxes.size(); i++)
+              for (int i = 0; i < (int)(this->blackBoxes.size()); i++)
                 {
                   if(this->blackBoxes[i]->GetHeaderFile()->GetName() == stdfileName)
                     {
@@ -386,7 +394,7 @@ const bool modelCDMPackageSrc::Refresh(std::string*& result)
         }
     }
 
-  for (int i = 0; i < checkedBoxes.size(); i++)
+  for (int i = 0; i < (int)(checkedBoxes.size()); i++)
     {
       if(!checkedBoxes[i])
         {
@@ -397,7 +405,7 @@ const bool modelCDMPackageSrc::Refresh(std::string*& result)
         }
     }
 
-  for (int i = 0; i < checked.size(); i++)
+  for (int i = 0; i < (int)(checked.size()); i++)
     {
       if(!checked[i])
         {