Version: 9.15.0
YACS::HMI::SubjectInputDataStreamPort Class Reference

#include <guiObservers.hxx>

Inheritance diagram for YACS::HMI::SubjectInputDataStreamPort:
Collaboration diagram for YACS::HMI::SubjectInputDataStreamPort:

Public Member Functions

 SubjectInputDataStreamPort (YACS::ENGINE::InputDataStreamPort *port, Subject *parent)
 
virtual ~SubjectInputDataStreamPort ()
 
virtual bool setProperties (std::map< std::string, std::string > properties)
 
virtual std::map< std::string, std::string > getProperties ()
 
virtual std::vector< std::string > knownProperties ()
 
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 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 void notifyObserverFromClone (Node *originalInstance, const std::string &event, Node *clonedInstanceGeneratingEvent)
 
virtual ~Observer ()
 

Protected Attributes

YACS::ENGINE::InputDataStreamPort_inputDataStreamPort
 
- 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)
 
- Static Public Member Functions inherited from YACS::HMI::Subject
static void erase (Subject *sub, Command *command=0, bool post=false)
 

Detailed Description

Definition at line 253 of file guiObservers.hxx.

Constructor & Destructor Documentation

◆ SubjectInputDataStreamPort()

SubjectInputDataStreamPort::SubjectInputDataStreamPort ( YACS::ENGINE::InputDataStreamPort port,
Subject parent 
)

Definition at line 3857 of file guiObservers.cxx.

3859  : SubjectDataPort(port, parent), _inputDataStreamPort(port)
3860 {
3861 }
SubjectDataPort(YACS::ENGINE::DataPort *port, Subject *parent)
YACS::ENGINE::InputDataStreamPort * _inputDataStreamPort

◆ ~SubjectInputDataStreamPort()

SubjectInputDataStreamPort::~SubjectInputDataStreamPort ( )
virtual

Definition at line 3863 of file guiObservers.cxx.

3864 {
3865  DEBTRACE("SubjectInputDataStreamPort::~SubjectInputDataStreamPort " << getName());
3866 }
#define DEBTRACE(msg)
Definition: YacsTrace.hxx:31
virtual std::string getName()

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

Member Function Documentation

◆ clean()

void SubjectInputDataStreamPort::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 3900 of file guiObservers.cxx.

3901 {
3902  if (_askRegisterUndo)
3903  {
3904  _askRegisterUndo = false;
3906  }
3907  localclean(command);
3908  SubjectDataPort::clean(command);
3909 }
virtual void clean(Command *command=0)
void localclean(Command *command=0)

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

◆ getProperties()

std::map< std::string, std::string > SubjectInputDataStreamPort::getProperties ( )
virtual

Reimplemented from YACS::HMI::Subject.

Definition at line 3868 of file guiObservers.cxx.

3869 {
3871 }
std::map< std::string, std::string > getProperties() const

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

Referenced by registerUndoDestroy().

◆ getType()

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

Reimplemented from YACS::HMI::Subject.

Definition at line 263 of file guiObservers.hxx.

263 {return INPUTDATASTREAMPORT;}
@ INPUTDATASTREAMPORT

References YACS::HMI::INPUTDATASTREAMPORT.

◆ knownProperties()

std::vector< std::string > SubjectInputDataStreamPort::knownProperties ( )
virtual

Reimplemented from YACS::HMI::Subject.

Definition at line 3873 of file guiObservers.cxx.

3874 {
3875  std::vector<std::string> props;
3876  props.push_back("StorageLevel");
3877  //props.push_back("DependencyType");
3878  props.push_back("DateCalSchem");
3879  props.push_back("Alpha");
3880  props.push_back("DeltaT");
3881  props.push_back("InterpolationSchem");
3882  props.push_back("ExtrapolationSchem");
3883  return props;
3884 }

◆ localclean()

void SubjectInputDataStreamPort::localclean ( Command command = 0)

Definition at line 3911 of file guiObservers.cxx.

3912 {
3913  DEBTRACE("SubjectInputDataStreamPort::localClean ");
3914 }

References DEBTRACE.

Referenced by clean().

◆ registerUndoDestroy()

void SubjectInputDataStreamPort::registerUndoDestroy ( )

Definition at line 3916 of file guiObservers.cxx.

3917 {
3918  DEBTRACE("SubjectInputDataStreamPort::registerUndoDestroy");
3920  map<string,string> properties = getProperties();
3921  if (properties.empty())
3922  return;
3923  Proc *proc = GuiContext::getCurrent()->getProc();
3924  SubjectNode *sno = dynamic_cast<SubjectNode*>(getParent());
3925  YASSERT(sno);
3926  Node *node = sno->getNode();
3927  string nodeName = proc->getChildName(node);
3928  string portName = getName();
3929  Command *command = new CommandSetDSPortProperties(nodeName, portName, true, properties);
3930  GuiContext::getCurrent()->getInvoc()->add(command);
3931 }
#define YASSERT(val)
YASSERT macro is always defined, used like assert, but throw a YACS::Exception instead of abort.
Definition: YacsTrace.hxx:59
std::string getChildName(const Node *node) const
Base class for all nodes.
Definition: Node.hxx:70
Base class for all schema objects.
Definition: Proc.hxx:44
YACS::ENGINE::Proc * getProc()
Definition: guiContext.hxx:50
YACS::HMI::ProcInvoc * getInvoc()
Definition: guiContext.hxx:51
static GuiContext * getCurrent()
Definition: guiContext.hxx:67
void add(Command *command)
Definition: commands.cxx:156
virtual std::map< std::string, std::string > getProperties()
virtual YACS::ENGINE::Node * getNode()
virtual Subject * getParent()

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().

◆ setProperties()

bool SubjectInputDataStreamPort::setProperties ( std::map< std::string, std::string >  properties)
virtual

Reimplemented from YACS::HMI::Subject.

Definition at line 3886 of file guiObservers.cxx.

3887 {
3888  Proc *proc = GuiContext::getCurrent()->getProc();
3889  CommandSetDSPortProperties *command =
3890  new CommandSetDSPortProperties(proc->getChildName(getPort()->getNode()), getName(), true, properties);
3891  if (command->execute())
3892  {
3893  GuiContext::getCurrent()->getInvoc()->add(command);
3894  return true;
3895  }
3896  else delete command;
3897  return false;
3898 }
virtual bool execute()
the command is executed a first time after its registration for undo redo, then on redo
Definition: commands.cxx:51
virtual YACS::ENGINE::DataPort * getPort()

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().

Member Data Documentation

◆ _inputDataStreamPort

YACS::ENGINE::InputDataStreamPort* YACS::HMI::SubjectInputDataStreamPort::_inputDataStreamPort
protected

Definition at line 266 of file guiObservers.hxx.

Referenced by getProperties().


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