bbtk::GObjectModel Class Reference

#include <GObjectModel.h>

Inheritance diagram for bbtk::GObjectModel:

Inheritance graph
[legend]
Collaboration diagram for bbtk::GObjectModel:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 GObjectModel ()
 ~GObjectModel ()
void getInicPoint (double &x, double &y, double &z)
void getFinalPoint (double &x, double &y, double &z)
void getCenter (double &x, double &y, double &z)
virtual void setInicPoint (double &x, double &y, double &z)
virtual void setFinalPoint (double &x, double &y, double &z)
virtual void move (double xx, double yy, double zz)
virtual bool isPointInside (double x, double y, double z)
int getGObjectType ()
void setGObjectType (int obtype)
std::string getBBTKType ()
void setBBTKType (std::string obtype)
std::string getBBTKName ()
void setBBTKName (std::string obname)
int getObjectId ()
void setObjectId (int id)
virtual std::string getStatusText ()
virtual void save (std::string &content)
void addObserver (Observer *observer)
void notifyObservers (int idCaller, int command=NO_COMMAND)

Protected Attributes

double _xInic
double _yInic
double _zInic
double _xFin
double _yFin
double _zFin
int _objectId
int _gObjectType
std::string _bbtkType
std::string _bbtkName


Detailed Description

Definition at line 61 of file GObjectModel.h.


Constructor & Destructor Documentation

bbtk::GObjectModel::GObjectModel (  ) 

Definition at line 44 of file GObjectModel.cxx.

References _xFin, _xInic, _yFin, _yInic, _zFin, and _zInic.

00045         {
00046 
00047                 _xInic = 0;
00048                 _yInic = 0;
00049                 _zInic = 900;
00050                 _xFin = 0;
00051                 _yFin = 0;
00052                 _zFin = 900;
00053         }

bbtk::GObjectModel::~GObjectModel (  ) 

Definition at line 56 of file GObjectModel.cxx.

00057         {
00058         }


Member Function Documentation

void bbtk::Observable::addObserver ( Observer observer  )  [inherited]

std::string bbtk::GObjectModel::getBBTKName (  ) 

std::string bbtk::GObjectModel::getBBTKType (  ) 

void bbtk::GObjectModel::getCenter ( double &  x,
double &  y,
double &  z 
)

Definition at line 77 of file GObjectModel.cxx.

References _xFin, _xInic, _yFin, _yInic, _zFin, and _zInic.

Referenced by bbtk::wxVtkSceneManager::OnMouseMove(), bbtk::GConnectorModel::setEndPort(), bbtk::GConnectorModel::setStartPort(), and bbtk::GConnectorModel::updateStartEndPoints().

00078         {
00079                 x = (_xInic+_xFin)/2;
00080                 y = (_yInic+_yFin)/2;
00081                 z = (_zInic+_zFin)/2;
00082         }

Here is the caller graph for this function:

void bbtk::GObjectModel::getFinalPoint ( double &  x,
double &  y,
double &  z 
)

int bbtk::GObjectModel::getGObjectType (  ) 

Definition at line 109 of file GObjectModel.cxx.

References _gObjectType.

Referenced by bbtk::GObjectController::getGObjectType(), bbtk::wxVtkSceneManager::saveComplexBoxBBS(), and bbtk::wxVtkSceneManager::update().

00110         {
00111                 return _gObjectType;
00112         }

Here is the caller graph for this function:

void bbtk::GObjectModel::getInicPoint ( double &  x,
double &  y,
double &  z 
)

int bbtk::GObjectModel::getObjectId (  ) 

std::string bbtk::GObjectModel::getStatusText (  )  [virtual]

Reimplemented in bbtk::GBlackBoxModel, bbtk::GBoxModel, bbtk::GComplexBoxPortModel, and bbtk::GPortModel.

Definition at line 165 of file GObjectModel.cxx.

Referenced by bbtk::GObjectController::getStatusText().

00166         {
00167                 std::string virt = "";
00168                 return virt;
00169         }

