_Author = "Author ??";
_Category = "<VOID>";
_Description = "Description ??";
+ _MessageKind = " ";
+ _MessageLevel = " ";
_bugTextActor_text = "void";
_bugTextActor_status = 0;
//EED 15 oct 2012 BlackBoxDescriptor::Pointer descriptor = GObjectsMVCFactory::getInstance()->getBlackBoxDescriptor(packageName, boxType);
+
Package::Pointer k;
std::map< std::string, BlackBoxDescriptor::Pointer> mapDesc;
try{
std::map<std::string, BlackBoxInputDescriptor*> descriptorInMap =
descriptor->GetInputDescriptorMap();
std::map<std::string, BlackBoxInputDescriptor*>::iterator itInput;
-
int i = 0;
for (itInput = descriptorInMap.begin(); itInput != descriptorInMap.end(); ++itInput) {
BlackBoxInputDescriptor *desc = itInput->second;
std::map<std::string, BlackBoxOutputDescriptor*> descriptorOutMap =
descriptor->GetOutputDescriptorMap();
std::map<std::string, BlackBoxOutputDescriptor*>::iterator itOutput;
-
i = 0;
for (itOutput = descriptorOutMap.begin(); itOutput
!= descriptorOutMap.end(); ++itOutput) {
//(NOTE: Refresh is only made by the view)
view->setModel(model);
view->setBaseView(_baseView);
+
view->initVtkObjects();
//Associates the controller with the correspondent model and view
//(NOTE: Refresh is only made by the view)
view->setModel(model);
view->setBaseView(_baseView);
- view->initVtkObjects();
+
+//EED017 view->initVtkObjects();
+ view->createVtkObjects();
+// view->addVtkActors();
+
//Associates the controller with the correspondent model and view
controller->setModelAndView(model, view);
addObjectController(controller);
return (GPortController*) controller;
+
}
//=========================================================================
* JGRR AND CM
* Width increased from 2 to 3, it simplifies line handling and spline control :P
* @param WidthLine
- */
+ */
+ //EED2017
manContourView->SetWidthLine( 3 ) ;
manContourView->SetShowText(false);
//=========================================================================
std::string wxVtkSceneManager::getDiagramBBS(bool wln) {
+ std::cout << "wxVtkSceneManager::getDiagramBBS" << std::endl;
bool existsExec = false;
std::vector<std::string> packages;
script += "\n";
//ups2
-
+
script += LineNumber(wln, lnNmbr);
script += "author \"";
script += _Author;
script += LineNumber(wln, lnNmbr);
script += "new ";
int id = boxes[i];
- GObjectController *control = _controllers[id];
- GBlackBoxModel *model = (GBlackBoxModel*) control->getModel();
+ GObjectController *control = _controllers[id];
+ GBlackBoxModel *model = (GBlackBoxModel*) control->getModel();
+ script += model->getBBTKPackage()+":";
script += model->getBBTKType();
script += " ";
script += model->getBBTKName();
}
else
{
+ script += LineNumber(wln, lnNmbr);
script += "connect ";
script += startBox->getBBTKName();
script += ".";
script += "\n";
}
+ script += LineNumber(wln, lnNmbr);
script += "\n";
}
script += LineNumber(wln, lnNmbr);
script += "\n";
+ script += LineNumber(wln, lnNmbr);
script += "\n";
+
+ script += LineNumber(wln, lnNmbr);
script += "# Complex input ports\n";
script += complexInputs;
+ if((_MessageKind!=" ")&&(_MessageLevel!=" ")){
+ script += LineNumber(wln, lnNmbr);
+ script += "message ";
+ script += _MessageKind;
+ script += " ";
+ script += _MessageLevel;
+ script += "\n";
+ }
+
for (i = 0; i < (int) execBoxes.size(); i++) {
script += LineNumber(wln, lnNmbr);
script += "exec ";
//=========================================================================
std::string wxVtkSceneManager::saveComplexBoxBBS() {
+ std::cout<<"wxVtkSceneManager::saveComplexBoxBBS"<<std::endl;
std::vector<std::string> packages;
std::vector<int> boxes;
std::vector<int> connections;
GObjectController *control = _controllers[id];
GBlackBoxModel *model = (GBlackBoxModel*) control->getModel();
+ script += model->getBBTKPackage()+":";
script += model->getBBTKType();
script += " ";
script += model->getBBTKName();
script += "\n";
+ script += "message ";
+ script += _MessageKind;
+ script += " ";
+ script += _MessageLevel;
+ script += "\n";
+
for (i = 0; i < (int) execBoxes.size(); i++) {
script += "exec ";
int id = execBoxes[i];
sprintf(buffer, "%d", bsize);
content += buffer;
content += "\n";
-
+
for (int i = 0; i < bsize; i++) {
int id = boxes[i];
+// std::cout<<"id "<<id<<std::endl;//CFT
GObjectController *cont = _controllers[id];
+// std::cout<<"nombre: "<<cont->getStatusText()<<std::endl;//CFT
+// std::cout<<"tipo: "<<cont->getModel()->getBBTKType()<<std::endl;//CFT
+// //boxesDiagram[i] = cont->getModel()->getBBTKType();//CFT
+// std::cout<<"nname: "<<cont->getModel()->getBBTKName()<<std::endl;//CFT
+// std::cout<<"categorie: "<<GetCategory()<<std::endl;//CFT
+// std::cout<<"type: "<<cont->getModel()->getGObjectType()<<std::endl;//CFT
cont->getModel()->save(content);
}
std::istringstream is(result);
is >> numBoxes;
- for (int i = 0; i < numBoxes; i++) {
+ for (int i = 0; i < numBoxes; i++)
+ {
//----------
getCleanLine(inputStream, line);//BOX
getCleanLine(inputStream, line);//package:type:name
bool boxExecutable = false;
- if (isExec == "TRUE") {
+ if (isExec == "TRUE")
+ {
boxExecutable = true;
}
isCons >> numConns;
- for (int i = 0; i < numConns; i++) {
+ for (int i = 0; i < numConns; i++)
+ {
//----------
getCleanLine(inputStream, line);//CONNECTION
getCleanLine(inputStream, line);//Startbox.PortName:EndBox.PortName
result = strtok(NULL, delims);
std::string nameEndPort(result);
-
int idCon = configGConnetion(nameStartBox, nameStartPort,nameEndBox, nameEndPort);
if (version != "1.0") {
//=========================================================================
+void wxVtkSceneManager::SetMessageKind(std::string kind) {
+ _MessageKind = kind;
+
+}
+
+//=========================================================================
+
+std::string wxVtkSceneManager::GetMessageKind(){
+ return _MessageKind;
+}
+
+//=========================================================================
+
+void wxVtkSceneManager::SetMessageLevel(std::string Level){
+ _MessageLevel = Level;
+}
+
+//=========================================================================
+
+std::string wxVtkSceneManager::GetMessageLevel(){
+ return _MessageLevel;
+}
+
+//=========================================================================
+
std::vector< std::string> wxVtkSceneManager::GetExternalInputsNames()
{