GObjectController* controller = GObjectsMVCFactory::getInstance()->createGObjectController(type);
model->registerInBox(blackBox,portType, posInBox);
- blackBox->addOutputPort(model);
model->setBBTKType(bbtkType);
model->setBBTKName(bbtkName);
if(control->getGObjectType()==GBLACKBOX)
{
GBlackBoxModel *bbmod = (GBlackBoxModel*)control->getModel();
- std::vector<GPortModel*>inputs = bbmod->getInputPorts();
+ std::vector<GPortModel*> inputs = bbmod->getInputPorts();
for(int i = 0;i<inputs.size();i++)
{
- controllersToRemove.push_back(inputs[i]->getObjectId());
+ controllersToRemove.push_back(inputs[i]->getObjectId());
}
- std::vector<GPortModel*>outputs = bbmod->getOutputPorts();
+ std::vector<GPortModel*> outputs = bbmod->getOutputPorts();
for(int i = 0;i<outputs.size();i++)
{
controllersToRemove.push_back(outputs[i]->getObjectId());
}
- controllersToRemove.push_back(control->getId());
+ controllersToRemove.push_back(bbmod->getObjectId());
}
for(int i = 0;i<controllersToRemove.size();i++)
{
int id = controllersToRemove[i];
- GObjectController *cont = _controllers[id];
+ GObjectController *cont = _controllers[id];
cont->removeFromScene();
- unregisterController((InteractorStyleMaracas*)cont);
+ unregisterController((InteractorStyleMaracas*)cont);
_controllers.erase(id);
}
int i;
for(i = 0; i<packages.size();i++)
{
- script+="load ";
+ script+="include ";
script+=packages[i];
script+="\n";
}
- script+="load std\n";
+ script+="include std\n";
for(i = 0; i<boxes.size();i++)
{