]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsKernelEditorGraphic/GBoxModel.h
no message
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsKernelEditorGraphic / GBoxModel.h
index 05cb6bcc6d7141c98e6517a0ccda82f4a020ac4e..5b6d898362a158a032f38a1d5693e60c857bd5e3 100644 (file)
@@ -28,17 +28,11 @@ Version:   $Revision$
 *  knowledge of the CeCILL-B license and that you accept its terms.
 * ------------------------------------------------------------------------ */                                                                         
 
-
-
-/**
-*  \file 
-*  \brief Class bbtk::GBoxModel : abstract black-box interface. 
-*/
-
-/**
-* \class bbtk::GBoxModel
-* \brief 
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
 
 #ifndef __GBoxModel_h__
 #define __GBoxModel_h__
@@ -57,6 +51,7 @@ Version:   $Revision$
 namespace bbtk
 {
 
+       // Mandatory when exists a bidirectional relation: GPortModel includes GBoxModel and viceversa
        class GPortModel;
 
        class GBoxModel : public GObjectModel 
@@ -70,26 +65,41 @@ namespace bbtk
                
                //Public methods                
                virtual void setInicPoint(double& x, double& y, double& z);
+
                void addInputPort(GPortModel *inputport);
                void addOutputPort(GPortModel *outputport);
+
                int getNumInputPorts();
                int getNumOutputPorts();
+
+               // Change the position of the box and its ports
                virtual void move(double xx,double yy,double zz);
 
+               // Text in the status bar
                virtual std::string getStatusText();
+
+               // Method to write the information of the black box to be saved in the parameter string
                virtual void save(std::string &content);
 
+               // Returns a vector with inputs or outputs
                std::vector<GPortModel*> getInputPorts();
                std::vector<GPortModel*> getOutputPorts();
 
+               // Get input with the name given by parameter
                GPortModel* getInputPort(std::string name);
-               GPortModel* getOutputPort(std::string name);
-
                GPortModel* getInputPort(int pos);
-               GPortModel* getOutputPort(int pos);
 
+               // Get output with the name given by parameter
+               GPortModel* getOutputPort(std::string name);
+               GPortModel* getOutputPort(int pos);
+               
+               // Updates the position and finally the view of inputs and outputs
                void updatePorts();
 
+
+               void addColons(std::string &text);
+               void removeColons(std::string &text);
+
        private:
 
                //Private Attributes
@@ -98,6 +108,7 @@ namespace bbtk
 
        protected:
                //Protected Attributes
+
                std::vector<GPortModel*> _inputs;
                std::vector<GPortModel*> _outputs;