* 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__
namespace bbtk
{
+ // Mandatory when exists a bidirectional relation: GPortModel includes GBoxModel and viceversa
class GPortModel;
class GBoxModel : public GObjectModel
//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
protected:
//Protected Attributes
+
std::vector<GPortModel*> _inputs;
std::vector<GPortModel*> _outputs;