+modelCDMAppli::modelCDMAppli(const std::string& path, const int& level)
+{
+ this->type = wxDIR_DIRS;
+ this->name = "appli";
+ this->level = level;
+ this->path = path;
+
+
+
+ this->path = CDMUtilities::fixPath(path);
+ //open makelists file
+ std::string pathFixed(CDMUtilities::fixPath(path));
+
+ this->applications.clear();
+ wxDir dir(crea::std2wx((pathFixed).c_str()));
+ if (dir.IsOpened())
+ {
+ wxString fileName;
+ bool cont = dir.GetFirst(&fileName, wxEmptyString, wxDIR_DIRS);
+ while (cont)
+ {
+ std::string stdfileName = crea::wx2std(fileName);
+
+ modelCDMApplication* application = new modelCDMApplication(pathFixed + "/" + stdfileName, this->level + 1);
+ this->applications.push_back(application);
+ this->children.push_back(application);
+
+ cont = dir.GetNext(&fileName);
+ }
+
+ }
+ this->SortChildren();
+}
+