X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FmodelCDMProject.h;h=c585ea044fc648a895c629b83457f409f4fd45b7;hb=f10df58dfa9c4d8489fe35f57f796bcf37e5f9b4;hp=5df1550a28c11c0fafe6b146472bdba5342a8336;hpb=e6d99bba438e086b10239a42492532ff194edb88;p=crea.git diff --git a/lib/creaDevManagerLib/modelCDMProject.h b/lib/creaDevManagerLib/modelCDMProject.h index 5df1550..c585ea0 100644 --- a/lib/creaDevManagerLib/modelCDMProject.h +++ b/lib/creaDevManagerLib/modelCDMProject.h @@ -44,6 +44,7 @@ #include "modelCDMAppli.h" #include "modelCDMPackage.h" #include "modelCDMCMakeListsFile.h" +#include "modelCDMCodeFile.h" /** * Project model class. @@ -142,7 +143,7 @@ public: //Creations /** - * Creates a package and sets it as a children of the project. This method creates the package in the hard drive and also in the model. + * Creates a package and sets it as a children of the project. This method creates the package in the hard drive and also in the model. The created package is included in the project's CMakeLists file. * @param name Name of the package. * @param result Result of the operation. * @param authors Authors of the operation. If any space is found, it will be replaced by '_'. @@ -200,7 +201,7 @@ public: */ modelCDMIProjectTreeNode* CreateBlackBox( const std::string& name, - const std::string& package = "", //if empty converts into "/bbtk_*projectName*_PKG" + const std::string& package = "", //if empty converts into "[projectName]" const std::string& authors = "unknown", const std::string& authorsEmail = "", const std::string& categories = "empty", @@ -252,6 +253,33 @@ public: */ void CheckStructure(std::map& properties); + /** + * Checks if the given package is included in the CMakeLists file. + * @param package_name Name of the package to check. + * @return True if the package is included, otherwise returns False. + */ + bool IsPackageIncluded(const std::string& package_name); + + /** + * Sets the inclusion of the package in the project's CMakeLists file. If the package inclusion already exist in file, then the line is uncommented/commented depending on the requested action. If the package inclusion doesn't exist yet, then it is included if the request is an inclusion. + * @param package_name Name of the package to include/exclude. + * @param toInclude True if the request is an inclusion, False otherwise. + * @return True if the request was processed successfully. + */ + bool SetPackageInclude(const std::string& package_name, const bool& toInclude); + + /** + * Checks the project folder's CMakeLists file to check which third party libraries are enabled. + * @return A map with the name of the library and if it's included in the CMakeLists file. + */ + std::map Get3rdPartyLibraries(); + + /** + * Sets the 3rd party library inclusion in the CMakeLists file. + * @return if the operation was successful. + */ + bool Set3rdPartyLibrary(const std::string& library_name, const bool& toInclude); + private: