X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FmodelCDMPackageSrc.h;h=84050444d8c04968867f1e9bbcccf098de8d9525;hb=845d7d4510d91df6289b20d2c7e3fa01632edf06;hp=bb799c394b13909c116e90169412b3b1fdde0d84;hpb=311bdcc514f85386f3bbbef9ff6a88bf69fd930f;p=crea.git diff --git a/lib/creaDevManagerLib/modelCDMPackageSrc.h b/lib/creaDevManagerLib/modelCDMPackageSrc.h index bb799c3..8405044 100644 --- a/lib/creaDevManagerLib/modelCDMPackageSrc.h +++ b/lib/creaDevManagerLib/modelCDMPackageSrc.h @@ -41,15 +41,48 @@ #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 std::string& name = "src", 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, @@ -62,9 +95,17 @@ public: 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; };