Version: 8.3.0
YACS::HMI::SubjectInlineNode Class Reference

#include <guiObservers.hxx>

Inheritance diagram for YACS::HMI::SubjectInlineNode:
Collaboration diagram for YACS::HMI::SubjectInlineNode:

Public Member Functions

 SubjectInlineNode (YACS::ENGINE::InlineNode *inlineNode, Subject *parent)
 
virtual ~SubjectInlineNode ()
 
virtual bool setScript (std::string script)
 
virtual std::string getScript ()
 
virtual void clean (Command *command=0)
 
void localclean (Command *command=0)
 
virtual bool setContainer (SubjectContainerBase *scont)
 
virtual bool setExecutionMode (const std::string &mode)
 
- Public Member Functions inherited from YACS::HMI::SubjectElementaryNode
 SubjectElementaryNode (YACS::ENGINE::ElementaryNode *elementaryNode, Subject *parent)
 
virtual ~SubjectElementaryNode ()
 
virtual void recursiveUpdate (GuiEvent event, int type, Subject *son)
 
virtual SubjectDataPortaddInputPort (YACS::ENGINE::Catalog *catalog, std::string type, std::string name)
 
virtual SubjectDataPortaddOutputPort (YACS::ENGINE::Catalog *catalog, std::string type, std::string name)
 
virtual SubjectDataPortaddIDSPort (YACS::ENGINE::Catalog *catalog, std::string type, std::string name)
 
virtual SubjectDataPortaddODSPort (YACS::ENGINE::Catalog *catalog, std::string type, std::string name)
 
virtual bool OrderDataPorts (SubjectDataPort *portToMove, int isUp)
 
virtual void removePort (SubjectDataPort *port)
 
virtual void loadChildren ()
 
void localclean (Command *command=0)
 
virtual void saveLinks ()
 
virtual void restoreLinks ()
 
- 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 removeExternalControlLinks ()
 
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 loadLinks ()
 
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 ()
 

Protected Attributes

YACS::ENGINE::InlineNode_inlineNode
 
- Protected Attributes inherited from YACS::HMI::SubjectElementaryNode
YACS::ENGINE::ElementaryNode_elementaryNode
 
- 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::SubjectNode
static bool tryCreateLink (SubjectNode *subOutNode, SubjectNode *subInNode)
 
- 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
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)
 

Detailed Description

Definition at line 691 of file guiObservers.hxx.

Constructor & Destructor Documentation

SubjectInlineNode::SubjectInlineNode ( YACS::ENGINE::InlineNode inlineNode,
Subject parent 
)

Definition at line 2264 of file guiObservers.cxx.

2265  : SubjectElementaryNode(inlineNode, parent), _inlineNode(inlineNode)
2266 {
2267 }
SubjectInlineNode::~SubjectInlineNode ( )
virtual

Definition at line 2269 of file guiObservers.cxx.

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

2270 {
2271  DEBTRACE("SubjectInlineNode::~SubjectInlineNode " << getName());
2272 }

Member Function Documentation

void SubjectInlineNode::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::SubjectElementaryNode.

Reimplemented in YACS::HMI::SubjectPyFuncNode, and YACS::HMI::SubjectPythonNode.

Definition at line 2293 of file guiObservers.cxx.

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

Referenced by YACS::HMI::SubjectPythonNode::clean(), and YACS::HMI::SubjectPyFuncNode::clean().

2294 {
2295  if (_askRegisterUndo)
2296  {
2297  _askRegisterUndo = false;
2299  }
2300  localclean(command);
2302 }
std::string SubjectInlineNode::getScript ( )
virtual

Definition at line 2288 of file guiObservers.cxx.

References _inlineNode, and YACS::ENGINE::InlineNode::getScript().

Referenced by YACS::HMI::EditionScript::onCancel().

2289 {
2290  return _inlineNode->getScript();
2291 }
void SubjectInlineNode::localclean ( Command command = 0)

Definition at line 2304 of file guiObservers.cxx.

References DEBTRACE.

Referenced by clean().

2305 {
2306  DEBTRACE("SubjectInlineNode::localClean ");
2307 }
bool SubjectInlineNode::setContainer ( SubjectContainerBase scont)
virtual

Definition at line 2326 of file guiObservers.cxx.

References YACS::HMI::SubjectNode::_node, YACS::HMI::Invocator::add(), DEBTRACE, YACS::HMI::Command::execute(), YACS::ENGINE::ComposedNode::getChildName(), YACS::HMI::GuiContext::getCurrent(), YACS::HMI::GuiContext::getInvoc(), YACS::HMI::SubjectContainerBase::getName(), YACS::HMI::GuiContext::getProc(), and YACS::HMI::GuiContext::isLoading().

Referenced by YACS::HMI::EditionScript::changeContainer().

2327 {
2328  DEBTRACE("SubjectInlineNode::setContainer ");
2329  Proc *proc = GuiContext::getCurrent()->getProc();
2330 
2331  CommandSetContainer *command = new CommandSetContainer(proc->getChildName(_node), scont->getName());
2332  if (command->execute())
2333  {
2334  if (!GuiContext::getCurrent()->isLoading()) // do not register command when loading a schema
2335  GuiContext::getCurrent()->getInvoc()->add(command);
2336  else delete command;
2337  return true;
2338  }
2339  else delete command;
2340  return false;
2341 }
bool SubjectInlineNode::setExecutionMode ( const std::string &  mode)
virtual

Definition at line 2309 of file guiObservers.cxx.

References YACS::HMI::SubjectNode::_node, YACS::HMI::Invocator::add(), DEBTRACE, YACS::HMI::Command::execute(), YACS::ENGINE::ComposedNode::getChildName(), YACS::HMI::GuiContext::getCurrent(), YACS::HMI::GuiContext::getInvoc(), YACS::HMI::GuiContext::getProc(), and YACS::HMI::GuiContext::isLoading().

Referenced by YACS::HMI::EditionScript::on_remote_toggled().

2310 {
2311  DEBTRACE("SubjectInlineNode::setExecutionMode ");
2312  Proc *proc = GuiContext::getCurrent()->getProc();
2313 
2315  if (command->execute())
2316  {
2317  if (!GuiContext::getCurrent()->isLoading()) // do not register command when loading a schema
2318  GuiContext::getCurrent()->getInvoc()->add(command);
2319  else delete command;
2320  return true;
2321  }
2322  else delete command;
2323  return false;
2324 }
bool SubjectInlineNode::setScript ( std::string  script)
virtual

Definition at line 2274 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(), and YACS::HMI::GuiContext::getProc().

Referenced by YACS::HMI::EditionScript::onApply().

2275 {
2276  Proc *proc = GuiContext::getCurrent()->getProc();
2277  CommandSetInlineNodeScript *command =
2278  new CommandSetInlineNodeScript(proc->getChildName(_node), script);
2279  if (command->execute())
2280  {
2281  GuiContext::getCurrent()->getInvoc()->add(command);
2282  return true;
2283  }
2284  else delete command;
2285  return false;
2286 }

Member Data Documentation

YACS::ENGINE::InlineNode* YACS::HMI::SubjectInlineNode::_inlineNode
protected

Definition at line 703 of file guiObservers.hxx.

Referenced by getScript().


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