X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=lib%2FcreaDevManagerLib%2FmodelCDMFile.h;h=e1908a3bbc18086206c0921d527cbc3c6d07efb6;hb=741b9c1d03c7984f7ac4a39188e2bb114471f579;hp=a74990a8c51a8931fd62440b4da55562b1622602;hpb=58e994c7ddc088821aa0f583354216c6376405c8;p=crea.git diff --git a/lib/creaDevManagerLib/modelCDMFile.h b/lib/creaDevManagerLib/modelCDMFile.h index a74990a..e1908a3 100644 --- a/lib/creaDevManagerLib/modelCDMFile.h +++ b/lib/creaDevManagerLib/modelCDMFile.h @@ -40,15 +40,48 @@ #include "modelCDMIProjectTreeNode.h" +/** + * Class representing a file node in the project hierarchy. + */ class modelCDMFile : public modelCDMIProjectTreeNode { public: + /** + * Default constructor + */ modelCDMFile(); - modelCDMFile(const std::string& path, const int& level = 3); + /** + * Constructor of the File node class + * @param parent Parent node of the file node. + * @param path Full path to the file node + * @param name File name of the file node. + * @param level Hierarchy level of the file node. By default 3. + */ + modelCDMFile(modelCDMIProjectTreeNode* parent, const std::string& path, const std::string& name, const int& level = 3); + /** + * Destructor + */ ~modelCDMFile(); - bool OpenFile(std::string* & result); + /** + * Opens the file node with the provided command. + * @param result Result message of the operation. + * @param command Command to open the file. + * @return True if the operation was successful. + */ + bool OpenFile(std::string* & result, const std::string& command = ""); + /** + * Refreshes the file properties and checks that the file exists. + * @param result Result message of the operation. + * @return True if the operation was successful. + */ virtual const bool Refresh(std::string*& result); + /** + * Opens the file node in the default file explorer. + * @param result Result message of the operation. + * @return True if the operation was successful. + */ + const bool OpenInFileExplorer(std::string*& result) const; }; #endif /* MODELCDMFILE_H_ */