]> Creatis software - bbtkGEditor.git/blob - lib/EditorGraphicBBS/bbsKernelEditorGraphic/GBlackBoxModel.h
Documentation of the wxLibrary
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsKernelEditorGraphic / GBlackBoxModel.h
1 /*=========================================================================                                                                               
2 Program:   bbtk
3 Module:    $RCSfile$
4 Language:  C++
5 Date:      $Date$
6 Version:   $Revision$
7 =========================================================================*/
8
9 /* ---------------------------------------------------------------------
10
11 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
12 * Authors : Ricardo A Corredor, Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
13 *
14 *  This software is governed by the CeCILL-B license under French law and 
15 *  abiding by the rules of distribution of free software. You can  use, 
16 *  modify and/ or redistribute the software under the terms of the CeCILL-B 
17 *  license as circulated by CEA, CNRS and INRIA at the following URL 
18 *  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
19 *  or in the file LICENSE.txt.
20 *
21 *  As a counterpart to the access to the source code and  rights to copy,
22 *  modify and redistribute granted by the license, users are provided only
23 *  with a limited warranty  and the software's author,  the holder of the
24 *  economic rights,  and the successive licensors  have only  limited
25 *  liability. 
26 *
27 *  The fact that you are presently reading this means that you have had
28 *  knowledge of the CeCILL-B license and that you accept its terms.
29 * ------------------------------------------------------------------------ */                                                                         
30
31 /****
32 * Design and Developpement of BBTK GEditor
33 * Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
34 * RaC - 2010
35 ****/
36
37 #ifndef __GBlackBoxModel_h__
38 #define __GBlackBoxModel_h__
39
40 //Includes same project
41 #include "GlobalConstants.h"
42 #include "GBoxModel.h"
43
44 //Includes creaMaracasVisu
45
46 //Includes std
47 #include <iostream>
48
49
50 namespace bbtk
51 {
52
53         class GBlackBoxModel : public GBoxModel
54         {
55
56         public: 
57
58                 //Constructors
59                 GBlackBoxModel();
60                 ~GBlackBoxModel();
61                 
62                 //Public methods
63
64                 // The black box has an specific package (important to search in the list with the BBTK Interpreter)
65                 std::string getBBTKPackage();
66                 void setBBTKPackage(std::string obpackage);
67
68                 // Text in the status bar
69                 virtual std::string getStatusText();
70
71                 // Method to write the information of the black box to be saved in the parameter string
72                 virtual void save(std::string &content);
73
74                 // Is the black box executable or not
75                 bool isExecutable();
76                 void setExecutable(bool executable);
77
78                 // Set 'value' to the port in position 'pos'
79                 void setValueToInputPort(int pos,std::string value);
80                 
81                 // Set 'value' to the port with name 'name'
82                 void setValueToInput(std::string name,std::string value);
83
84                 // Get the value of the port in position 'pos'
85                 std::string getValueInputPort(int pos);
86
87                 // Get the value of the port with name 'name'
88                 std::string getValueInput(std::string name);
89
90                 // Get id's of the connected inputs 
91                 std::vector<int> getConnectedInputs();
92                 // Get id's of the connected outputs
93                 std::vector<int> getConnectedOutputs();
94
95         private:
96
97                 //Private Attributes
98                 bool _isExecutable;
99
100                 //Private Methods
101
102         protected:
103                 //Protected Attributes
104                 std::string _bbtkPackage;
105
106                 //Protected methods
107                 
108         };
109
110
111 }
112 // namespace bbtk
113 #endif
114