X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FmodelCDMBlackBox.h;h=4ef064a698678e442f0925cc1a92470a8803373c;hb=9f11db34cb1acacf545f819d6b552a95835d93bd;hp=127a4d549179ac9204ee41daa0de1ebe34ebff86;hpb=4aa565855cc817ff124ca012e786da1413f645c9;p=crea.git diff --git a/lib/creaDevManagerLib/modelCDMBlackBox.h b/lib/creaDevManagerLib/modelCDMBlackBox.h index 127a4d5..4ef064a 100644 --- a/lib/creaDevManagerLib/modelCDMBlackBox.h +++ b/lib/creaDevManagerLib/modelCDMBlackBox.h @@ -39,35 +39,147 @@ #include"modelCDMFolder.h" +/** + * Class representing a black box inside a Crea project. A black box is modular construct that uses the project libraries to execute its operations + */ class modelCDMBlackBox : public modelCDMFolder { public: + /** + * Default Constructor. + */ modelCDMBlackBox(); - modelCDMBlackBox(const std::string& hName, const std::string& path, const int& level = 1); + /** + * Black Box Constructor. + * @param parent parent node of the black box node. + * @param path Path of the source folder of the black box node. + * @param name Name of the black box node. + * @param level Hierarchy level of the black box node in the project. By default 3 + */ + modelCDMBlackBox(modelCDMIProjectTreeNode* parent, const std::string& path, const std::string& name, const int& level = 3); + /** + * Destructor. + */ ~modelCDMBlackBox(); + /** + * Returns the name of the black box node. + * @return Name of the black box node. + */ const std::string& GetNameBlackBox() const; + /** + * Retrieves the black box authors' names. + * @return Names of the black box node authors. + */ const std::string& GetAuthors() const; - const std::string& GetAuthorsEmail() const; + /** + * Retrieves the categories of the black box. + * @return Categories associated with the black box. + */ const std::string& GetCategories() const; + /** + * Returns the description of the black box purpose. + * @return Description of the black box. + */ const std::string& GetDescription() const; + /** + * Returns a reference of the header file of the black box. + * @return Header file of the black box. + */ + modelCDMFile* GetHeaderFile() const; + /** + * Returns a reference of the source file of the black box. + * @return Source file of the black box. + */ + modelCDMFile* GetSourceFile() const; + + /** + * Sets the name of the black box with the one provided. + * @param name New name of the black box. + * @param result Result message. + * @return True if the operation was successful. + */ + bool SetNameBlackBox(const std::string& name, std::string*& result); + /** + * Sets the authors' names of the black box to the ones given. + * @param authors Authors' names. + * @param result Result message. + * @return True if the operation was successful. + */ bool SetAuthors(const std::string& authors, std::string*& result); - bool SetAuthorsEmail(const std::string& email, std::string*& result); - bool SetCategories(const std::string& version, std::string*& result); + /** + * Sets the Categories associated with the black box to the given ones. + * @param categories Categories associated with the black box. + * @param result Result message + * @return True if the operation was successful. + */ + bool SetCategories(const std::string& categories, std::string*& result); + /** + * Sets the Description of the black box to the given one. + * @param description Description of the black box. + * @param result Result message. + * @return True if the operation was successful. + */ bool SetDescription(const std::string& description, std::string*& result); + /** + * Sets the reference of the header file. + * @param file Reference to the Header file. + */ + void SetHeaderFile(modelCDMFile* file); + /** + * Sets the reference of the source file. + * @param file Reference to the source file. + */ + void SetSourceFile(modelCDMFile* file); + + /** + * Opens the source file with the system default code editor + * @param result Result message. + * @return True if the operation was successful. + */ bool OpenCxx(std::string*& result); + /** + * Opens the header file with the system default code editor + * @param result Result message. + * @return True if the operation was successful. + */ bool OpenHxx(std::string*& result); + /** + * Refreshes the structure and properties of the black box. + * @param result Result message. + * @return True if the operation was successful. + */ const bool Refresh(std::string*& result); private: + /** + * Name of the black box. It might be different from the header file name. + */ std::string nameBlackBox; + /** + * Authors of the black box. + */ std::string authors; - std::string authorsEmail; + /** + * Categories associated to the categories. + */ std::string categories; + /** + * Description of the black box. + */ std::string description; + + /** + * Reference to the header file of the black box. + */ + modelCDMFile* header; + /** + * Reference to the source file of the black box. + */ + modelCDMFile* source; }; #endif /* MODELCDMBLACKBOX_H_ */