X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FmodelCDMLib.h;h=e372e5f887f9455e7ed3d36e7f09e46f332eca66;hb=58f32bff34779e30ecef47a095f08c96aae6edba;hp=3991384cc589c98dd326fad452b253c0ae13c7d4;hpb=73787c5a26e6b218b9e6c716dafc7d16330441e7;p=crea.git diff --git a/lib/creaDevManagerLib/modelCDMLib.h b/lib/creaDevManagerLib/modelCDMLib.h index 3991384..e372e5f 100644 --- a/lib/creaDevManagerLib/modelCDMLib.h +++ b/lib/creaDevManagerLib/modelCDMLib.h @@ -37,26 +37,68 @@ #include #include +#include #include "modelCDMFolder.h" #include "modelCDMLibrary.h" +/** + * Class representing the lib folder of a Crea project. + */ class modelCDMLib : public modelCDMFolder { public: + /** + * Default Constructor. + */ modelCDMLib(); - modelCDMLib(const std::string& path, const int& level = 1); + /** + * Lib folder node constructor. + * @param parent Parent node of the lib folder node. + * @param path Full path to the lib folder node. + * @param name Name of the lib folder node. By default "lib". + * @param level Project hierarchy level of the lib folder node. + */ + modelCDMLib(modelCDMIProjectTreeNode* parent, const std::string& path, const std::string& name = "lib", const int& level = 1); + /** + * Destructor. + */ ~modelCDMLib(); - modelCDMIProjectTreeNode* CreateLibrary( + /** + * Returns the libraries registered in the lib folder. + * @return Array of library references. + */ + const std::vector& GetLibraries() const; + + /** + * Creates a new library node for the actual project and registers it. It modifies the project model as well as the system. + * @param name Name of the new library. + * @param result Result message. + * @return New library reference. + */ + modelCDMLibrary* CreateLibrary( const std::string& name, - std::string*& result, - const std::string& path = "/" + std::string*& result ); - bool OpenCMakeListsFile(std::string*& result); + + /** + * Refreshes the structure of the lib folder. Deletes folders and files deleted since the las refresh and Adds folders and files created since the las refresh. + * @param result Result message. + * @return True if the operation was successful. + */ virtual const bool Refresh(std::string*& result); + /** + * Checks the file structure and the CMakeLists file to find structure definition errors before compiling the project. + * @param properties Properties of the project. + */ + void CheckStructure(std::map& properties); + private: + /** + * Libraries references. + */ std::vector libraries; };