2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
10 # This software is governed by the CeCILL-B license under French law and
11 # abiding by the rules of distribution of free software. You can use,
12 # modify and/ or redistribute the software under the terms of the CeCILL-B
13 # license as circulated by CEA, CNRS and INRIA at the following URL
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 # or in the file LICENSE.txt.
17 # As a counterpart to the access to the source code and rights to copy,
18 # modify and redistribute granted by the license, users are provided only
19 # with a limited warranty and the software's author, the holder of the
20 # economic rights, and the successive licensors have only limited
23 # The fact that you are presently reading this means that you have had
24 # knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------
29 * modelCDMPackageSrc.h
31 * Created on: Dic 19, 2012
32 * Author: Daniel Felipe Gonzalez Obando
35 #ifndef MODELCDMPACKAGESRC_H_
36 #define MODELCDMPACKAGESRC_H_
41 #include "modelCDMFolder.h"
42 #include "modelCDMBlackBox.h"
45 * Class representing the source folder of a package from a Crea project.
47 class modelCDMPackageSrc : public modelCDMFolder
51 * Default constructor.
55 * Package source folder node constructor.
56 * @param parent Parent node of the package source folder.
57 * @param path Full path to the package source folder.
58 * @param name Name of the package source folder.
59 * @param level Project hierarchy level of the package source folder node.
61 modelCDMPackageSrc(modelCDMIProjectTreeNode* parent, const std::string& path, const std::string& name = "src", const int& level = 3);
65 ~modelCDMPackageSrc();
68 * Retrieves the black boxes inside the package source folder node.
69 * @return Array of black box references.
71 const std::vector<modelCDMBlackBox*>& GetBlackBoxes() const;
74 * 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.
75 * @param result Result message
76 * @param name New black box name.
77 * @param package Black box package name.
78 * @param type Black box type.
79 * @param format Black box format.
80 * @param authors Black box authors' name.
81 * @param authorsEmail Black box authors' email.
82 * @param categories Categories associated to this black box.
83 * @param description Black box description.
84 * @return True if the operation was successful.
86 modelCDMBlackBox* CreateBlackBox(
88 const std::string& name,
89 const std::string& package,
90 const std::string& type = "std",
91 const std::string& format = "C++",
92 const std::string& authors = "unknown",
93 const std::string& authorsEmail = "",
94 const std::string& categories = "empty",
95 const std::string& description = "no description"
99 * 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.
100 * @param result Result message
101 * @return True if the operation was successful.
103 virtual const bool Refresh(std::string*& result);
107 * Black box references of the package.
109 std::vector<modelCDMBlackBox*> blackBoxes;
113 #endif /* MODELCDMPACKAGESRC_H_ */