X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FmodelCDMPackageSrc.h;h=84050444d8c04968867f1e9bbcccf098de8d9525;hb=35dd4d1ddf73a91d308cc49fc394104169936055;hp=d94afbdd5b0c208788e1286c4d56dfd04c6911db;hpb=cfa883d25e73975f73c20fefc1ec2c947d827938;p=crea.git diff --git a/lib/creaDevManagerLib/modelCDMPackageSrc.h b/lib/creaDevManagerLib/modelCDMPackageSrc.h index d94afbd..8405044 100644 --- a/lib/creaDevManagerLib/modelCDMPackageSrc.h +++ b/lib/creaDevManagerLib/modelCDMPackageSrc.h @@ -41,16 +41,50 @@ #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, const std::string& package, const std::string& type = "std", @@ -61,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; };