#include <InterpreterBBS.h>
Public Member Functions | |
InterpreterBBS (wxVtkSceneManager *sceneManager, Factory::Pointer factory) | |
~InterpreterBBS () | |
virtual void | commandNew (const std::string &boxType, const std::string &boxName) |
Creates a new black box in current complex box. | |
virtual void | commandConnection (const std::string &boxfrom, const std::string &output, const std::string &boxto, const std::string &input) |
Connects the output boxOutput to the input boxInput. | |
virtual void | commandSet (const std::string &box, const std::string &input, const std::string &value) |
sets the input of the box with the value | |
virtual void | commandDefine (const std::string &name, const std::string &pack, const std::string &scriptfilename) |
virtual void | commandEndDefine () |
virtual void | commandExec (const std::string &word) |
virtual void | commandAuthor (const std::string &author) |
virtual void | commandCategory (const std::string &categorytype) |
virtual void | commandDescription (const std::string &description) |
virtual void | commandInput (const std::string &name, const std::string &box, const std::string &input, const std::string &help) |
virtual void | commandOutput (const std::string &name, const std::string &box, const std::string &output, const std::string &help) |
Static Public Member Functions | |
static Pointer | New (wxVtkSceneManager *sceneManager, Factory::Pointer factory) |
Public Attributes | |
double | _xGeneral |
double | _yGeneral |
double | _zGeneral |
int | _countInputs |
int | _countOutputs |
int | _countBoxes |
wxVtkSceneManager * | _sceneManager |
Factory::Pointer | _factory |
Definition at line 57 of file InterpreterBBS.h.
bbtk::InterpreterBBS::InterpreterBBS | ( | wxVtkSceneManager * | sceneManager, | |
Factory::Pointer | factory | |||
) |
Definition at line 57 of file InterpreterBBS.cxx.
References _countBoxes, _countInputs, _countOutputs, _factory, _sceneManager, _xGeneral, _yGeneral, and _zGeneral.
Referenced by New().
00058 { 00059 _factory = factory; 00060 _sceneManager = sceneManager; 00061 00062 _xGeneral = -100; 00063 _yGeneral = 100; 00064 _zGeneral = 900; // ????? 00065 printf("EED InterpreterBBS::createGBlackBox 900-450\n"); 00066 00067 _countBoxes = 0; 00068 _countInputs = 0; 00069 _countOutputs = 0; 00070 00071 bbtk::InterpreterVirtual::Init(); 00072 00073 }
bbtk::InterpreterBBS::~InterpreterBBS | ( | ) |
void bbtk::InterpreterBBS::commandAuthor | ( | const std::string & | author | ) | [virtual] |
Definition at line 179 of file InterpreterBBS.cxx.
References _sceneManager, and bbtk::wxVtkSceneManager::SetAuthor().
00180 { 00181 _sceneManager->SetAuthor(author); 00182 }
void bbtk::InterpreterBBS::commandCategory | ( | const std::string & | categorytype | ) | [virtual] |
Definition at line 186 of file InterpreterBBS.cxx.
References _sceneManager, and bbtk::wxVtkSceneManager::SetCategory().
00187 { 00188 _sceneManager->SetCategory(categorytype); 00189 }
void bbtk::InterpreterBBS::commandConnection | ( | const std::string & | boxfrom, | |
const std::string & | output, | |||
const std::string & | boxto, | |||
const std::string & | input | |||
) | [virtual] |
Connects the output boxOutput to the input boxInput.
Definition at line 102 of file InterpreterBBS.cxx.
References _sceneManager, and bbtk::wxVtkSceneManager::configGConnetion().
00106 { 00107 _sceneManager->configGConnetion( boxfrom,output,boxto,input); 00108 }
void bbtk::InterpreterBBS::commandDefine | ( | const std::string & | name, | |
const std::string & | pack, | |||
const std::string & | scriptfilename | |||
) | [virtual] |
Definition at line 153 of file InterpreterBBS.cxx.
References _sceneManager, bbtk::wxVtkSceneManager::SetCbName(), bbtk::wxVtkSceneManager::SetCbPackageName(), and bbtk::wxVtkSceneManager::setComplexBox().
00154 { 00155 _sceneManager->setComplexBox(true); 00156 _sceneManager->SetCbName(name); 00157 _sceneManager->SetCbPackageName(pack); 00158 }
void bbtk::InterpreterBBS::commandDescription | ( | const std::string & | description | ) | [virtual] |
Definition at line 193 of file InterpreterBBS.cxx.
References _sceneManager, and bbtk::wxVtkSceneManager::SetDescription().
00194 { 00195 _sceneManager->SetDescription(description); 00196 }
void bbtk::InterpreterBBS::commandEndDefine | ( | ) | [virtual] |
void bbtk::InterpreterBBS::commandExec | ( | const std::string & | word | ) | [virtual] |
Definition at line 170 of file InterpreterBBS.cxx.
References _sceneManager, bbtk::wxVtkSceneManager::findGBox(), and bbtk::GBlackBoxModel::setExecutable().
00171 { 00172 GBlackBoxModel *bbMod = (GBlackBoxModel *)_sceneManager->findGBox(word); 00173 bbMod->setExecutable(true); 00174 }
void bbtk::InterpreterBBS::commandInput | ( | const std::string & | name, | |
const std::string & | box, | |||
const std::string & | input, | |||
const std::string & | help | |||
) | [virtual] |
Definition at line 113 of file InterpreterBBS.cxx.
References _countInputs, _sceneManager, bbtk::wxVtkSceneManager::configGComBoxInputOutputPort(), and bbtk::wxVtkSceneManager::configGConnetion().
00114 { 00115 double xIn = -100+50+_countInputs*50; 00116 double yIn = 100; 00117 double zIn = 900; 00118 _sceneManager->configGComBoxInputOutputPort(true,name,xIn,yIn,zIn); 00119 _sceneManager->configGConnetion( name,name,box,input); 00120 _countInputs++; 00121 00122 printf("EED InterpreterBBS::commandInput what to do with help information ..???? \n "); 00123 }
void bbtk::InterpreterBBS::commandNew | ( | const std::string & | boxType, | |
const std::string & | boxName | |||
) | [virtual] |
Creates a new black box in current complex box.
Definition at line 86 of file InterpreterBBS.cxx.
References _countBoxes, _factory, _sceneManager, _xGeneral, _yGeneral, _zGeneral, bbtk::wxVtkSceneManager::configGBlackBox(), and bbtk::wxVtkSceneManager::createGBlackBox().
00087 { 00088 _yGeneral = _yGeneral - 30; 00089 std::string packagename = _factory->GetPackageNameOfaBlackBox(boxType); 00090 int idBox = _sceneManager->createGBlackBox( 0,0, packagename ,boxType); 00091 _countBoxes++; 00092 double px = _xGeneral + (_countBoxes%2)*100; 00093 double py = _yGeneral; 00094 00095 _sceneManager->configGBlackBox(idBox, px,py,_zGeneral,boxName, false , px+100, py-10 , _zGeneral ); 00096 }
void bbtk::InterpreterBBS::commandOutput | ( | const std::string & | name, | |
const std::string & | box, | |||
const std::string & | output, | |||
const std::string & | help | |||
) | [virtual] |
Definition at line 127 of file InterpreterBBS.cxx.
References _countOutputs, _sceneManager, _yGeneral, bbtk::wxVtkSceneManager::configGComBoxInputOutputPort(), and bbtk::wxVtkSceneManager::configGConnetion().
00128 { 00129 _yGeneral = _yGeneral - 30; 00130 double xIn = -100+_countOutputs*30; 00131 double yIn = _yGeneral; 00132 double zIn = 900; 00133 _sceneManager->configGComBoxInputOutputPort(false,name,xIn,yIn,zIn); 00134 _sceneManager->configGConnetion( box,output,name,name); 00135 _countOutputs++; 00136 00137 printf("EED InterpreterBBS::commandInput what to do with help information ..???? \n "); 00138 }
void bbtk::InterpreterBBS::commandSet | ( | const std::string & | box, | |
const std::string & | input, | |||
const std::string & | value | |||
) | [virtual] |
sets the input of the box with the value
Definition at line 144 of file InterpreterBBS.cxx.
References _sceneManager, bbtk::wxVtkSceneManager::findGBox(), and bbtk::GBlackBoxModel::setValueToInput().
00145 { 00146 GBlackBoxModel *bbMod = (GBlackBoxModel *)_sceneManager->findGBox(box); 00147 bbMod->setValueToInput(input,"\""+value+"\""); 00148 }
InterpreterBBS::Pointer bbtk::InterpreterBBS::New | ( | wxVtkSceneManager * | sceneManager, | |
Factory::Pointer | factory | |||
) | [static] |
Definition at line 48 of file InterpreterBBS.cxx.
References InterpreterBBS().
Referenced by bbtk::wxGUIEditorGraphicBBS::OnOpenBBS().
00049 { 00050 return MakePointer( new InterpreterBBS( sceneManager, factory) ); 00051 }
Definition at line 92 of file InterpreterBBS.h.
Referenced by commandOutput(), and InterpreterBBS().
Factory::Pointer bbtk::InterpreterBBS::_factory |
Definition at line 94 of file InterpreterBBS.h.
Referenced by commandAuthor(), commandCategory(), commandConnection(), commandDefine(), commandDescription(), commandExec(), commandInput(), commandNew(), commandOutput(), commandSet(), and InterpreterBBS().
Definition at line 89 of file InterpreterBBS.h.
Referenced by commandNew(), commandOutput(), and InterpreterBBS().