Version: 8.3.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 ~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)
 

Detailed Description

Definition at line 252 of file guiObservers.hxx.

Constructor & Destructor Documentation

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

Definition at line 3854 of file guiObservers.cxx.

3856  : SubjectDataPort(port, parent), _inputDataStreamPort(port)
3857 {
3858 }
SubjectInputDataStreamPort::~SubjectInputDataStreamPort ( )
virtual

Definition at line 3860 of file guiObservers.cxx.

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

3861 {
3862  DEBTRACE("SubjectInputDataStreamPort::~SubjectInputDataStreamPort " << getName());
3863 }

Member Function Documentation

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 3897 of file guiObservers.cxx.

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

3898 {
3899  if (_askRegisterUndo)
3900  {
3901  _askRegisterUndo = false;
3903  }
3904  localclean(command);
3905  SubjectDataPort::clean(command);
3906 }
std::map< std::string, std::string > SubjectInputDataStreamPort::getProperties ( )
virtual

Reimplemented from YACS::HMI::Subject.

Definition at line 3865 of file guiObservers.cxx.

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

Referenced by registerUndoDestroy().

3866 {
3868 }
virtual TypeOfElem YACS::HMI::SubjectInputDataStreamPort::getType ( )
inlinevirtual

Reimplemented from YACS::HMI::Subject.

Definition at line 262 of file guiObservers.hxx.

References YACS::HMI::INPUTDATASTREAMPORT.

262 {return INPUTDATASTREAMPORT;}
std::vector< std::string > SubjectInputDataStreamPort::knownProperties ( )
virtual

Reimplemented from YACS::HMI::Subject.

Definition at line 3870 of file guiObservers.cxx.

3871 {
3872  std::vector<std::string> props;
3873  props.push_back("StorageLevel");
3874  //props.push_back("DependencyType");
3875  props.push_back("DateCalSchem");
3876  props.push_back("Alpha");
3877  props.push_back("DeltaT");
3878  props.push_back("InterpolationSchem");
3879  props.push_back("ExtrapolationSchem");
3880  return props;
3881 }
void SubjectInputDataStreamPort::localclean ( Command command = 0)

Definition at line 3908 of file guiObservers.cxx.

References DEBTRACE.

Referenced by clean().

3909 {
3910  DEBTRACE("SubjectInputDataStreamPort::localClean ");
3911 }
void SubjectInputDataStreamPort::registerUndoDestroy ( )

Definition at line 3913 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().

3914 {
3915  DEBTRACE("SubjectInputDataStreamPort::registerUndoDestroy");
3917  map<string,string> properties = getProperties();
3918  if (properties.empty())
3919  return;
3920  Proc *proc = GuiContext::getCurrent()->getProc();
3921  SubjectNode *sno = dynamic_cast<SubjectNode*>(getParent());
3922  YASSERT(sno);
3923  Node *node = sno->getNode();
3924  string nodeName = proc->getChildName(node);
3925  string portName = getName();
3926  Command *command = new CommandSetDSPortProperties(nodeName, portName, true, properties);
3927  GuiContext::getCurrent()->getInvoc()->add(command);
3928 }
bool SubjectInputDataStreamPort::setProperties ( std::map< std::string, std::string >  properties)
virtual

Reimplemented from YACS::HMI::Subject.

Definition at line 3883 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().

3884 {
3885  Proc *proc = GuiContext::getCurrent()->getProc();
3886  CommandSetDSPortProperties *command =
3887  new CommandSetDSPortProperties(proc->getChildName(getPort()->getNode()), getName(), true, properties);
3888  if (command->execute())
3889  {
3890  GuiContext::getCurrent()->getInvoc()->add(command);
3891  return true;
3892  }
3893  else delete command;
3894  return false;
3895 }

Member Data Documentation

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

Definition at line 265 of file guiObservers.hxx.

Referenced by getProperties().


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