Here is the caller graph for this function:

bool bbtk::GObjectModel::isPointInside ( double  x,
double  y,
double  z 
) [virtual]

Definition at line 116 of file GObjectModel.cxx.

References _xFin, _xInic, and _yFin.

Referenced by bbtk::vtkGObjectView::isPointInside().

00117         {
00118                 if(x>=_xInic && x<=_xFin && y<=_yInic && y>=_yFin)
00119                 {
00120                         return true;
00121                 }
00122                 else
00123                 {
00124                         return false;
00125                 }
00126         }

Here is the caller graph for this function:

void bbtk::GObjectModel::move ( double  xx,
double  yy,
double  zz 
) [virtual]

Reimplemented in bbtk::GBoxModel.

Definition at line 130 of file GObjectModel.cxx.

References setInicPoint().

Referenced by bbtk::vtkGObjectView::moveObject().

00131         {
00132                 setInicPoint(xx,yy,zz);
00133         }

Here is the call graph for this function:

Here is the caller graph for this function:

void bbtk::Observable::notifyObservers ( int  idCaller,
int  command = NO_COMMAND 
) [inherited]

void bbtk::GObjectModel::save ( std::string &  content  )  [virtual]

Reimplemented in bbtk::GBlackBoxModel, bbtk::GBoxModel, bbtk::GComplexBoxPortModel, bbtk::GConnectorModel, and bbtk::GPortModel.

Definition at line 187 of file GObjectModel.cxx.

Referenced by bbtk::wxVtkSceneManager::saveDiagram().

00188         {
00189                 //virtual
00190         }

Here is the caller graph for this function:

void bbtk::GObjectModel::setBBTKName ( std::string  obname  ) 

void bbtk::GObjectModel::setBBTKType ( std::string  obtype  ) 

void bbtk::GObjectModel::setFinalPoint ( double &  x,
double &  y,
double &  z 
) [virtual]

void bbtk::GObjectModel::setGObjectType ( int  obtype  ) 

Definition at line 102 of file GObjectModel.cxx.

References _gObjectType.

Referenced by bbtk::wxVtkSceneManager::createGConnector(), and bbtk::GObjectsMVCFactory::createGObjectModel().

00103         {
00104                 _gObjectType = gObjectType;
00105         }

Here is the caller graph for this function:

void bbtk::GObjectModel::setInicPoint ( double &  x,
double &  y,
double &  z 
) [virtual]

Reimplemented in bbtk::GBoxModel, and bbtk::GComplexBoxPortModel.

Definition at line 85 of file GObjectModel.cxx.

References _xInic, _yInic, and _zInic.

Referenced by move(), bbtk::GConnectorModel::setStartPort(), and bbtk::GPortModel::updatePortPosition().

00086         {
00087                 _xInic = x;
00088                 _yInic = y;
00089                 _zInic = z;
00090                 
00091         }

Here is the caller graph for this function:

void bbtk::GObjectModel::setObjectId ( int  id  ) 

Definition at line 180 of file GObjectModel.cxx.

References _objectId.

Referenced by bbtk::GObjectController::setId().

00181         {
00182                 _objectId=id;
00183         }

Here is the caller graph for this function:


Member Data Documentation

std::string bbtk::GObjectModel::_bbtkName [protected]

std::string bbtk::GObjectModel::_bbtkType [protected]

Definition at line 128 of file GObjectModel.h.

Referenced by getGObjectType(), and setGObjectType().

double bbtk::GObjectModel::_xFin [protected]

double bbtk::GObjectModel::_xInic [protected]

double bbtk::GObjectModel::_yFin [protected]

double bbtk::GObjectModel::_yInic [protected]

double bbtk::GObjectModel::_zFin [protected]

double bbtk::GObjectModel::_zInic [protected]


The documentation for this class was generated from the following files:

Generated on Thu May 31 15:13:27 2012 for bbtkGEditor by  doxygen 1.5.7.1