#include "creaDevManager.h"
IMPLEMENT_APP(wxCreaDevManagerApp)
+CREA_WXMAIN_WITH_CONSOLE
wxCreaDevManagerApp::wxCreaDevManagerApp():wxApp()
{
findstring = argv[2];
replacestring = argv[3];
- ffIn = fopen(fileIn.c_str(),"r");
- if (ffIn){
+ errno_t errorOpen = fopen_s(&ffIn, fileIn.c_str(),"r");
+ if (!errorOpen && ffIn){
while(!feof(ffIn)){
fgets( strTmp , 255, ffIn );
lineStr=strTmp;
if(0 < pathSplit.size())
pathFixed = pathSplit[0];
- for (int i = 1; i < pathSplit.size(); i++)
+ for (int i = 1; i < (int)(pathSplit.size()); i++)
{
pathFixed += CDMUtilities::SLASH + pathSplit[i];
}
std::vector<std::string> words;
splitter::split(words,name," \\/\",.'`",splitter::no_empties);
std::string fixedName = "";
- for (int i = 0; i < words.size(); i++)
+ for (int i = 0; i < (int)(words.size()); i++)
{
fixedName += words[i];
}
std::string applicationName = stdfileName;
//check if application already exist
bool found = false;
- for (int i = 0; !found && i < this->applications.size(); i++)
+ for (int i = 0; !found && i < (int)(this->applications.size()); i++)
{
if (this->applications[i]->GetName() == applicationName)
{
{
//check if folder 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() == stdfileName)
{
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)
{
}
}
- for (int i = 0; i < checkedApplications.size(); i++)
+ for (int i = 0; i < (int)(checkedApplications.size()); i++)
{
if(!checkedApplications[i])
{
i--;
}
}
- for (int i = 0; i < checked.size(); i++)
+ for (int i = 0; i < (int)(checked.size()); i++)
{
if(!checked[i])
{
if(this->CMakeLists != NULL)
{
//set properties parameters based on model
- for (int i = 0; i < this->applications.size(); i++)
+ for (int i = 0; i < (int)(this->applications.size()); i++)
properties["appli add " + this->applications[i]->GetName()] = false;
//open cmakelists
{
word = words[0];
CDMUtilities::splitter::split(words, word, " ", CDMUtilities::splitter::empties_ok);
- for (int i = 0; i < words.size(); i++)
+ for (int i = 0; i < (int)(words.size()); i++)
{
if(words[i].substr(0,2) == "//")
break;
}
//check libraries' structure
- for (int i = 0; i < this->applications.size(); i++)
+ for (int i = 0; i < (int)(this->applications.size()); i++)
{
properties["application " + this->applications[i]->GetName()] = true;
this->applications[i]->CheckStructure(properties);
if(wordBits[0] == "EXE_NAME")
{
word = wordBits[1];
- for (int i = 2; i < wordBits.size(); i++)
+ for (int i = 2; i < (int)(wordBits.size()); i++)
{
word += " " + wordBits[i];
}
std::vector<std::string> words;
CDMUtilities::splitter::split(words, fileName, ", /\\\"", CDMUtilities::splitter::no_empties);
std::string fileNameReal = words[0];
- for (int i = 1; i < words.size(); i++)
+ for (int i = 1; i < (int)(words.size()); i++)
{
fileNameReal += "-" + words[i];
}
if(wordBits[0] == "EXE_NAME")
{
word = wordBits[1];
- for (int i = 2; i < wordBits.size(); i++)
+ for (int i = 2; i < (int)(wordBits.size()); i++)
{
word += " " + wordBits[i];
}
std::string applicationName = stdfileName;
//check if they already exist
bool found = false;
- for (int i = 0; !found && i < this->folders.size(); i++)
+ for (int i = 0; !found && i < (int)(this->folders.size()); i++)
{
if (this->folders[i]->GetName() == applicationName)
{
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)
{
}
}
- for (int i = 0; i < checkedFolders.size(); i++)
+ for (int i = 0; i < (int)(checkedFolders.size()); i++)
{
if(!checkedFolders[i])
{
i--;
}
}
- for (int i = 0; i < checked.size(); i++)
+ for (int i = 0; i < (int)(checked.size()); i++)
{
if(!checked[i])
{
{
word = words[0];
CDMUtilities::splitter::split(words, word, " ", CDMUtilities::splitter::empties_ok);
- for (int i = 0; i < words.size(); i++)
+ for (int i = 0; i < (int)(words.size()); i++)
{
if(words[i].substr(0,2) == "//")
break;
{
if (words[0] == "${EXE_NAME}_LINK_LIBRARIES")
{
- for (int i = 1; i < words.size(); i++)
+ for (int i = 1; i < (int)(words.size()); i++)
{
properties["application " + this->name + " lib " + words[i]] = true;
}
CDMUtilities::splitter::split(words, word, " \t", CDMUtilities::splitter::no_empties);
- for (int i = 0; i < words.size(); i++)
+ for (int i = 0; i < (int)(words.size()); i++)
{
properties["application " + this->name + " dir " + words[i]] = true;
}
std::vector<std::string> words;
CDMUtilities::splitter::split(words, authors, "/\\\"\n", CDMUtilities::splitter::no_empties);
std::string authorsReal = words[0];
- for (int i = 1; i < words.size(); i++)
+ for (int i = 1; i < (int)(words.size()); i++)
{
authorsReal += "," + words[i];
}
std::vector<std::string> words;
CDMUtilities::splitter::split(words, categories, "\"\\/", CDMUtilities::splitter::no_empties);
std::string catsReal = words[0];
- for (int i = 1; i < words.size(); i++)
+ for (int i = 1; i < (int)(words.size()); i++)
{
catsReal += "," + words[i];
}
std::vector<std::string> words;
CDMUtilities::splitter::split(words, description, "\"\n\\/", CDMUtilities::splitter::no_empties);
std::string descReal = words[0];
- for (int i = 1; i < words.size(); i++)
+ for (int i = 1; i < (int)(words.size()); i++)
{
descReal += "-" + words[i];
}
{
this->folders.clear();
this->CMakeLists = NULL;
- for (int i = 0; i < this->children.size(); i++)
+ for (int i = 0; i < (int)(this->children.size()); i++)
{
if(this->children[i] != NULL)
{
std::string stdfileName = crea::wx2std(fileName);
//check if they already exist
bool found = false;
- for (int i = 0; !found && i < this->folders.size(); i++)
+ for (int i = 0; !found && i < (int)(this->folders.size()); i++)
{
if (this->folders[i]->GetName() == stdfileName)
{
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)
{
}
}
- for (int i = 0; i < checkedFolders.size(); i++)
+ for (int i = 0; i < (int)(checkedFolders.size()); i++)
{
if(!checkedFolders[i])
{
i--;
}
}
- for (int i = 0; i < checked.size(); i++)
+ for (int i = 0; i < (int)(checked.size()); i++)
{
if(!checked[i])
{
std::string libraryName = stdfileName;
//check if library already exist
bool found = false;
- for (int i = 0; !found && i < this->libraries.size(); i++)
+ for (int i = 0; !found && i < (int)(this->libraries.size()); i++)
{
if (this->libraries[i]->GetName() == libraryName)
{
{
//check if folder 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() == stdfileName)
{
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)
{
}
}
- for (int i = 0; i < checkedLibraries.size(); i++)
+ for (int i = 0; i < (int)(checkedLibraries.size()); i++)
{
if(!checkedLibraries[i])
{
i--;
}
}
- for (int i = 0; i < checked.size(); i++)
+ for (int i = 0; i < (int)(checked.size()); i++)
{
if(!checked[i])
{
if(this->CMakeLists != NULL)
{
//set properties parameters based on model
- for (int i = 0; i < this->libraries.size(); i++)
+ for (int i = 0; i < (int)(this->libraries.size()); i++)
properties["lib add " + libraries[i]->GetName()] = false;
//open cmakelists
{
word = words[0];
CDMUtilities::splitter::split(words, word, " ", CDMUtilities::splitter::empties_ok);
- for (int i = 0; i < words.size(); i++)
+ for (int i = 0; i < (int)(words.size()); i++)
{
if(words[i].substr(0,2) == "//")
break;
}
//check libraries' structure
- for (int i = 0; i < this->libraries.size(); i++)
+ for (int i = 0; i < (int)(this->libraries.size()); i++)
{
properties["library " + this->libraries[i]->GetName()] = true;
this->libraries[i]->CheckStructure(properties);
if(wordBits[0] == "LIBRARY_NAME")
{
word = wordBits[1];
- for (int i = 2; i < wordBits.size(); i++)
+ for (int i = 2; i < (int)(wordBits.size()); i++)
{
word += " " + wordBits[i];
}
std::vector<std::string> words;
CDMUtilities::splitter::split(words, fileName, ", /\\\"", CDMUtilities::splitter::no_empties);
std::string fileNameReal = words[0];
- for (int i = 1; i < words.size(); i++)
+ for (int i = 1; i < (int)(words.size()); i++)
{
fileNameReal += "-" + words[i];
}
if(wordBits[0] == "LIBRARY_NAME")
{
word = wordBits[1];
- for (int i = 2; i < wordBits.size(); i++)
+ for (int i = 2; i < (int)(wordBits.size()); i++)
{
word += " " + wordBits[i];
}
std::string stdfileName = crea::wx2std(fileName);
//check if they already exist
bool found = false;
- for (int i = 0; !found && i < this->folders.size(); i++)
+ for (int i = 0; !found && i < (int)(this->folders.size()); i++)
{
if (this->folders[i]->GetName() == stdfileName)
{
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)
{
}
}
- for (int i = 0; i < checkedFolders.size(); i++)
+ for (int i = 0; i < (int)(checkedFolders.size()); i++)
{
if(!checkedFolders[i])
{
i--;
}
}
- for (int i = 0; i < checked.size(); i++)
+ for (int i = 0; i < (int)(checked.size()); i++)
{
if(!checked[i])
{
{
word = words[0];
CDMUtilities::splitter::split(words, word, " ", CDMUtilities::splitter::empties_ok);
- for (int i = 0; i < words.size(); i++)
+ for (int i = 0; i < (int)(words.size()); i++)
{
if(words[i].substr(0,2) == "//")
break;
{
if (words[0] == "${LIBRARY_NAME}_LINK_LIBRARIES")
{
- for (int i = 1; i < words.size(); i++)
+ for (int i = 1; i < (int)(words.size()); i++)
{
properties["library " + this->name + " lib " + words[i]] = true;
}
//check if Makefile file exists
std::string pathMakefile = pathFixed + CDMUtilities::SLASH + "Makefile";
- FILE* pFile = fopen(pathMakefile.c_str(), "r");
+ FILE* pFile;
+ errno_t errorOpen = fopen_s(&pFile, pathMakefile.c_str(), "r");
//is the binary folder
- if (pFile != NULL)
+ if (!errorOpen && pFile)
{
fclose(pFile);
std::ifstream readFile;
std::string pathSource = "";
//check if CMakeLists file exists
std::string pathCMakeLists = pathFixed + CDMUtilities::SLASH + "CMakeLists.txt";
- pFile = fopen(pathCMakeLists.c_str(), "r");
+ errorOpen = fopen_s(&pFile, pathCMakeLists.c_str(), "r");
//is the source folder
- if (pFile != NULL)
+ if (!errorOpen && pFile)
{
fclose(pFile);
std::ifstream readFile;
if(wordBits[0] == "BBTK_PACKAGE_NAME")
{
word = wordBits[1];
- for (int i = 2; i < wordBits.size(); i++)
+ for (int i = 2; i < (int)(wordBits.size()); i++)
{
word += " " + wordBits[i];
}
else if(wordBits[0] == "${BBTK_PACKAGE_NAME}_AUTHOR")
{
word = wordBits[1];
- for (int i = 2; i < wordBits.size(); i++)
+ for (int i = 2; i < (int)(wordBits.size()); i++)
{
word += " " + wordBits[i];
}
else if(wordBits[0] == "${BBTK_PACKAGE_NAME}_DESCRIPTION")
{
word = wordBits[1];
- for (int i = 2; i < wordBits.size(); i++)
+ for (int i = 2; i < (int)(wordBits.size()); i++)
{
word += " " + wordBits[i];
}
std::vector<std::string> words;
CDMUtilities::splitter::split(words, authors, ",\n", CDMUtilities::splitter::no_empties);
std::string authorsReal = words[0];
- for (int i = 1; i < words.size(); i++)
+ for (int i = 1; i < (int)(words.size()); i++)
{
authorsReal += "/" + words[i];
}
std::vector<std::string> words;
CDMUtilities::splitter::split(words, description, " \n", CDMUtilities::splitter::no_empties);
std::string descriptionReal = words[0];
- for (int i = 1; i < words.size(); i++)
+ for (int i = 1; i < (int)(words.size()); i++)
{
descriptionReal += " " + words[i];
}
if(wordBits[0] == "BBTK_PACKAGE_NAME")
{
word = wordBits[1];
- for (int i = 2; i < wordBits.size(); i++)
+ for (int i = 2; i < (int)(wordBits.size()); i++)
{
word += " " + wordBits[i];
}
else if(wordBits[0] == "${BBTK_PACKAGE_NAME}_AUTHOR")
{
word = wordBits[1];
- for (int i = 2; i < wordBits.size(); i++)
+ for (int i = 2; i < (int)(wordBits.size()); i++)
{
word += " " + wordBits[i];
}
else if(wordBits[0] == "${BBTK_PACKAGE_NAME}_DESCRIPTION")
{
word = wordBits[1];
- for (int i = 2; i < wordBits.size(); i++)
+ for (int i = 2; i < (int)(wordBits.size()); i++)
{
word += " " + wordBits[i];
}
//check if folder 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() == stdfileName)
{
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)
{
this->src = NULL;
}
- for (int i = 0; i < checked.size(); i++)
+ for (int i = 0; i < (int)(checked.size()); i++)
{
if(!checked[i])
{
{
word = words[0];
CDMUtilities::splitter::split(words, word, " ", CDMUtilities::splitter::empties_ok);
- for (int i = 0; i < words.size(); i++)
+ for (int i = 0; i < (int)(words.size()); i++)
{
if(words[i].substr(0,2) == "//")
break;
}
else if (words[0] == "${BBTK_PACKAGE_NAME}_INCLUDE_DIRS")
{
- for (int i = 1; i < words.size(); i++)
+ for (int i = 1; i < (int)(words.size()); i++)
{
if(words[i].substr(0,2) == "${" || words[i].substr(0,2) == "..")
properties["package " + this->name + " dir " + words[i]] = true;
}
else if (words[0] == "${BBTK_PACKAGE_NAME}_LIBS")
{
- for (int i = 1; i < words.size(); i++)
+ for (int i = 1; i < (int)(words.size()); i++)
{
properties["package " + this->name + " lib " + words[i]] = true;
}
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)
{
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];
}
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];
}
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];
}
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];
}
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];
}
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)
{
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)
{
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)
{
}
}
- for (int i = 0; i < checkedBoxes.size(); i++)
+ for (int i = 0; i < (int)(checkedBoxes.size()); i++)
{
if(!checkedBoxes[i])
{
}
}
- for (int i = 0; i < checked.size(); i++)
+ for (int i = 0; i < (int)(checked.size()); i++)
{
if(!checked[i])
{
CDMUtilities::splitter::split(nameBits, word, " ", CDMUtilities::splitter::no_empties);
this->name = this->nameProject = "";
- for (int i = 0; i < nameBits.size(); i++)
+ for (int i = 0; i < (int)(nameBits.size()); i++)
{
if(i != 0)
this->name += " ";
CDMUtilities::splitter::split(vers, version, " .", CDMUtilities::splitter::no_empties);
time_t now = time(0);
- tm* ltm = localtime(&now);
+
+ tm ltm;
+ localtime_s(<m, &now);
std::stringstream date;
- date << ltm->tm_mday << "/" << 1 + ltm->tm_mon << "/" << 1900 + ltm->tm_year;
+ date << ltm.tm_mday << "/" << 1 + ltm.tm_mon << "/" << 1900 + ltm.tm_year;
//set name of library in CMakeLists inside copied folder
std::string line;
CDMUtilities::splitter::split(words,name," ",CDMUtilities::splitter::no_empties);
std::string nameFixed = "";
- for (int i = 0; i < words.size(); i++)
+ for (int i = 0; i < (int)(words.size()); i++)
{
nameFixed += words[i];
}
words.clear();
CDMUtilities::splitter::split(words,authors," ",CDMUtilities::splitter::no_empties);
std::string authorFixed;
- for (int i = 0; i < words.size(); i++)
+ for (int i = 0; i < (int)(words.size()); i++)
{
authorFixed += words[i];
}
words.clear();
std::string descriptionFixed;
CDMUtilities::splitter::split(words,authorsEmail," ",CDMUtilities::splitter::no_empties);
- for (int i = 0; i < words.size(); i++)
+ for (int i = 0; i < (int)(words.size()); i++)
{
descriptionFixed += words[i];
}
words.clear();
CDMUtilities::splitter::split(words,description," ",CDMUtilities::splitter::no_empties);
- for (int i = 0; i < words.size(); i++)
+ for (int i = 0; i < (int)(words.size()); i++)
{
descriptionFixed += "_" + words[i];
}
CDMUtilities::splitter::split(nameBits, word, " ", CDMUtilities::splitter::no_empties);
this->name = this->nameProject = "";
- for (int i = 0; i < nameBits.size(); i++)
+ for (int i = 0; i < (int)(nameBits.size()); i++)
{
if(i != 0)
this->name += " ";
else if(stdfileName.size() > 9 && stdfileName.substr(0,5) == "bbtk_" && stdfileName.substr(stdfileName.size()-4,4) == "_PKG")
{
bool found = false;
- for (int i = 0; !found && i < this->packages.size(); i++)
+ for (int i = 0; !found && i < (int)(this->packages.size()); i++)
{
if (this->packages[i]->GetName() == stdfileName)
{
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)
{
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)
{
}
}
- for (int i = 0; i < checkedPackages.size(); i++)
+ for (int i = 0; i < (int)(checkedPackages.size()); i++)
{
if(!checkedPackages[i])
{
i--;
}
}
- for (int i = 0; i < checked.size(); i++)
+ for (int i = 0; i < (int)(checked.size()); i++)
{
if(!checked[i])
{
//set properties parameters based on model
properties["project add appli"] = this->appli != NULL;
properties["project add lib"] = this->lib != NULL;
- for (int i = 0; i < this->packages.size(); i++)
+ for (int i = 0; i < (int)(this->packages.size()); i++)
properties["project add " + packages[i]->GetName()] = false;
//open cmakelists
{
word = words[0];
CDMUtilities::splitter::split(words, word, " ", CDMUtilities::splitter::empties_ok);
- for (int i = 0; i < words.size(); i++)
+ for (int i = 0; i < (int)(words.size()); i++)
{
if(words[i].substr(0,2) == "//")
break;
//check lib's structure
this->lib->CheckStructure(properties);
//check packages' structure
- for (int i = 0; i < this->packages.size(); i++)
+ for (int i = 0; i < (int)(this->packages.size()); i++)
{
properties["package " + this->packages[i]->GetName()] = true;
this->packages[i]->CheckStructure(properties);
}
path = "/";
- for (int i = 0; i < breadcrumbs.size()-1; i++)
+ for (int i = 0; i < (int)(breadcrumbs.size())-1; i++)
{
path += breadcrumbs[i] + "/";
}
//Links to return
wxBoxSizer *linksSizer = new wxBoxSizer(wxHORIZONTAL);
std::vector<modelCDMIProjectTreeNode*> parents = this->appli->GetParents();
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
- if (i < parents.size()-1)
+ if (i < (int)(parents.size())-1)
{
linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
}
wxBoxSizer* propertiesPanelSizer = new wxBoxSizer(wxVERTICAL);
std::vector<modelCDMApplication*> applications = this->appli->GetApplications();
- for (int i = 0; i < applications.size(); i++)
+ for (int i = 0; i < (int)(applications.size()); i++)
{
wxHyperlinkCtrl* pApplicationlk = new wxHyperlinkCtrl(propertiesPanel,ID_LINK_SELECT_APPLICATION, crea::std2wx(applications[i]->GetName().c_str()), crea::std2wx(applications[i]->GetName().c_str()));
pApplicationlk->SetWindowStyle(wxALIGN_LEFT);
{
modelCDMApplication* applicationFound = NULL;
std::vector<modelCDMApplication*> applications = this->appli->GetApplications();
- for (int i = 0; i < applications.size(); i++)
+ for (int i = 0; i < (int)(applications.size()); i++)
{
if(applications[i]->GetName() == crea::wx2std(event.GetURL()))
{
std::vector<modelCDMIProjectTreeNode*> parents = this->appli->GetParents();
std::string parentURL = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
//std::cout << parentURL << std::endl;
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
if (parents[i]->GetPath() == parentURL)
{
std::string AppName = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
modelCDMApplication* theApp = NULL;
std::vector<modelCDMApplication*> applications = this->appli->GetApplications();
- for (int i = 0; i < applications.size(); i++)
+ for (int i = 0; i < (int)(applications.size()); i++)
{
if(applications[i]->GetName() == AppName)
{
std::string AppName = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
modelCDMApplication* theApp = NULL;
std::vector<modelCDMApplication*> applications = this->appli->GetApplications();
- for (int i = 0; i < applications.size(); i++)
+ for (int i = 0; i < (int)(applications.size()); i++)
{
if(applications[i]->GetName() == AppName)
{
//Links to return
wxBoxSizer *linksSizer = new wxBoxSizer(wxHORIZONTAL);
std::vector<modelCDMIProjectTreeNode*> parents = this->application->GetParents();
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
- if (i < parents.size()-1)
+ if (i < (int)(parents.size())-1)
{
linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
}
std::vector<modelCDMIProjectTreeNode*> parents = this->application->GetParents();
std::string parentURL = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
//std::cout << parentURL << std::endl;
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
if (parents[i]->GetPath() == parentURL)
{
//Links to return
wxBoxSizer *linksSizer = new wxBoxSizer(wxHORIZONTAL);
std::vector<modelCDMIProjectTreeNode*> parents = this->blackBox->GetParents();
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
- if (i < parents.size()-1)
+ if (i < (int)(parents.size())-1)
{
linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
}
std::vector<modelCDMIProjectTreeNode*> parents = this->blackBox->GetParents();
std::string parentURL = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
//std::cout << parentURL << std::endl;
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
if (parents[i]->GetPath() == parentURL)
{
//Links to return
wxBoxSizer *linksSizer = new wxBoxSizer(wxHORIZONTAL);
std::vector<modelCDMIProjectTreeNode*> parents = this->cMakeLists->GetParents();
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
- if (i < parents.size()-1)
+ if (i < (int)(parents.size())-1)
{
linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
}
std::vector<modelCDMIProjectTreeNode*> parents = this->cMakeLists->GetParents();
std::string parentURL = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
//std::cout << parentURL << std::endl;
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
if (parents[i]->GetPath() == parentURL)
{
//Links to return
wxBoxSizer *linksSizer = new wxBoxSizer(wxHORIZONTAL);
std::vector<modelCDMIProjectTreeNode*> parents = this->file->GetParents();
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
- if (i < parents.size()-1)
+ if (i < (int)(parents.size())-1)
{
linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
}
std::vector<modelCDMIProjectTreeNode*> parents = this->file->GetParents();
std::string parentURL = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
//std::cout << parentURL << std::endl;
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
if (parents[i]->GetPath() == parentURL)
{
//Links to return
wxBoxSizer *linksSizer = new wxBoxSizer(wxHORIZONTAL);
std::vector<modelCDMIProjectTreeNode*> parents = this->folder->GetParents();
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
- if (i < parents.size()-1)
+ if (i < (int)(parents.size())-1)
{
linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
}
std::vector<modelCDMIProjectTreeNode*> parents = this->folder->GetParents();
std::string parentURL = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
//std::cout << parentURL << std::endl;
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
if (parents[i]->GetPath() == parentURL)
{
//Links to return
wxBoxSizer *linksSizer = new wxBoxSizer(wxHORIZONTAL);
std::vector<modelCDMIProjectTreeNode*> parents = this->lib->GetParents();
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
- if (i < parents.size()-1)
+ if (i < (int)(parents.size())-1)
{
linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
}
wxBoxSizer* propertiesPanelSizer = new wxBoxSizer(wxVERTICAL);
std::vector<modelCDMLibrary*> libraries = this->lib->GetLibraries();
- for (int i = 0; i < libraries.size(); i++)
+ for (int i = 0; i < (int)(libraries.size()); i++)
{
wxHyperlinkCtrl* pLibrarylk = new wxHyperlinkCtrl(propertiesPanel, ID_LINK_SELECT_LIBRARY, crea::std2wx(libraries[i]->GetName().c_str()), crea::std2wx(libraries[i]->GetName().c_str()));
pLibrarylk->SetWindowStyle(wxALIGN_LEFT);
{
modelCDMLibrary* theLibrary = NULL;
std::vector<modelCDMLibrary*> libraries = this->lib->GetLibraries();
- for (int i = 0; i < libraries.size(); i++)
+ for (int i = 0; i < (int)(libraries.size()); i++)
{
if(libraries[i]->GetName() == crea::wx2std(event.GetURL()))
{
std::vector<modelCDMIProjectTreeNode*> parents = this->lib->GetParents();
std::string parentURL = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
//std::cout << parentURL << std::endl;
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
if (parents[i]->GetPath() == parentURL)
{
std::string LibName = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
modelCDMLibrary* theLibrary = NULL;
std::vector<modelCDMLibrary*> libraries = this->lib->GetLibraries();
- for (int i = 0; i < libraries.size(); i++)
+ for (int i = 0; i < (int)(libraries.size()); i++)
{
if(libraries[i]->GetName() == LibName)
{
std::string LibName = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
modelCDMLibrary* theLibrary = NULL;
std::vector<modelCDMLibrary*> libraries = this->lib->GetLibraries();
- for (int i = 0; i < libraries.size(); i++)
+ for (int i = 0; i < (int)(libraries.size()); i++)
{
if(libraries[i]->GetName() == LibName)
{
//Links to return
wxBoxSizer *linksSizer = new wxBoxSizer(wxHORIZONTAL);
std::vector<modelCDMIProjectTreeNode*> parents = this->library->GetParents();
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
- if (i < parents.size()-1)
+ if (i < (int)(parents.size())-1)
{
linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
}
std::vector<modelCDMIProjectTreeNode*> parents = this->library->GetParents();
std::string parentURL = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
//std::cout << parentURL << std::endl;
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
if (parents[i]->GetPath() == parentURL)
{
#include "wxCDMMainFrame.h"
#include <iostream>
+#include <sstream>
#include <creaWx.h>
#include "creaSystem.h"
event.Skip();
return;
}
-
- //populate tree control
- tree_Projects->BuildTree(this->model->GetModelElements(),this->model->GetProject());
- tree_Projects->Unselect();
- tree_Projects->SelectItem(this->model->GetProject()->GetId());
-
-
+
//show project actions panel
if(this->panel_ProjectActions != NULL)
{
this->panel_ProjectActions->Destroy();
this->panel_ProjectActions = NULL;
}
-
+
panel_ProjectActions = new wxCDMProjectActionsPanel(
this,
this->model->GetProject(),
wxSize(800,200),
0
);
- panel_ProjectActions->SetMinSize(wxSize(500, 100));
-
-
+
auiManager.AddPane(panel_ProjectActions, wxAuiPaneInfo().Bottom().MinSize(800,50).Name(wxT("panel_ProjectActions")).Caption(wxT("General Project Actions")).BestSize(800,70).CloseButton(false));
-
auiManager.Update();
- //wxMessageBox(_T("New Project created!"),_T("New Project - Success!"), wxOK | wxICON_INFORMATION);
-
+ //populate tree control
+ tree_Projects->BuildTree(this->model->GetModelElements(),this->model->GetProject());
+ tree_Projects->Unselect();
+ tree_Projects->SelectItem(this->model->GetProject()->GetId());
+ wxMessageBox(wxT("ProjectSelected") ,_T("New Project - Success!"),wxOK | wxICON_ERROR);
}
-
- event.Skip();
}
void wxCDMMainFrame::OnMenuOpenProject(wxCommandEvent& event)
{
//populate tree control
tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
tree_Projects->Unselect();
- tree_Projects->SelectItem(this->model->GetProject()->GetId(), true);
+ tree_Projects->SelectItem(this->model->GetProject()->GetId(), true);
//get selected element
wxTreeItemId elementId = event.GetItem();
- if(this->tree_Projects->IsSelected(elementId))
+ if(elementId.IsOk() && this->tree_Projects->IsSelected(elementId))
{
std::cout << "Tree Selection id: " << elementId << std::endl;
//get element from model
modelCDMIProjectTreeNode* element = this->model->GetModelElements()[elementId];
+
if (element == NULL)
return;
std::cout << "Tree Selection: " << element->GetName() << std::endl;
-
+
//TODO get element type
//project
modelCDMProject* elementProject = dynamic_cast<modelCDMProject*>(element);
{
//application
modelCDMApplication* elementApplication = dynamic_cast<modelCDMApplication*>(element);
- if(elementApplication != NULL)
+ if(elementApplication != NULL)
{
//create element description
description = new wxCDMApplicationDescriptionPanel(
//Links to return
wxBoxSizer *linksSizer = new wxBoxSizer(wxHORIZONTAL);
std::vector<modelCDMIProjectTreeNode*> parents = this->package->GetParents();
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
- if (i < parents.size()-1)
+ if (i < (int)(parents.size())-1)
{
linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
}
std::vector<modelCDMBlackBox*> blackBoxes = this->package->GetSrc()->GetBlackBoxes();
- for (int i = 0; i < blackBoxes.size(); i++)
+ for (int i = 0; i < (int)(blackBoxes.size()); i++)
{
if(blackBoxes[i] != NULL)
std::vector<modelCDMIProjectTreeNode*> parents = this->package->GetParents();
std::string parentURL = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
//std::cout << parentURL << std::endl;
- for (int i = 0; i < parents.size(); i++)
+ for (int i = 0; i < (int)(parents.size()); i++)
{
if (parents[i]->GetPath() == parentURL)
{
{
modelCDMBlackBox* bb;
std::vector<modelCDMBlackBox*> bbs = this->package->GetSrc()->GetBlackBoxes();
- for (int i = 0; i < bbs.size(); i++)
+ for (int i = 0; i < (int)(bbs.size()); i++)
{
if(bbs[i]->GetName() == crea::wx2std(event.GetURL()))
{
modelCDMFile* bbHeader = NULL;
std::vector<modelCDMBlackBox*> boxes = this->package->GetSrc()->GetBlackBoxes();
- for (int i = 0; i < boxes.size(); i++)
+ for (int i = 0; i < (int)(boxes.size()); i++)
{
if(boxes[i]->GetName() == BBName)
{
std::string BBName = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
modelCDMFile* bbHeader = NULL;
std::vector<modelCDMBlackBox*> boxes = this->package->GetSrc()->GetBlackBoxes();
- for (int i = 0; i < boxes.size(); i++)
+ for (int i = 0; i < (int)(boxes.size()); i++)
{
if(boxes[i]->GetName() == BBName)
{
wxBoxSizer* propertiesPanelSizer = new wxBoxSizer(wxVERTICAL);
std::vector<modelCDMPackage*> packages = this->project->GetPackages();
- for (int i = 0; i < packages.size(); i++)
+ for (int i = 0; i < (int)(packages.size()); i++)
{
wxHyperlinkCtrl* pPackagelk = new wxHyperlinkCtrl(propertiesPanel,ID_LINK_SELECT_PACKAGE, crea::std2wx(packages[i]->GetName().c_str()), crea::std2wx(packages[i]->GetName().c_str()));
pPackagelk->SetWindowStyle(wxALIGN_LEFT);
{
modelCDMPackage* thePackage = NULL;
std::vector<modelCDMPackage*> packages = this->project->GetPackages();
- for (int i = 0; i < packages.size(); i++)
+ for (int i = 0; i < (int)(packages.size()); i++)
{
if(packages[i]->GetName() == crea::wx2std(event.GetURL()))
{
std::string PkgName = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
modelCDMPackage* thePackage = NULL;
std::vector<modelCDMPackage*> packages = this->project->GetPackages();
- for (int i = 0; i < packages.size(); i++)
+ for (int i = 0; i < (int)(packages.size()); i++)
{
if(packages[i]->GetName() == PkgName)
{
modelCDMPackage* thePackage = NULL;
std::vector<modelCDMPackage*> packages = this->project->GetPackages();
project->GetPackages();
- for (int i = 0; i < packages.size(); i++)
+ for (int i = 0; i < (int)(packages.size()); i++)
{
if(packages[i]->GetName() == PkgName)
{
#include "wxCDMProjectsTreeCtrl.h"
#include <vector>
+#include <sstream>
#include <wx/imaglist.h>
modelElements.clear();
if(projectTree != NULL)
{
- wxTreeItemId rootIndex;
- rootIndex= this-> AddRoot(crea::std2wx(projectTree->GetName()), this->ID_PrIcon, this->ID_PrIcon);
- projectTree->SetId(rootIndex);
- modelElements[rootIndex] = projectTree;
+ projectTree->SetId(this->AddRoot(crea::std2wx(projectTree->GetName()), this->ID_PrIcon));
+
+ modelElements[projectTree->GetId()] = projectTree;
std::cout << "Building TreeCtrl for " << projectTree->GetName() << std::endl;
- this->BuildTree(projectTree->GetChildren(), modelElements, rootIndex);
+ this->BuildTree(projectTree->GetChildren(), modelElements, projectTree->GetId());
- this->Expand(rootIndex);
+ this->Expand(projectTree->GetId());
this->Update();
}
else
{
- wxTreeItemId rootIndex = this-> AddRoot(_("No Open Project"), this->ID_Cicon, this->ID_Cicon);
+ wxTreeItemId rootIndex = this-> AddRoot(_("No Open Project"), this->ID_Cicon);
}
}
-void wxCDMProjectsTreeCtrl::BuildTree(const std::vector<modelCDMIProjectTreeNode*>& treeNodes, std::map< wxTreeItemId, modelCDMIProjectTreeNode* >& modelElements, wxTreeItemId parent)
+void wxCDMProjectsTreeCtrl::BuildTree(const std::vector<modelCDMIProjectTreeNode*>& treeNodes, std::map< wxTreeItemId, modelCDMIProjectTreeNode* >& modelElements, const wxTreeItemId& parent)
{
- for (int i = 0; i < treeNodes.size(); i++)
+ for (int i = 0; i < (int)(treeNodes.size()); i++)
{
//cout << projectsTree[i].GetName() << endl;
- wxTreeItemId parentNodeIndex;
if(treeNodes[i] != NULL)
{
int idIcon = GetIconId(treeNodes[i]);
wxString nodeName((treeNodes[i]->GetName()).c_str(), wxConvUTF8);
- parentNodeIndex = this->AppendItem(parent, nodeName, idIcon, idIcon);
- treeNodes[i]->SetId(parentNodeIndex);
- modelElements[parentNodeIndex] = treeNodes[i];
+ treeNodes[i]->SetId(this->AppendItem(parent, nodeName, idIcon));
+
+ modelElements[treeNodes[i]->GetId()] = treeNodes[i];
std::vector<modelCDMIProjectTreeNode*> innerChildren = treeNodes[i]->GetChildren();
if(innerChildren.size() > 0)
{
- this->BuildTree(innerChildren, modelElements, parentNodeIndex);
+ this->BuildTree(innerChildren, modelElements, treeNodes[i]->GetId());
}
}
* @param modelElements Id->node map.
* @param parent ID of the root node ID.
*/
- void BuildTree(const std::vector<modelCDMIProjectTreeNode*>& tree, std::map< wxTreeItemId, modelCDMIProjectTreeNode* >& modelElements, wxTreeItemId parent);
+ void BuildTree(const std::vector<modelCDMIProjectTreeNode*>& tree, std::map< wxTreeItemId, modelCDMIProjectTreeNode* >& modelElements, const wxTreeItemId& parent);
/**
* Retrieves the icon ID of the given node by its type.
* @param node Node to search its icon.
}
}
- if ((access(pname, 0) == 0))
+ if ((_access(pname, 0) == 0))
return 0; /* file exists, return OK */
/*else name doesn't seem to exist, return FAIL (falls
through) */