From b68450df196c396e3a52fea126fbb9468d674de1 Mon Sep 17 00:00:00 2001 From: davila <> Date: Sun, 5 Sep 2010 09:42:01 +0000 Subject: [PATCH] *** empty log message *** --- .../bbtkwxGUIEditorGraphicBBS.cxx | 4 -- .../wxVtkSceneManager.cxx | 59 +++---------------- 2 files changed, 8 insertions(+), 55 deletions(-) diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx index 83db82f..16cce2b 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx @@ -45,8 +45,6 @@ namespace bbtk : wxFrame(parent, -1, _T("bbtkGEditor"),wxDefaultPosition, wxSize(1200,800)) { - printf ("EED %p wxGUIEditorGraphicBBS()\n" , this ); - _frameAUIMgr = new wxAuiManager(this); @@ -562,7 +560,6 @@ namespace bbtk wxFileDialog * openFileDialog = new wxFileDialog(this,wxT("Open diagram"),wxEmptyString,wxT(""),wxT("*.bbg"),wxOPEN|wxFILE_MUST_EXIST); if (openFileDialog->ShowModal() == wxID_OK) { -printf("EED %p wxGUIEditorGraphicBBS::OnOpenDiagram 1\n", this); wxString fileName = openFileDialog->GetPath(); ifstream inputStream; @@ -576,7 +573,6 @@ printf("EED %p wxGUIEditorGraphicBBS::OnOpenDiagram 1\n", this); _tabsMgr->loadDiagram(inputStream); inputStream.close(); -printf("EED %p wxGUIEditorGraphicBBS::OnOpenDiagram 2\n", this); } refreshGUIControls(); } diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx index dbd299c..e6b41ad 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx @@ -43,7 +43,6 @@ namespace bbtk //========================================================================= wxVtkSceneManager::wxVtkSceneManager(wxGEditorTabPanel *parent, wxVtk3DBaseView *baseView,int idManager) { - printf ("EED %p wxVtkSceneManager()\n" , this ); _parent = parent; _numBoxes=0; _idManager=idManager; @@ -110,32 +109,23 @@ namespace bbtk int wxVtkSceneManager::createGBlackBox(int x, int y, std::string packageName, std::string boxType) { -printf("EED %p wxVtkSceneManager::createGBlackBox 1\n",this); - _worldState = NOTHING_HAPPENS; -printf("EED %p wxVtkSceneManager::createGBlackBox 1.1\n",this); int windowWidth=_baseView->GetRenWin()->GetSize()[0]; -printf("EED %p wxVtkSceneManager::createGBlackBox 1.2\n",this); int windowHeight=_baseView->GetRenWin()->GetSize()[1]; -printf("EED %p wxVtkSceneManager::createGBlackBox 1.3\n",this); int type = GBLACKBOX; //Create the MVC Objects GBlackBoxModel *model = (GBlackBoxModel*)GObjectsMVCFactory::getInstance()->createGObjectModel(type); -printf("EED %p wxVtkSceneManager::createGBlackBox 1.4\n",this); vtkGObjectView *view = GObjectsMVCFactory::getInstance()->createGObjectView(type); -printf("EED %p wxVtkSceneManager::createGBlackBox 1.5\n",this); GObjectController* controller = GObjectsMVCFactory::getInstance()->createGObjectController(type); -printf("EED %p wxVtkSceneManager::createGBlackBox 1.6 >%s< >%s<\n",this, packageName.c_str(), boxType.c_str() ); BlackBoxDescriptor::Pointer descriptor = GObjectsMVCFactory::getInstance()->getBlackBoxDescriptor(packageName, boxType); //Prepares the initial model //The coordinates obtained are the following. Top-Left:x=0,y=0 Bottom-Right:x=width,y=height -printf("EED %p wxVtkSceneManager::createGBlackBox 2\n",this); double xx = x; double yy = windowHeight-y; @@ -148,7 +138,6 @@ printf("EED %p wxVtkSceneManager::createGBlackBox 2\n",this); _numBoxes++; std::stringstream stream; -printf("EED %p wxVtkSceneManager::createGBlackBox 3\n",this); if(_numBoxes<10) { stream << "Box0" << _numBoxes; @@ -178,7 +167,6 @@ printf("EED %p wxVtkSceneManager::createGBlackBox 3\n",this); i++; } -printf("EED %p wxVtkSceneManager::createGBlackBox 4\n",this); //Iterate and create the output ports std::map descriptorOutMap = descriptor->GetOutputDescriptorMap(); std::map::iterator itOutput; @@ -197,7 +185,6 @@ printf("EED %p wxVtkSceneManager::createGBlackBox 4\n",this); view->setModel(model); view->setBaseView(_baseView); view->initVtkObjects(); -printf("EED %p wxVtkSceneManager::createGBlackBox 5\n",this); //Associates the controller with the correspondent model and view controller->setModelAndView(model,view); @@ -206,7 +193,7 @@ printf("EED %p wxVtkSceneManager::createGBlackBox 5\n",this); model->notifyObservers(_idManager); int newId = addObjectController(controller); -printf("EED %p wxVtkSceneManager::createGBlackBox 6\n",this); + return newId; } @@ -1290,14 +1277,12 @@ printf("EED %p wxVtkSceneManager::createGBlackBox 6\n",this); void wxVtkSceneManager::saveDiagram(std::string &content) { -printf("EED %p wxVtkSceneManager::saveDiagram 1\n",this); char buffer [50]; //Print info IF COMPLEX BOX content+="COMPLEXBOX:"; if(_isComplexBox) { -printf("EED %p wxVtkSceneManager::saveDiagram 2\n",this); content+="TRUE\n"; //Print info complex input ports @@ -1343,7 +1328,6 @@ printf("EED %p wxVtkSceneManager::saveDiagram 2\n",this); content+=buffer; content+="\n"; -printf("EED %p wxVtkSceneManager::saveDiagram 3\n",this); for(int i = 0;i> numBoxes; -printf("EED %p wxVtkSceneManager::loadDiagram 5\n",this); for(int i = 0;i> yIn; std::istringstream zSt(zInic); zSt >> zIn; -printf("EED %p wxVtkSceneManager::loadDiagram 6\n",this); //---------- getline(inputStream,line);//xEnd:yEnd:zEnd @@ -1582,7 +1551,6 @@ printf("EED %p wxVtkSceneManager::loadDiagram 6\n",this); std::string yEnd(result); result = strtok( NULL, delims );//zEnd std::string zEnd(result); -printf("EED %p wxVtkSceneManager::loadDiagram 6.1\n",this); double xEn, yEn, zEn; std::istringstream xEt(xEnd); @@ -1592,19 +1560,12 @@ printf("EED %p wxVtkSceneManager::loadDiagram 6.1\n",this); std::istringstream zEt(zEnd); zEt >> zEn; -printf("EED %p wxVtkSceneManager::loadDiagram 6.2\n",this); int idBox = createGBlackBox(0,0,package,type); -printf("EED %p wxVtkSceneManager::loadDiagram 6.2\n",this); GObjectController *cont = _controllers[idBox]; -printf("EED %p wxVtkSceneManager::loadDiagram 6.2\n",this); GBlackBoxModel *bbmod = (GBlackBoxModel*)cont->getModel(); -printf("EED %p wxVtkSceneManager::loadDiagram 6.2\n",this); bbmod->setBBTKName(name); -printf("EED %p wxVtkSceneManager::loadDiagram 6.2\n",this); bbmod->setInicPoint(xIn,yIn,zIn); -printf("EED %p wxVtkSceneManager::loadDiagram 6.2\n",this); bbmod->setFinalPoint(xEn,yEn,zEn); -printf("EED %p wxVtkSceneManager::loadDiagram 6.2\n",this); if(isExec=="TRUE") { bbmod->setExecutable(true); @@ -1619,9 +1580,8 @@ printf("EED %p wxVtkSceneManager::loadDiagram 6.2\n",this); std::string port=line.substr(0,4); while(port=="PORT") { -printf("EED %p wxVtkSceneManager::loadDiagram 7\n",this); getline(inputStream,line);//name:value - char poort[20]; + char poort[150]; strcpy( poort, line.c_str() ); result = strtok( poort, delims );//name std::string name(result); @@ -1640,7 +1600,7 @@ printf("EED %p wxVtkSceneManager::loadDiagram 7\n",this); /// CONNECTIONS //---------- getline(inputStream,line);//CONNECTIONS:num - char conns[20]; + char conns[30]; strcpy( conns, line.c_str() ); result = strtok( conns, delims ); result = strtok( NULL, delims ); @@ -1649,15 +1609,13 @@ printf("EED %p wxVtkSceneManager::loadDiagram 7\n",this); std::istringstream isCons(result); isCons >> numConns; -printf("EED %p wxVtkSceneManager::loadDiagram 8\n",this); for(int i = 0;i