X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FmodelCDMPackageSrc.h;h=84050444d8c04968867f1e9bbcccf098de8d9525;hb=845d7d4510d91df6289b20d2c7e3fa01632edf06;hp=14de2d74a7a8701baba224f8fc3c596b54ad400e;hpb=2c45094f8403883f8fb52c1801f1d96a35a471bf;p=crea.git diff --git a/lib/creaDevManagerLib/modelCDMPackageSrc.h b/lib/creaDevManagerLib/modelCDMPackageSrc.h index 14de2d7..8405044 100644 --- a/lib/creaDevManagerLib/modelCDMPackageSrc.h +++ b/lib/creaDevManagerLib/modelCDMPackageSrc.h @@ -41,18 +41,71 @@ #include "modelCDMFolder.h" #include "modelCDMBlackBox.h" +/** + * Class representing the source folder of a package from a Crea project. + */ class modelCDMPackageSrc : public modelCDMFolder { public: + /** + * Default constructor. + */ modelCDMPackageSrc(); - modelCDMPackageSrc(const std::string& path, const int& level = 3); + /** + * Package source folder node constructor. + * @param parent Parent node of the package source folder. + * @param path Full path to the package source folder. + * @param name Name of the package source folder. + * @param level Project hierarchy level of the package source folder node. + */ + modelCDMPackageSrc(modelCDMIProjectTreeNode* parent, const std::string& path, const std::string& name = "src", const int& level = 3); + /** + * Destructor. + */ ~modelCDMPackageSrc(); + /** + * Retrieves the black boxes inside the package source folder node. + * @return Array of black box references. + */ const std::vector& GetBlackBoxes() const; + /** + * Creates a new black box and returns a reference to it if the creation is successful. This operation affects the project model as well as the system files. + * @param result Result message + * @param name New black box name. + * @param package Black box package name. + * @param type Black box type. + * @param format Black box format. + * @param authors Black box authors' name. + * @param authorsEmail Black box authors' email. + * @param categories Categories associated to this black box. + * @param description Black box description. + * @return True if the operation was successful. + */ + modelCDMBlackBox* CreateBlackBox( + std::string*& result, + const std::string& name, + const std::string& package, + const std::string& type = "std", + const std::string& format = "C++", + const std::string& authors = "unknown", + const std::string& authorsEmail = "", + const std::string& categories = "empty", + const std::string& description = "no description" + ); + + /** + * Refreshes the structure of the package source folder node. This method updates the properties of the package source folder as well as it refreshes its children. + * @param result Result message + * @return True if the operation was successful. + */ virtual const bool Refresh(std::string*& result); private: + /** + * Black box references of the package. + */ std::vector blackBoxes; };