Version: 8.3.0
YACS::ENGINE::DataStreamPort Class Reference

#include <DataStreamPort.hxx>

Inheritance diagram for YACS::ENGINE::DataStreamPort:
Collaboration diagram for YACS::ENGINE::DataStreamPort:

Public Member Functions

std::string getNameOfTypeOfCurrentInstance () const
 
TypeOfChannel getTypeOfChannel () const
 returns type of channel the port will use for data exchange on runtime : DATAFLOW or DATASTREAM. More...
 
virtual void setProperty (const std::string &name, const std::string &value)
 Set a new value for a property of the port. More...
 
virtual void setProperties (std::map< std::string, std::string > properties)
 Set the values of all properties of the port. More...
 
virtual std::string getProperty (const std::string &name)
 Get the value of a property of the port. More...
 
std::map< std::string,
std::string > 
getProperties () const
 
virtual void initPortProperties ()
 Initialize port properties at the start of calculation phase. More...
 
virtual ~DataStreamPort ()
 
virtual std::string typeName ()
 
- Public Member Functions inherited from YACS::ENGINE::DataPort
TypeCodeedGetType () const
 
void edSetType (TypeCode *type)
 
std::string getName () const
 
void setName (std::string theName)
 
bool isDifferentTypeOf (const DataPort *other) const
 
virtual void edRemoveAllLinksLinkedWithMe ()=0 throw (Exception)
 
virtual std::string getAsString ()
 returns port value as a string that can be used in a GUI for example More...
 
- Public Member Functions inherited from YACS::ENGINE::Port
virtual ~Port ()
 
NodegetNode () const
 
int getNumId () const
 
void modified ()
 

Static Public Attributes

static const char NAME [] ="DataStreamPort"
 
- Static Public Attributes inherited from YACS::ENGINE::DataPort
static const char NAME [] ="DataPort"
 

Protected Member Functions

 DataStreamPort (const DataStreamPort &other, Node *newHelder)
 
 DataStreamPort (const std::string &name, Node *node, TypeCode *type)
 
- Protected Member Functions inherited from YACS::ENGINE::DataPort
virtual ~DataPort ()
 
 DataPort (const DataPort &other, Node *newHelder)
 
 DataPort (const std::string &name, Node *node, TypeCode *type)
 
- Protected Member Functions inherited from YACS::ENGINE::Port
 Port (Node *node)
 
 Port (const Port &other, Node *newHelder)
 

Protected Attributes

std::map< std::string,
std::string > 
_propertyMap
 
- Protected Attributes inherited from YACS::ENGINE::DataPort
TypeCode_type
 
std::string _name
 
- Protected Attributes inherited from YACS::ENGINE::Port
Node_node
 
int _id
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::ENGINE::DataPort
static DataPortisCrossingType (const std::vector< DataPort * > &historyOfLink)
 
- Static Protected Attributes inherited from YACS::ENGINE::Port
static int _total = 0
 
static const char NAME [] ="Port"
 

Detailed Description

Definition at line 33 of file DataStreamPort.hxx.

Constructor & Destructor Documentation

DataStreamPort::DataStreamPort ( const DataStreamPort other,
Node newHelder 
)
protected

Definition at line 28 of file DataStreamPort.cxx.

28  :DataPort(other,newHelder),Port(other,newHelder),_propertyMap(other._propertyMap)
29 {
30 }
DataStreamPort::DataStreamPort ( const std::string &  name,
Node node,
TypeCode type 
)
protected

Definition at line 32 of file DataStreamPort.cxx.

32  :DataPort(name,node,type),Port(node)
33 {
34 }
DataStreamPort::~DataStreamPort ( )
virtual

Definition at line 36 of file DataStreamPort.cxx.

37 {
38 }

Member Function Documentation

string DataStreamPort::getNameOfTypeOfCurrentInstance ( ) const
virtual
std::map<std::string,std::string> YACS::ENGINE::DataStreamPort::getProperties ( ) const
inline
std::string DataStreamPort::getProperty ( const std::string &  name)
virtual

Get the value of a property of the port.

Parameters
name: the name property
Returns
the value property

Definition at line 60 of file DataStreamPort.cxx.

References _propertyMap.

61 {
62  return _propertyMap[name];
63 }
TypeOfChannel YACS::ENGINE::DataStreamPort::getTypeOfChannel ( ) const
inlinevirtual

returns type of channel the port will use for data exchange on runtime : DATAFLOW or DATASTREAM.

Implements YACS::ENGINE::DataPort.

Definition at line 43 of file DataStreamPort.hxx.

References YACS::ENGINE::DATASTREAM.

43 { return DATASTREAM; }
void DataStreamPort::initPortProperties ( )
virtual

Initialize port properties at the start of calculation phase.

This method is called before the execution of the parent node. It is not used when the user sets properties

Definition at line 84 of file DataStreamPort.cxx.

85 {
86 }
void DataStreamPort::setProperties ( std::map< std::string, std::string >  properties)
virtual

Set the values of all properties of the port.

Parameters
properties: a map containing the values of properties

Definition at line 69 of file DataStreamPort.cxx.

References _propertyMap, and setProperty().

Referenced by YACS::HMI::CommandSetDSPortProperties::localExecute(), YACS::HMI::CommandSetLinkProperties::localExecute(), YACS::HMI::CommandSetDSPortProperties::localReverse(), and YACS::HMI::CommandSetLinkProperties::localReverse().

70 {
71  _propertyMap.clear();
72  std::map<std::string,std::string>::iterator it;
73  for (it = properties.begin(); it != properties.end(); ++it)
74  {
75  setProperty((*it).first, (*it).second); // setProperty virtual and derived
76  }
77 }
void DataStreamPort::setProperty ( const std::string &  name,
const std::string &  value 
)
virtual
virtual std::string YACS::ENGINE::DataStreamPort::typeName ( )
inlinevirtual

Reimplemented from YACS::ENGINE::DataPort.

Reimplemented in YACS::ENGINE::OutputDataStreamPort, and YACS::ENGINE::InputDataStreamPort.

Definition at line 50 of file DataStreamPort.hxx.

50 {return "YACS__ENGINE__DataStreamPort";}

Member Data Documentation

std::map<std::string,std::string> YACS::ENGINE::DataStreamPort::_propertyMap
protected

Definition at line 40 of file DataStreamPort.hxx.

Referenced by getProperty(), setProperties(), and setProperty().

const char DataStreamPort::NAME ="DataStreamPort"
static

Definition at line 36 of file DataStreamPort.hxx.

Referenced by getNameOfTypeOfCurrentInstance().


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