Version: 9.15.0
YACS::HMI::SubjectForEachLoop Class Reference

#include <guiObservers.hxx>

Inheritance diagram for YACS::HMI::SubjectForEachLoop:
Collaboration diagram for YACS::HMI::SubjectForEachLoop:

Public Member Functions

 SubjectForEachLoop (YACS::ENGINE::ForEachLoopGen *forEachLoop, Subject *parent)
 
virtual ~SubjectForEachLoop ()
 
virtual void completeChildrenSubjectList (SubjectNode *son)
 
virtual void removeNode (SubjectNode *child)
 
virtual void clean (Command *command=0)
 
void localclean (Command *command=0)
 
virtual TypeOfElem getType ()
 
- Public Member Functions inherited from YACS::HMI::SubjectDynParaLoop
 SubjectDynParaLoop (YACS::ENGINE::DynParaLoop *dynParaLoop, Subject *parent)
 
virtual ~SubjectDynParaLoop ()
 
virtual SubjectNodeaddNode (YACS::ENGINE::Catalog *catalog, std::string compo, std::string type, std::string name, bool newCompoInst)
 
virtual void recursiveUpdate (GuiEvent event, int type, Subject *son)
 
virtual SubjectNodegetChild (YACS::ENGINE::Node *node=NULL) const
 
virtual bool setNbBranches (std::string nbBranches)
 
virtual bool hasValue ()
 
virtual std::string getValue ()
 
virtual void houseKeepingAfterCutPaste (bool isCut, SubjectNode *son)
 
void localclean (Command *command=NULL)
 
- Public Member Functions inherited from YACS::HMI::SubjectComposedNode
 SubjectComposedNode (YACS::ENGINE::ComposedNode *composedNode, Subject *parent)
 
virtual ~SubjectComposedNode ()
 
virtual void loadChildren ()
 
virtual void loadLinks ()
 
SubjectNodeaddSubjectNode (YACS::ENGINE::Node *node, std::string name="", YACS::ENGINE::Catalog *catalog=0, std::string compo="", std::string type="")
 
SubjectLinkaddSubjectLink (SubjectNode *sno, SubjectDataPort *spo, SubjectNode *sni, SubjectDataPort *spi)
 
SubjectControlLinkaddSubjectControlLink (SubjectNode *sno, SubjectNode *sni)
 
virtual void removeLink (SubjectLink *link)
 
virtual void removeControlLink (SubjectControlLink *link)
 
virtual void removeExternalControlLinks ()
 
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::NodegetNode ()
 
void registerUndoDestroy ()
 
