#include <guiObservers.hxx>
Public Member Functions | |
SubjectComposedNode (YACS::ENGINE::ComposedNode *composedNode, Subject *parent) | |
virtual | ~SubjectComposedNode () |
virtual SubjectNode * | addNode (YACS::ENGINE::Catalog *catalog, std::string compo, std::string type, std::string name, bool newCompoInst) |
virtual SubjectNode * | getChild (YACS::ENGINE::Node *node=0) const |
virtual void | loadChildren () |
virtual void | loadLinks () |
virtual void | completeChildrenSubjectList (SubjectNode *son) |
SubjectNode * | addSubjectNode (YACS::ENGINE::Node *node, std::string name="", YACS::ENGINE::Catalog *catalog=0, std::string compo="", std::string type="") |
SubjectLink * | addSubjectLink (SubjectNode *sno, SubjectDataPort *spo, SubjectNode *sni, SubjectDataPort *spi) |
SubjectControlLink * | addSubjectControlLink (SubjectNode *sno, SubjectNode *sni) |
virtual void | removeLink (SubjectLink *link) |
virtual void | removeControlLink (SubjectControlLink *link) |
virtual void | removeExternalControlLinks () |
virtual void | houseKeepingAfterCutPaste (bool isCut, SubjectNode *son) |
virtual bool | hasValue () |
virtual std::string | getValue () |
virtual void | clean (Command *command=0) |
void | localclean (Command *command=0) |
Public Member Functions inherited from YACS::HMI::SubjectNode | |
SubjectNode (YACS::ENGINE::Node *node, Subject *parent) | |
virtual | ~SubjectNode () |
virtual bool | setProperties (std::map< std::string, std::string > properties) |
virtual std::map< std::string, std::string > | getProperties () |
virtual bool | reparent (Subject *parent) |
virtual bool | copy (Subject *parent) |
virtual std::string | getName () |
virtual bool | setName (std::string name) |
virtual YACS::ENGINE::Node * | getNode () |
void | registerUndoDestroy () |
SubjectControlLink * | addSubjectControlLink (SubjectControlLink *sub) |
void | removeSubjectControlLink (SubjectControlLink *sub) |
std::list< SubjectLink * > | getSubjectLinks () const |
std::list< SubjectControlLink * > | getSubjectControlLinks () const |
std::list< SubjectInputPort * > | getSubjectInputPorts () const |
std::list< SubjectOutputPort * > | getSubjectOutputPorts () const |
std::list < SubjectInputDataStreamPort * > | getSubjectInputDataStreamPorts () const |
std::list < SubjectOutputDataStreamPort * > | getSubjectOutputDataStreamPorts () const |
void | localclean (Command *command=0) |
virtual void | update (GuiEvent event, int type, Subject *son) |
virtual void | recursiveUpdate (GuiEvent event, int type, Subject *son) |
virtual void | removeExternalLinks () |
virtual void | saveLinks () |
virtual void | restoreLinks () |
virtual bool | putInComposedNode (std::string name, std::string type, bool toSaveRestoreLinks=true) |
virtual int | isValid () |
void | setExecState (int execState) |
Public Member Functions inherited from YACS::HMI::Subject | |
Subject (Subject *parent=0) | |
virtual | ~Subject () |
virtual void | attach (GuiObserver *obs) |
virtual void | detach (GuiObserver *obs) |
virtual void | select (bool isSelected) |
virtual std::vector< std::string > | knownProperties () |
virtual Subject * | getParent () |
virtual void | setParent (Subject *son) |
virtual bool | destroy (Subject *son) |
From user action in Ihm, destroy an object. More... | |
virtual void | addSubjectReference (Subject *ref) |
void | localclean (Command *command=0) |
void | registerUndoDestroy () |
void | askRegisterUndoDestroy () |
bool | isDestructible () |
virtual TypeOfElem | getType () |
virtual void | setProgress (std::string newProgress) |
virtual std::string | getProgress () |
Public Member Functions inherited from YACS::ENGINE::Observer | |
virtual void | notifyObserver2 (Node *object, const std::string &event, void *something) |
virtual | ~Observer () |
Static Public Member Functions | |
static SubjectComposedNode * | getLowestCommonAncestor (SubjectNode *snode1, SubjectNode *snode2) |
Retrieves the lowest common ancestor of 2 nodes. More... | |
Static Public Member Functions inherited from YACS::HMI::SubjectNode | |
static bool | tryCreateLink (SubjectNode *subOutNode, SubjectNode *subInNode) |
Static Public Member Functions inherited from YACS::HMI::Subject | |
static void | erase (Subject *sub, Command *command=0, bool post=false) |
Protected Member Functions | |
virtual SubjectNode * | createNode (YACS::ENGINE::Catalog *catalog, std::string compo, std::string type, std::string name, bool newCompoInst, int swCase=0) |
Protected Member Functions inherited from YACS::HMI::SubjectNode | |
virtual SubjectInputPort * | addSubjectInputPort (YACS::ENGINE::InputPort *port, std::string name="") |
virtual SubjectOutputPort * | addSubjectOutputPort (YACS::ENGINE::OutputPort *port, std::string name="") |
virtual SubjectInputDataStreamPort * | addSubjectIDSPort (YACS::ENGINE::InputDataStreamPort *port, std::string name="") |
virtual SubjectOutputDataStreamPort * | addSubjectODSPort (YACS::ENGINE::OutputDataStreamPort *port, std::string name="") |
virtual void | notifyObserver (YACS::ENGINE::Node *object, const std::string &event) |
Protected Attributes | |
YACS::ENGINE::ComposedNode * | _composedNode |
Protected Attributes inherited from YACS::HMI::SubjectNode | |
YACS::ENGINE::Node * | _node |
std::list< SubjectInputPort * > | _listSubjectInputPort |
std::list< SubjectOutputPort * > | _listSubjectOutputPort |
std::list < SubjectInputDataStreamPort * > | _listSubjectIDSPort |
std::list < SubjectOutputDataStreamPort * > | _listSubjectODSPort |
std::list< SubjectLink * > | _listSubjectLink |
std::list< SubjectControlLink * > | _listSubjectControlLink |
int | _execState |
std::list < YACS::ENGINE::OutGate * > | loutgate |
std::list< YACS::ENGINE::InGate * > | singate |
std::vector< std::pair < YACS::ENGINE::OutPort *, YACS::ENGINE::InPort * > > | dataLinks |
std::vector< std::pair < YACS::ENGINE::OutPort *, YACS::ENGINE::InPort * > > | dataflowLinks |
Protected Attributes inherited from YACS::HMI::Subject | |
std::set< GuiObserver * > | _setObs |
Subject * | _parent |
bool | _destructible |
bool | _askRegisterUndo |
std::string | _progress |
Definition at line 347 of file guiObservers.hxx.
SubjectComposedNode::SubjectComposedNode | ( | YACS::ENGINE::ComposedNode * | composedNode, |
Subject * | parent | ||
) |
Definition at line 1316 of file guiObservers.cxx.
|
virtual |
all generic destruction is done in generic class SubjectNode
Definition at line 1325 of file guiObservers.cxx.
References DEBTRACE, and YACS::HMI::SubjectNode::getName().
|
virtual |
Reimplemented in YACS::HMI::SubjectDynParaLoop, YACS::HMI::SubjectWhileLoop, YACS::HMI::SubjectForLoop, and YACS::HMI::SubjectBloc.
Definition at line 1346 of file guiObservers.cxx.
References YACS::HMI::GuiContext::_lastErrorMessage, DEBTRACE, and YACS::HMI::GuiContext::getCurrent().
Referenced by YACS::HMI::GuiEditor::_createNode(), and gui.GraphViewer.GraphViewer::popup().
SubjectControlLink * SubjectComposedNode::addSubjectControlLink | ( | SubjectNode * | sno, |
SubjectNode * | sni | ||
) |
Definition at line 1551 of file guiObservers.cxx.
References YACS::HMI::SubjectNode::_listSubjectControlLink, YACS::HMI::GuiContext::_mapOfSubjectControlLink, YACS::HMI::ADDCONTROLLINK, YACS::HMI::SubjectNode::addSubjectControlLink(), YACS::HMI::CONTROLLINK, DEBTRACE, YACS::HMI::GuiContext::getCurrent(), YACS::HMI::SubjectNode::getName(), YACS::HMI::SubjectControlLink::getName(), YACS::HMI::SubjectNode::getNode(), and YACS::HMI::SubjectNode::update().
Referenced by loadLinks(), YACS::HMI::CommandAddLink::localExecute(), YACS::HMI::CommandAddControlLink::localExecute(), and YACS::HMI::SubjectNode::restoreLinks().
SubjectLink * SubjectComposedNode::addSubjectLink | ( | SubjectNode * | sno, |
SubjectDataPort * | spo, | ||
SubjectNode * | sni, | ||
SubjectDataPort * | spi | ||
) |
Definition at line 1508 of file guiObservers.cxx.
References YACS::HMI::SubjectNode::_listSubjectLink, YACS::HMI::GuiContext::_mapOfSubjectLink, YACS::HMI::ADDLINK, YACS::HMI::SubjectDataPort::addSubjectLink(), YACS::HMI::DATALINK, DEBTRACE, YACS::HMI::GuiContext::getCurrent(), YACS::HMI::SubjectNode::getName(), YACS::HMI::SubjectLink::getName(), YACS::HMI::SubjectDataPort::getPort(), YACS::HMI::UPDATE, YACS::HMI::Subject::update(), and YACS::HMI::SubjectNode::update().
Referenced by loadLinks(), YACS::HMI::CommandAddLink::localExecute(), and YACS::HMI::SubjectNode::restoreLinks().
SubjectNode * SubjectComposedNode::addSubjectNode | ( | YACS::ENGINE::Node * | node, |
std::string | name = "" , |
||
YACS::ENGINE::Catalog * | catalog = 0 , |
||
std::string | compo = "" , |
||
std::string | type = "" |
||
) |
Definition at line 1385 of file guiObservers.cxx.
References YACS::HMI::GuiContext::_mapOfExecSubjectNode, YACS::HMI::GuiContext::_mapOfSubjectNode, YACS::HMI::ADD, YACS::HMI::BLOC, completeChildrenSubjectList(), YACS::HMI::CORBANODE, YACS::HMI::CPPNODE, DEBTRACE, YACS::HMI::FOREACHLOOP, YACS::HMI::FORLOOP, YACS::HMI::GuiContext::getCurrent(), YACS::ENGINE::Node::getName(), YACS::ENGINE::Node::getNumId(), YACS::HMI::ProcInvoc::getTypeOfNode(), YACS::HMI::OPTIMIZERLOOP, YACS::HMI::OUTNODE, YACS::HMI::PRESETNODE, YACS::HMI::PYFUNCNODE, YACS::HMI::PYTHONNODE, YACS::HMI::SALOMENODE, YACS::HMI::SALOMEPYTHONNODE, YACS::HMI::SubjectNode::setName(), YACS::HMI::SPLITTERNODE, YACS::HMI::STUDYINNODE, YACS::HMI::STUDYOUTNODE, YACS::HMI::SWITCH, YACS::HMI::SubjectNode::update(), YACS::HMI::WHILELOOP, YACS::HMI::XMLNODE, and YASSERT.
Referenced by loadChildren(), YACS::HMI::CommandAddNodeFromCatalog::localExecute(), YACS::HMI::CommandPutInComposedNode::localExecute(), and YACS::HMI::CommandCopyNode::localExecute().
|
virtual |
Clean process prior to delete is redefined in derived classes: a local clean treatment relative to the derived class, then a call to the parent class clean method.
Reimplemented from YACS::HMI::SubjectNode.
Reimplemented in YACS::HMI::SubjectOptimizerLoop, YACS::HMI::SubjectForEachLoop, YACS::HMI::SubjectDynParaLoop, YACS::HMI::SubjectSwitch, YACS::HMI::SubjectWhileLoop, YACS::HMI::SubjectForLoop, YACS::HMI::SubjectProc, and YACS::HMI::SubjectBloc.
Definition at line 1330 of file guiObservers.cxx.
References YACS::HMI::Subject::_askRegisterUndo, YACS::HMI::SubjectNode::clean(), localclean(), and YACS::HMI::SubjectNode::registerUndoDestroy().
Referenced by YACS::HMI::SubjectBloc::clean(), YACS::HMI::SubjectForLoop::clean(), YACS::HMI::SubjectWhileLoop::clean(), YACS::HMI::SubjectSwitch::clean(), and YACS::HMI::SubjectDynParaLoop::clean().
|
virtual |
Reimplemented in YACS::HMI::SubjectForEachLoop, YACS::HMI::SubjectDynParaLoop, YACS::HMI::SubjectSwitch, YACS::HMI::SubjectWhileLoop, YACS::HMI::SubjectForLoop, and YACS::HMI::SubjectBloc.
Definition at line 1471 of file guiObservers.cxx.
Referenced by addSubjectNode().
|
protectedvirtual |
Definition at line 1358 of file guiObservers.cxx.
References YACS::HMI::SubjectNode::_node, YACS::HMI::Invocator::add(), YACS::HMI::Command::execute(), YACS::ENGINE::ComposedNode::getChildName(), YACS::HMI::GuiContext::getCurrent(), YACS::HMI::GuiContext::getInvoc(), YACS::HMI::CommandAddNodeFromCatalog::getNode(), YACS::HMI::GuiContext::getProc(), and YACS::HMI::CommandAddNodeFromCatalog::getSubjectNode().
Referenced by YACS::HMI::SubjectBloc::addNode(), YACS::HMI::SubjectForLoop::addNode(), YACS::HMI::SubjectWhileLoop::addNode(), YACS::HMI::SubjectSwitch::addNode(), and YACS::HMI::SubjectDynParaLoop::addNode().
|
inlinevirtual |
Reimplemented in YACS::HMI::SubjectDynParaLoop, YACS::HMI::SubjectSwitch, YACS::HMI::SubjectWhileLoop, YACS::HMI::SubjectForLoop, and YACS::HMI::SubjectBloc.
Definition at line 357 of file guiObservers.hxx.
Referenced by YACS::HMI::GuiEditor::_createNode().
|
static |
Retrieves the lowest common ancestor of 2 nodes.
Exception | : if 'node1' and 'node2' do not share the same genealogy. |
Definition at line 1681 of file guiObservers.cxx.
References YACS::HMI::GuiContext::_mapOfSubjectNode, YACS::HMI::GuiContext::getCurrent(), YACS::ENGINE::Node::getFather(), and YACS::HMI::SubjectNode::getNode().
|
virtual |
used in derived classes using a counter, a selector, or a condition: ForLoop, ForEachLoop, Switch, WhileLoop.
Reimplemented in YACS::HMI::SubjectDynParaLoop, YACS::HMI::SubjectSwitch, YACS::HMI::SubjectWhileLoop, and YACS::HMI::SubjectForLoop.
Definition at line 1702 of file guiObservers.cxx.
Referenced by YACS::HMI::SchemaComposedNodeItem::SchemaComposedNodeItem(), YACS::HMI::SchemaComposedNodeItem::update(), YACS::HMI::EditionWhile::update(), YACS::HMI::EditionLoop::update(), YACS::HMI::EditionForEachLoop::update(), YACS::HMI::EditionOptimizerLoop::update(), and YACS::HMI::EditionSwitch::update().
|
virtual |
used in derived classes using a counter, a selector, or a condition: ForLoop, ForEachLoop, Switch, WhileLoop.
Reimplemented in YACS::HMI::SubjectDynParaLoop, YACS::HMI::SubjectSwitch, YACS::HMI::SubjectWhileLoop, and YACS::HMI::SubjectForLoop.
Definition at line 1694 of file guiObservers.cxx.
Referenced by YACS::HMI::SchemaComposedNodeItem::SchemaComposedNodeItem(), and YACS::HMI::SchemaComposedNodeItem::update().
|
virtual |
Reimplemented in YACS::HMI::SubjectDynParaLoop, YACS::HMI::SubjectSwitch, YACS::HMI::SubjectWhileLoop, YACS::HMI::SubjectForLoop, and YACS::HMI::SubjectBloc.
Definition at line 1607 of file guiObservers.cxx.
Referenced by YACS::HMI::CommandReparentNode::localExecute(), YACS::HMI::CommandPutInComposedNode::localExecute(), YACS::HMI::CommandReparentNode::localReverse(), and YACS::HMI::CommandPutInComposedNode::localReverse().
|
virtual |
Reimplemented from YACS::HMI::Subject.
Definition at line 1475 of file guiObservers.cxx.
References _composedNode, YACS::HMI::SubjectNode::addSubjectInputPort(), addSubjectNode(), YACS::HMI::SubjectNode::addSubjectOutputPort(), YACS::ENGINE::ComposedNode::edGetDirectDescendants(), YACS::ENGINE::Node::getChildByName(), YACS::ENGINE::ComposedNode::getLocalInputPorts(), YACS::ENGINE::ComposedNode::getLocalOutputPorts(), YACS::ENGINE::ComposedNode::getSetOfInputDataStreamPort(), YACS::ENGINE::ComposedNode::getSetOfOutputDataStreamPort(), and YACS::HMI::Subject::loadChildren().
Referenced by YACS::HMI::SubjectProc::loadProc().
|
virtual |
loadLinks is used when an existing scheme has been loaded in memory, to create gui representation. Gui representation of links is done after node representation (loadChildren). Proc is explored recursively to find the composedNodes and create the corresponding links representation, from bottom to top. For each composedNode, data links representation are created first and stored in a map to avoid double representation. Then control links representation are created.
Reimplemented from YACS::HMI::Subject.
Definition at line 1619 of file guiObservers.cxx.
References _composedNode, YACS::HMI::GuiContext::_mapOfSubjectDataPort, YACS::HMI::GuiContext::_mapOfSubjectLink, YACS::HMI::GuiContext::_mapOfSubjectNode, addSubjectControlLink(), addSubjectLink(), DEBTRACE, YACS::ENGINE::ComposedNode::edGetDirectDescendants(), YACS::ENGINE::OutGate::edSetInGate(), YACS::HMI::GuiContext::getCurrent(), YACS::ENGINE::DataPort::getName(), YACS::ENGINE::Node::getName(), YACS::ENGINE::Port::getNode(), YACS::ENGINE::ComposedNode::getSetOfInternalLinks(), loadLinks(), and YASSERT.
Referenced by loadLinks(), and YACS::HMI::SubjectProc::loadProc().
void SubjectComposedNode::localclean | ( | Command * | command = 0 | ) |
|
virtual |
Definition at line 1571 of file guiObservers.cxx.
References YACS::HMI::SubjectNode::_listSubjectControlLink, YACS::HMI::GuiContext::_mapOfSubjectControlLink, DEBTRACE, YACS::HMI::GuiContext::getCurrent(), YACS::ENGINE::Node::getName(), YACS::HMI::SubjectNode::getName(), YACS::HMI::SubjectNode::getNode(), YACS::HMI::SubjectControlLink::getSubjectInNode(), YACS::HMI::SubjectControlLink::getSubjectOutNode(), and YACS::HMI::SubjectNode::removeSubjectControlLink().
|
virtual |
Reimplemented from YACS::HMI::SubjectNode.
Definition at line 1589 of file guiObservers.cxx.
References DEBTRACE, YACS::HMI::Subject::erase(), YACS::HMI::SubjectNode::getName(), YACS::HMI::SubjectNode::getNode(), YACS::HMI::SubjectNode::getSubjectControlLinks(), and YACS::ENGINE::ComposedNode::isInMyDescendance().
|
virtual |
Definition at line 1533 of file guiObservers.cxx.
References YACS::HMI::SubjectNode::_listSubjectLink, YACS::HMI::GuiContext::_mapOfSubjectLink, DEBTRACE, YACS::HMI::GuiContext::getCurrent(), YACS::ENGINE::DataPort::getName(), YACS::HMI::SubjectLink::getName(), YACS::HMI::SubjectDataPort::getPort(), YACS::HMI::SubjectLink::getSubjectInPort(), YACS::HMI::SubjectLink::getSubjectOutPort(), and YACS::HMI::SubjectDataPort::removeSubjectLink().
|
protected |
Definition at line 388 of file guiObservers.hxx.
Referenced by loadChildren(), and loadLinks().