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 # ------------------------------------------------------------------------
31 * Created on: Nov 23, 2012
32 * Author: Daniel Felipe Gonzalez Obando
35 #ifndef MODELCDMBLACKBOX_H_
36 #define MODELCDMBLACKBOX_H_
40 #include"modelCDMFolder.h"
43 * Class representing a black box inside a Crea project. A black box is modular construct that uses the project libraries to execute its operations
45 class modelCDMBlackBox : public modelCDMFolder
49 * Default Constructor.
53 * Black Box Constructor.
54 * @param parent parent node of the black box node.
55 * @param path Path of the source folder of the black box node.
56 * @param name Name of the black box node.
57 * @param level Hierarchy level of the black box node in the project. By default 3
59 modelCDMBlackBox(modelCDMIProjectTreeNode* parent, const std::string& path, const std::string& name, const int& level = 3);
66 * Returns the name of the black box node.
67 * @return Name of the black box node.
69 const std::string& GetNameBlackBox() const;
71 * Retrieves the black box authors' names.
72 * @return Names of the black box node authors.
74 const std::string& GetAuthors() const;
76 * Retrieves the categories of the black box.
77 * @return Categories associated with the black box.
79 const std::string& GetCategories() const;
81 * Returns the description of the black box purpose.
82 * @return Description of the black box.
84 const std::string& GetDescription() const;
87 * Returns a reference of the header file of the black box.
88 * @return Header file of the black box.
90 modelCDMFile* GetHeaderFile() const;
92 * Returns a reference of the source file of the black box.
93 * @return Source file of the black box.
95 modelCDMFile* GetSourceFile() const;
98 * Sets the name of the black box with the one provided.
99 * @param name New name of the black box.
100 * @param result Result message.
101 * @return True if the operation was successful.
103 bool SetNameBlackBox(const std::string& name, std::string*& result);
105 * Sets the authors' names of the black box to the ones given.
106 * @param authors Authors' names.
107 * @param result Result message.
108 * @return True if the operation was successful.
110 bool SetAuthors(const std::string& authors, std::string*& result);
112 * Sets the Categories associated with the black box to the given ones.
113 * @param categories Categories associated with the black box.
114 * @param result Result message
115 * @return True if the operation was successful.
117 bool SetCategories(const std::string& categories, std::string*& result);
119 * Sets the Description of the black box to the given one.
120 * @param description Description of the black box.
121 * @param result Result message.
122 * @return True if the operation was successful.
124 bool SetDescription(const std::string& description, std::string*& result);
127 * Sets the reference of the header file.
128 * @param file Reference to the Header file.
130 void SetHeaderFile(modelCDMFile* file);
132 * Sets the reference of the source file.
133 * @param file Reference to the source file.
135 void SetSourceFile(modelCDMFile* file);
139 * Opens the source file with the system default code editor
140 * @param result Result message.
141 * @return True if the operation was successful.
143 bool OpenCxx(std::string*& result);
145 * Opens the header file with the system default code editor
146 * @param result Result message.
147 * @return True if the operation was successful.
149 bool OpenHxx(std::string*& result);
151 * Refreshes the structure and properties of the black box.
152 * @param result Result message.
153 * @return True if the operation was successful.
155 const bool Refresh(std::string*& result);
159 * Name of the black box. It might be different from the header file name.
161 std::string nameBlackBox;
163 * Authors of the black box.
167 * Categories associated to the categories.
169 std::string categories;
171 * Description of the black box.
173 std::string description;
176 * Reference to the header file of the black box.
178 modelCDMFile* header;
180 * Reference to the source file of the black box.
182 modelCDMFile* source;
185 #endif /* MODELCDMBLACKBOX_H_ */