Version: 8.3.0
YACS::HMI::SubjectBloc Class Reference

#include <guiObservers.hxx>

Inheritance diagram for YACS::HMI::SubjectBloc:
Collaboration diagram for YACS::HMI::SubjectBloc:

Public Member Functions

 SubjectBloc (YACS::ENGINE::Bloc *bloc, Subject *parent)
 
virtual ~SubjectBloc ()
 
virtual SubjectNodeaddNode (YACS::ENGINE::Catalog *catalog, std::string compo, std::string type, std::string name, bool newCompoInst)
 
virtual void removeNode (SubjectNode *child)
 
virtual void completeChildrenSubjectList (SubjectNode *son)
 
virtual SubjectNodegetChild (YACS::ENGINE::Node *node=0) const
 
virtual void recursiveUpdate (GuiEvent event, int type, Subject *son)
 
virtual void houseKeepingAfterCutPaste (bool isCut, SubjectNode *son)
 
virtual void clean (Command *command=0)
 
void localclean (Command *command=0)
 
virtual TypeOfElem getType ()
 
- 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 ()
 
virtual bool hasValue ()
 
virtual std::string getValue ()
 
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 ~Observer ()
 

Protected Attributes

YACS::ENGINE::Bloc_bloc
 
std::set< SubjectNode * > _children
 
- 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...
 
- 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)
 

Detailed Description

Definition at line 391 of file guiObservers.hxx.

Constructor & Destructor Documentation

SubjectBloc::SubjectBloc ( YACS::ENGINE::Bloc bloc,
Subject parent 
)

Definition at line 1710 of file guiObservers.cxx.

References _children.

1711  : SubjectComposedNode(bloc, parent), _bloc(bloc)
1712 {
1713  _children.clear();
1714 }
SubjectBloc::~SubjectBloc ( )
virtual

all generic destruction is done in generic class SubjectNode

Definition at line 1719 of file guiObservers.cxx.

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

1720 {
1721  DEBTRACE("SubjectBloc::~SubjectBloc " << getName());
1722 }

Member Function Documentation

SubjectNode * SubjectBloc::addNode ( YACS::ENGINE::Catalog catalog,
std::string  compo,
std::string  type,
std::string  name,
bool  newCompoInst 
)
virtual

Reimplemented from YACS::HMI::SubjectComposedNode.

Definition at line 1744 of file guiObservers.cxx.

References YACS::HMI::SubjectComposedNode::createNode(), and DEBTRACE.

Referenced by YACS::HMI::GuiEditor::_createNode(), and gui.GraphViewer.GraphViewer::popup().

1749 {
1750  DEBTRACE("SubjectBloc::addNode( " << catalog << ", " << compo << ", " << type << ", " << name << " )");
1751  SubjectNode* child = createNode(catalog, compo, type, name, newCompoInst);
1752  return child;
1753 }
void SubjectBloc::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::SubjectComposedNode.

Reimplemented in YACS::HMI::SubjectProc.

Definition at line 1724 of file guiObservers.cxx.

References YACS::HMI::Subject::_askRegisterUndo, YACS::HMI::SubjectComposedNode::clean(), localclean(), and YACS::HMI::SubjectNode::registerUndoDestroy().

Referenced by YACS::HMI::SubjectProc::clean().

1725 {
1726  if (_askRegisterUndo)
1727  {
1728  _askRegisterUndo = false;
1730  }
1731  localclean(command);
1732  SubjectComposedNode::clean(command);
1733 }
void SubjectBloc::completeChildrenSubjectList ( SubjectNode son)
virtual

Reimplemented from YACS::HMI::SubjectComposedNode.

Definition at line 1763 of file guiObservers.cxx.

References _children.

Referenced by houseKeepingAfterCutPaste().

1764 {
1765  _children.insert(son);
1766 }
SubjectNode * SubjectBloc::getChild ( YACS::ENGINE::Node node = 0) const
virtual

Reimplemented from YACS::HMI::SubjectComposedNode.

Definition at line 1773 of file guiObservers.cxx.

References _children.

1774 {
1775  SubjectNode* aChild = 0;
1776 
1777  if (node)
1778  {
1779  set<SubjectNode*>::const_iterator it = _children.begin();
1780  for ( ; it != _children.end(); it++ )
1781  if ( (*it)->getNode() == node )
1782  {
1783  aChild = (*it);
1784  break;
1785  }
1786  }
1787 
1788  return aChild;
1789 }
virtual TypeOfElem YACS::HMI::SubjectBloc::getType ( )
inlinevirtual

Reimplemented from YACS::HMI::Subject.

Reimplemented in YACS::HMI::SubjectProc.

Definition at line 408 of file guiObservers.hxx.

References YACS::HMI::BLOC.

408 {return BLOC;}
void SubjectBloc::houseKeepingAfterCutPaste ( bool  isCut,
SubjectNode son 
)
virtual

Reimplemented from YACS::HMI::SubjectComposedNode.

Definition at line 1755 of file guiObservers.cxx.

References completeChildrenSubjectList(), and removeNode().

1756 {
1757  if (isCut)
1758  removeNode(son);
1759  else
1761 }
void SubjectBloc::localclean ( Command command = 0)

Definition at line 1735 of file guiObservers.cxx.

References _children, DEBTRACE, and YACS::HMI::Subject::erase().

Referenced by clean().

1736 {
1737  DEBTRACE("SubjectBloc::localClean ");
1738  set<SubjectNode*>::iterator it;
1739  set<SubjectNode*> copyChildren = _children;
1740  for (it = copyChildren.begin(); it !=copyChildren.end(); ++it)
1741  erase(*it);
1742 }
void SubjectBloc::recursiveUpdate ( GuiEvent  event,
int  type,
Subject son 
)
virtual

Reimplemented from YACS::HMI::SubjectNode.

Definition at line 1791 of file guiObservers.cxx.

References _children, and YACS::HMI::SubjectNode::update().

1792 {
1793  update(event, type, son);
1794  set<SubjectNode*>::iterator it = _children.begin();
1795  for (; it != _children.end(); ++it)
1796  (*it)->recursiveUpdate(event, type, son);
1797 }
void SubjectBloc::removeNode ( SubjectNode child)
virtual

Definition at line 1768 of file guiObservers.cxx.

References _children.

Referenced by houseKeepingAfterCutPaste().

1769 {
1770  _children.erase(child);
1771 }

Member Data Documentation

YACS::ENGINE::Bloc* YACS::HMI::SubjectBloc::_bloc
protected

Definition at line 410 of file guiObservers.hxx.

std::set<SubjectNode*> YACS::HMI::SubjectBloc::_children
protected

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