#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();
+ /**
+ * 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<modelCDMBlackBox*>& 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& 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<modelCDMBlackBox*> blackBoxes;
};