SubjectControlLinkaddSubjectControlLink (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 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 SubjectgetParent ()
 
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 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 void notifyObserverFromClone (Node *originalInstance, const std::string &event, Node *clonedInstanceGeneratingEvent)
 
virtual ~Observer ()
 

Protected Attributes

YACS::ENGINE::ForEachLoopGen_forEachLoop
 
SubjectNode_splitter
 
- Protected Attributes inherited from YACS::HMI::SubjectDynParaLoop
YACS::ENGINE::DynParaLoop_dynParaLoop
 
SubjectNode_subjectExecNode
 
SubjectNode_subjectInitNode
 
SubjectNode_subjectFinalizeNode
 
- Protected Attributes inherited from YACS::HMI::SubjectComposedNode
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
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::HMI::SubjectComposedNode
static SubjectComposedNodegetLowestCommonAncestor (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 inherited from YACS::HMI::SubjectComposedNode
virtual SubjectNodecreateNode (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 SubjectInputPortaddSubjectInputPort (YACS::ENGINE::InputPort *port, std::string name="")
 
virtual SubjectOutputPortaddSubjectOutputPort (YACS::ENGINE::OutputPort *port, std::string name="")
 
virtual SubjectInputDataStreamPortaddSubjectIDSPort (YACS::ENGINE::InputDataStreamPort *port, std::string name="")
 
virtual SubjectOutputDataStreamPortaddSubjectODSPort (YACS::ENGINE::OutputDataStreamPort *port, std::string name="")
 
virtual void notifyObserver (YACS::ENGINE::Node *object, const std::string &event)
 

Detailed Description

Definition at line 643 of file guiObservers.hxx.

Constructor & Destructor Documentation

◆ SubjectForEachLoop()

SubjectForEachLoop::SubjectForEachLoop ( YACS::ENGINE::ForEachLoopGen forEachLoop,
Subject parent 
)

Definition at line 3406 of file guiObservers.cxx.

3407  : SubjectDynParaLoop(forEachLoop, parent), _forEachLoop(forEachLoop)
3408 {
3409  _splitter = 0;
3410 }
SubjectDynParaLoop(YACS::ENGINE::DynParaLoop *dynParaLoop, Subject *parent)
YACS::ENGINE::ForEachLoopGen * _forEachLoop

References _splitter.

◆ ~SubjectForEachLoop()

SubjectForEachLoop::~SubjectForEachLoop ( )
virtual

Definition at line 3412 of file guiObservers.cxx.

3413 {
3414  DEBTRACE("SubjectForEachLoop::~SubjectForEachLoop " << getName());
3415 }
#define DEBTRACE(msg)
Definition: YacsTrace.hxx:31
virtual std::string getName()

References DEBTRACE, and YACS::HMI::SubjectNode::getName().

Member Function Documentation

◆ clean()

void SubjectForEachLoop::clean ( Command command = 0)
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::SubjectDynParaLoop.

Definition at line 3417 of file guiObservers.cxx.

3418 {
3419  if (_askRegisterUndo)
3420  {
3421  _askRegisterUndo = false;
3423  }
3424  Node* aSplitterEngine = 0;
3425  if (_splitter) aSplitterEngine = _splitter->getNode();
3426 
3427  localclean(command);
3428  SubjectDynParaLoop::clean(command);
3429 
3430  if (_forEachLoop && aSplitterEngine)
3431  {
3432  DEBTRACE("SubjectForEachLoop::clean: remove for each loop splitter");
3433  _forEachLoop->edRemoveChild(aSplitterEngine);
3434  }
3435 }
void edRemoveChild(Node *node)
Remove a child node.
Base class for all nodes.
Definition: Node.hxx:70
virtual void clean(Command *command=NULL)
void localclean(Command *command=0)
virtual YACS::ENGINE::Node * getNode()

References YACS::HMI::Subject::_askRegisterUndo, _forEachLoop, _splitter, YACS::HMI::SubjectDynParaLoop::clean(), DEBTRACE, YACS::ENGINE::DynParaLoop::edRemoveChild(), YACS::HMI::SubjectNode::getNode(), localclean(), and YACS::HMI::SubjectNode::registerUndoDestroy().

◆ completeChildrenSubjectList()

void SubjectForEachLoop::completeChildrenSubjectList ( SubjectNode son)
virtual

Reimplemented from YACS::HMI::SubjectDynParaLoop.

Definition at line 3447 of file guiObservers.cxx.

3448 {
3449  if (son && son->getName() == ForEachLoop::NAME_OF_SPLITTERNODE)
3450  _splitter = son;
3451  else
3453 }
virtual void completeChildrenSubjectList(SubjectNode *son)

References _splitter, YACS::HMI::SubjectDynParaLoop::completeChildrenSubjectList(), and YACS::HMI::SubjectNode::getName().

◆ getType()

virtual TypeOfElem YACS::HMI::SubjectForEachLoop::getType ( )
inlinevirtual

Reimplemented from YACS::HMI::Subject.

Definition at line 652 of file guiObservers.hxx.

652 {return FOREACHLOOP;}

References YACS::HMI::FOREACHLOOP.

◆ localclean()

void SubjectForEachLoop::localclean ( Command command = 0)

Definition at line 3437 of file guiObservers.cxx.

3438 {
3439  DEBTRACE("SubjectForEachLoop::localClean ");
3440  if (_splitter)
3441  {
3443  erase(_splitter);
3444  }
3445 }
static void erase(Subject *sub, Command *command=0, bool post=false)

References _splitter, DEBTRACE, YACS::HMI::Subject::erase(), and YACS::HMI::SubjectNode::getName().

Referenced by clean().

◆ removeNode()

void SubjectForEachLoop::removeNode ( SubjectNode child)
virtual

Reimplemented from YACS::HMI::SubjectDynParaLoop.

Definition at line 3455 of file guiObservers.cxx.

3456 {
3457  YASSERT(child);
3458  if (child->getName() == ForEachLoop::NAME_OF_SPLITTERNODE)
3459  _splitter = NULL;
3460  else {
3462  }
3463 }
#define YASSERT(val)
YASSERT macro is always defined, used like assert, but throw a YACS::Exception instead of abort.
Definition: YacsTrace.hxx:59
virtual void removeNode(SubjectNode *child)

References _splitter, YACS::HMI::SubjectNode::getName(), YACS::HMI::SubjectDynParaLoop::removeNode(), and YASSERT.

Member Data Documentation

◆ _forEachLoop

YACS::ENGINE::ForEachLoopGen* YACS::HMI::SubjectForEachLoop::_forEachLoop
protected

Definition at line 654 of file guiObservers.hxx.

Referenced by clean().

◆ _splitter

SubjectNode* YACS::HMI::SubjectForEachLoop::_splitter
protected

The documentation for this class was generated from the following files: