Version: 8.3.0
YACS::HMI::SubjectOutputDataStreamPort Class Reference

#include <guiObservers.hxx>

Inheritance diagram for YACS::HMI::SubjectOutputDataStreamPort:
Collaboration diagram for YACS::HMI::SubjectOutputDataStreamPort:

Public Member Functions

 SubjectOutputDataStreamPort (YACS::ENGINE::OutputDataStreamPort *port, Subject *parent)
 
virtual ~SubjectOutputDataStreamPort ()
 
virtual bool setProperties (std::map< std::string, std::string > properties)
 
virtual std::map< std::string,
std::string > 
getProperties ()
 
virtual void clean (Command *command=0)
 
void localclean (Command *command=0)
 
virtual TypeOfElem getType ()
 
void registerUndoDestroy ()
 
- Public Member Functions inherited from YACS::HMI::SubjectDataPort
 SubjectDataPort (YACS::ENGINE::DataPort *port, Subject *parent)
 
virtual ~SubjectDataPort ()
 
virtual std::string getName ()
 
virtual bool setName (std::string name)
 
virtual YACS::ENGINE::DataPortgetPort ()
 
void localclean (Command *command=0)
 
void addSubjectLink (SubjectLink *subject)
 
void removeSubjectLink (SubjectLink *subject)
 
std::list< SubjectLink * > getListOfSubjectLink ()
 
virtual bool setValue (std::string value)
 
void setExecValue (std::string value)
 
std::string getExecValue ()
 
void registerUndoDestroy ()
 
- 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 void update (GuiEvent event, int type, Subject *son)
 
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 loadChildren ()
 
virtual void loadLinks ()
 
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 notifyObserver (Node *object, const std::string &event)
 
virtual void notifyObserver2 (Node *object, const std::string &event, void *something)
 
virtual ~Observer ()
 

Protected Attributes

YACS::ENGINE::OutputDataStreamPort_outputDataStreamPort
 
- Protected Attributes inherited from YACS::HMI::SubjectDataPort
YACS::ENGINE::DataPort_dataPort
 
std::list< SubjectLink * > _listSubjectLink
 
std::string _execValue
 
- 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::SubjectDataPort
static bool tryCreateLink (SubjectDataPort *subOutport, SubjectDataPort *subInport, bool control=true)
 

Detailed Description

Definition at line 268 of file guiObservers.hxx.

Constructor & Destructor Documentation

SubjectOutputDataStreamPort::SubjectOutputDataStreamPort ( YACS::ENGINE::OutputDataStreamPort port,
Subject parent 
)

Definition at line 3932 of file guiObservers.cxx.

3934  : SubjectDataPort(port, parent), _outputDataStreamPort(port)
3935 {
3936 }
SubjectOutputDataStreamPort::~SubjectOutputDataStreamPort ( )
virtual

Definition at line 3938 of file guiObservers.cxx.

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

3939 {
3940  DEBTRACE("SubjectOutputDataStreamPort::~SubjectOutputDataStreamPort " << getName());
3941 }

Member Function Documentation

void SubjectOutputDataStreamPort::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::SubjectDataPort.

Definition at line 3962 of file guiObservers.cxx.

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

3963 {
3964  if (_askRegisterUndo)
3965  {
3966  _askRegisterUndo = false;
3968  }
3969  localclean(command);
3970  SubjectDataPort::clean(command);
3971 }
std::map< std::string, std::string > SubjectOutputDataStreamPort::getProperties ( )
virtual

Reimplemented from YACS::HMI::Subject.

Definition at line 3943 of file guiObservers.cxx.

References _outputDataStreamPort, and YACS::ENGINE::DataStreamPort::getProperties().

Referenced by registerUndoDestroy().

3944 {
3946 }
virtual TypeOfElem YACS::HMI::SubjectOutputDataStreamPort::getType ( )
inlinevirtual

Reimplemented from YACS::HMI::Subject.

Definition at line 277 of file guiObservers.hxx.

References YACS::HMI::OUTPUTDATASTREAMPORT.

277 {return OUTPUTDATASTREAMPORT;}
void SubjectOutputDataStreamPort::localclean ( Command command = 0)

Definition at line 3973 of file guiObservers.cxx.

References DEBTRACE.

Referenced by clean().

3974 {
3975  DEBTRACE("SubjectOutputDataStreamPort::localClean ");
3976 }
void SubjectOutputDataStreamPort::registerUndoDestroy ( )

Definition at line 3978 of file guiObservers.cxx.

References YACS::HMI::Invocator::add(), DEBTRACE, YACS::ENGINE::ComposedNode::getChildName(), YACS::HMI::GuiContext::getCurrent(), YACS::HMI::GuiContext::getInvoc(), YACS::HMI::SubjectDataPort::getName(), YACS::HMI::SubjectNode::getNode(), YACS::HMI::Subject::getParent(), YACS::HMI::GuiContext::getProc(), getProperties(), YACS::HMI::SubjectDataPort::registerUndoDestroy(), and YASSERT.

Referenced by clean().

3979 {
3980  DEBTRACE("SubjectOutputDataStreamPort::registerUndoDestroy");
3982  map<string,string> properties = getProperties();
3983  if (properties.empty())
3984  return;
3985  Proc *proc = GuiContext::getCurrent()->getProc();
3986  SubjectNode *sno = dynamic_cast<SubjectNode*>(getParent());
3987  YASSERT(sno);
3988  Node *node = sno->getNode();
3989  string nodeName = proc->getChildName(node);
3990  string portName = getName();
3991  Command *command = new CommandSetDSPortProperties(nodeName, portName, false, properties);
3992  GuiContext::getCurrent()->getInvoc()->add(command);
3993 }
bool SubjectOutputDataStreamPort::setProperties ( std::map< std::string, std::string >  properties)
virtual

Reimplemented from YACS::HMI::Subject.

Definition at line 3948 of file guiObservers.cxx.

References YACS::HMI::Invocator::add(), YACS::HMI::Command::execute(), YACS::ENGINE::ComposedNode::getChildName(), YACS::HMI::GuiContext::getCurrent(), YACS::HMI::GuiContext::getInvoc(), YACS::HMI::SubjectDataPort::getName(), YACS::HMI::SubjectDataPort::getPort(), and YACS::HMI::GuiContext::getProc().

3949 {
3950  Proc *proc = GuiContext::getCurrent()->getProc();
3951  CommandSetDSPortProperties *command =
3952  new CommandSetDSPortProperties(proc->getChildName(getPort()->getNode()), getName(), false, properties);
3953  if (command->execute())
3954  {
3955  GuiContext::getCurrent()->getInvoc()->add(command);
3956  return true;
3957  }
3958  else delete command;
3959  return false;
3960 }

Member Data Documentation

YACS::ENGINE::OutputDataStreamPort* YACS::HMI::SubjectOutputDataStreamPort::_outputDataStreamPort
protected

Definition at line 280 of file guiObservers.hxx.

Referenced by getProperties().


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