Version: 8.3.0
YACS::ENGINE::InputCalStreamPort Class Reference

Class for Input Calcium DataStream Ports. More...

#include <CalStreamPort.hxx>

Inheritance diagram for YACS::ENGINE::InputCalStreamPort:
Collaboration diagram for YACS::ENGINE::InputCalStreamPort:

Public Member Functions

 InputCalStreamPort (const std::string &name, Node *node, TypeCode *type)
 
 InputCalStreamPort (const InputCalStreamPort &other, Node *newHelder)
 
virtual ~InputCalStreamPort ()
 
void setProperty (const std::string &name, const std::string &value)
 Set a new value for a property of the port. More...
 
std::string getNameOfTypeOfCurrentInstance () const
 
InputCalStreamPortclone (Node *newHelder) const
 
void setSchema (const std::string &value)
 
std::string getSchema ()
 
void setLevel (const std::string &value)
 
int getLevel ()
 
void setDepend (const std::string &value)
 
std::string getDepend ()
 
void setDelta (const std::string &value)
 
double getDelta ()
 
void setAlpha (const std::string &value)
 
double getAlpha ()
 
void setInterp (const std::string &value)
 
std::string getInterp ()
 
void setExtrap (const std::string &value)
 
std::string getExtrap ()
 
- Public Member Functions inherited from YACS::ENGINE::InputDataStreamPort
 InputDataStreamPort (const InputDataStreamPort &other, Node *newHelder)
 
 InputDataStreamPort (const std::string &name, Node *node, TypeCode *type)
 
virtual ~InputDataStreamPort ()
 
virtual std::string typeName ()
 
virtual void edAddOutputDataStreamPort (OutputDataStreamPort *port)
 
std::set< OutputDataStreamPort * > getConnectedOutputDataStreamPort ()
 
- Public Member Functions inherited from YACS::ENGINE::DataStreamPort
TypeOfChannel getTypeOfChannel () const
 returns type of channel the port will use for data exchange on runtime : DATAFLOW or DATASTREAM. 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 ()
 
- 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 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 ()
 
- Public Member Functions inherited from YACS::ENGINE::InPort
virtual InPortgetPublicRepresentant ()
 
virtual int edGetNumberOfLinks () const
 Returns number of physical backlinks NOT number of user backlinks. More...
 
virtual std::set< OutPort * > edSetOutPort () const
 Returns physical backlinks NOT user backlinks. More...
 
virtual ~InPort ()
 

Static Public Attributes

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

Protected Attributes

std::string _depend
 
std::string _schema
 
std::string _interp
 
std::string _extrap
 
int _level
 
double _delta
 
double _alpha
 
- Protected Attributes inherited from YACS::ENGINE::InputDataStreamPort
std::set< OutputDataStreamPort * > _setOfOutputDataStreamPort
 
- Protected Attributes inherited from YACS::ENGINE::DataStreamPort
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
 
- Protected Attributes inherited from YACS::ENGINE::InPort
std::set< OutPort * > _backLinks
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::ENGINE::DataPort
static DataPortisCrossingType (const std::vector< DataPort * > &historyOfLink)
 
- Protected Member Functions inherited from YACS::ENGINE::DataStreamPort
 DataStreamPort (const DataStreamPort &other, Node *newHelder)
 
 DataStreamPort (const std::string &name, Node *node, TypeCode *type)
 
- Protected Member Functions inherited from YACS::ENGINE::InPort
 InPort (const InPort &other, Node *newHelder)
 
 InPort (const std::string &name, Node *node, TypeCode *type)
 
void edRemoveAllLinksLinkedWithMe () throw (Exception)
 
virtual void edNotifyReferencedBy (OutPort *fromPort)
 
virtual void edNotifyDereferencedBy (OutPort *fromPort)
 
virtual void getAllRepresentants (std::set< InPort * > &repr) const
 
- Static Protected Attributes inherited from YACS::ENGINE::Port
static int _total = 0
 
static const char NAME [] ="Port"
 

Detailed Description

Class for Input Calcium DataStream Ports.

Definition at line 40 of file CalStreamPort.hxx.

Constructor & Destructor Documentation

InputCalStreamPort::InputCalStreamPort ( const std::string &  name,
Node node,
TypeCode type 
)

Definition at line 34 of file CalStreamPort.cxx.

Referenced by clone().

35  :
36  InputDataStreamPort(name, node, type),
37  DataPort(name, node, type),
38  Port(node),_depend("TIME_DEPENDENCY"),_schema("TI_SCHEM"),_delta(-1.),_level(-1),_alpha(0.),
39  _interp("L1_SCHEM"),_extrap("UNDEFINED_EXTRA_SCHEM")
40 {
}
InputCalStreamPort::InputCalStreamPort ( const InputCalStreamPort other,
Node newHelder 
)

Definition at line 41 of file CalStreamPort.cxx.

42  :
43  InputDataStreamPort(other,newHelder),
44  DataPort(other,newHelder),
45  Port(other,newHelder),_depend(other._depend),_schema(other._schema),_delta(other._delta),_level(other._level),
46  _alpha(other._alpha),_interp(other._interp),_extrap(other._extrap)
47 {
}
InputCalStreamPort::~InputCalStreamPort ( )
virtual

Definition at line 49 of file CalStreamPort.cxx.

50 {
51 }

Member Function Documentation

InputCalStreamPort * InputCalStreamPort::clone ( Node newHelder) const
virtual

Reimplemented from YACS::ENGINE::InputDataStreamPort.

Definition at line 207 of file CalStreamPort.cxx.

References InputCalStreamPort().

208 {
209  return new InputCalStreamPort(*this,newHelder);
210 }
double YACS::ENGINE::InputCalStreamPort::getAlpha ( )
inline

Definition at line 62 of file CalStreamPort.hxx.

References _alpha.

62 {return _alpha;};
double YACS::ENGINE::InputCalStreamPort::getDelta ( )
inline

Definition at line 60 of file CalStreamPort.hxx.

References _delta.

60 {return _delta;};
std::string YACS::ENGINE::InputCalStreamPort::getDepend ( )
inline

Definition at line 58 of file CalStreamPort.hxx.

References _depend.

Referenced by YACS::ENGINE::OutputCalStreamPort::addInPort().

58 {return _depend;};
std::string YACS::ENGINE::InputCalStreamPort::getExtrap ( )
inline

Definition at line 66 of file CalStreamPort.hxx.

References _extrap.

66 {return _extrap;};
std::string YACS::ENGINE::InputCalStreamPort::getInterp ( )
inline

Definition at line 64 of file CalStreamPort.hxx.

References _interp.

64 {return _interp;};
int YACS::ENGINE::InputCalStreamPort::getLevel ( )
inline

Definition at line 56 of file CalStreamPort.hxx.

References _level.

56 {return _level;};
std::string InputCalStreamPort::getNameOfTypeOfCurrentInstance ( ) const
virtual

Reimplemented from YACS::ENGINE::InputDataStreamPort.

Definition at line 202 of file CalStreamPort.cxx.

References NAME.

203 {
204  return NAME;
205 }
std::string YACS::ENGINE::InputCalStreamPort::getSchema ( )
inline

Definition at line 54 of file CalStreamPort.hxx.

References _schema.

54 {return _schema;};
void InputCalStreamPort::setAlpha ( const std::string &  value)

Definition at line 84 of file CalStreamPort.cxx.

References _alpha.

Referenced by setProperty().

85 {
86  std::istringstream iss(value);
87  double temp;
88  if (!(iss >> temp)||temp<0. || temp >1.)
89  throw Exception("Alpha property must be a float > 0 and < 1");
90  _alpha=temp;
91 }
void InputCalStreamPort::setDelta ( const std::string &  value)

Definition at line 92 of file CalStreamPort.cxx.

References _delta.

Referenced by setProperty().

93 {
94  std::istringstream iss(value);
95  double temp;
96  if (!(iss >> temp)||temp<0. || temp >1.)
97  throw Exception("DeltaT property must be > 0 and < 1");
98  _delta=temp;
99 }
void InputCalStreamPort::setDepend ( const std::string &  value)

Definition at line 53 of file CalStreamPort.cxx.

References _depend, DEBTRACE, and YACS::ENGINE::InPort::edGetNumberOfLinks().

Referenced by setProperty().

54 {
55  DEBTRACE("InputCalStreamPort::setDepend: " << edGetNumberOfLinks());
56  if(edGetNumberOfLinks() > 0)
57  {
58  throw Exception("Can not modify DependencyType property on a connected port");
59  }
60  if(depend != "TIME_DEPENDENCY" && depend != "ITERATION_DEPENDENCY")
61  {
62  throw Exception("DependencyType property must be TIME_DEPENDENCY or ITERATION_DEPENDENCY");
63  }
64  _depend=depend;
65 }
void InputCalStreamPort::setExtrap ( const std::string &  value)

Definition at line 108 of file CalStreamPort.cxx.

References _extrap.

Referenced by setProperty().

109 {
110  if(value != "E0_SCHEM" && value != "E1_SCHEM")
111  {
112  throw Exception("ExtrapolationSchem property must be E0_SCHEM or E1_SCHEM");
113  }
114  _extrap=value;
115 }
void InputCalStreamPort::setInterp ( const std::string &  value)

Definition at line 100 of file CalStreamPort.cxx.

References _interp.

Referenced by setProperty().

101 {
102  if(value != "L0_SCHEM" && value != "L1_SCHEM")
103  {
104  throw Exception("InterpolationSchem property must be L0_SCHEM or L1_SCHEM");
105  }
106  _interp=value;
107 }
void InputCalStreamPort::setLevel ( const std::string &  value)

Definition at line 75 of file CalStreamPort.cxx.

References _level, and DEBTRACE.

Referenced by setProperty().

76 {
77  DEBTRACE("InputCalStreamPort::setLevel: " << value);
78  std::istringstream iss(value);
79  int temp;
80  if (!(iss >> temp)|| temp<1)
81  throw Exception("StorageLevel property must be an integer > 0");
82  _level=temp;
83 }
void InputCalStreamPort::setProperty ( const std::string &  name,
const std::string &  value 
)
virtual

Set a new value for a property of the port.

Parameters
name: the name property
value: the value property

Reimplemented from YACS::ENGINE::DataStreamPort.

Definition at line 117 of file CalStreamPort.cxx.

References DEBTRACE, setAlpha(), setDelta(), setDepend(), setExtrap(), setInterp(), setLevel(), YACS::ENGINE::DataStreamPort::setProperty(), and setSchema().

118 {
119  DEBTRACE("InputCalStreamPort::setProperty: " << name << " " << value);
120  if(name == "DependencyType")
121  setDepend(value);
122  else if(name == "DateCalSchem")
123  setSchema(value);
124  else if(name == "StorageLevel")
125  setLevel(value);
126  else if(name == "Alpha")
127  setAlpha(value);
128  else if(name == "DeltaT")
129  setDelta(value);
130  else if(name == "InterpolationSchem")
131  setInterp(value);
132  else if(name == "ExtrapolationSchem")
133  setExtrap(value);
135 }
void InputCalStreamPort::setSchema ( const std::string &  value)

Definition at line 67 of file CalStreamPort.cxx.

References _schema.

Referenced by setProperty().

68 {
69  if(schema != "TI_SCHEM" && schema != "TF_SCHEM" && schema != "ALPHA_SCHEM")
70  {
71  throw Exception("DateCalSchem property must be TI_SCHEM, TF_SCHEM or ALPHA_SCHEM");
72  }
73  _schema=schema;
74 }

Member Data Documentation

double YACS::ENGINE::InputCalStreamPort::_alpha
protected

Definition at line 74 of file CalStreamPort.hxx.

Referenced by getAlpha(), and setAlpha().

double YACS::ENGINE::InputCalStreamPort::_delta
protected

Definition at line 73 of file CalStreamPort.hxx.

Referenced by getDelta(), and setDelta().

std::string YACS::ENGINE::InputCalStreamPort::_depend
protected

Definition at line 66 of file CalStreamPort.hxx.

Referenced by getDepend(), and setDepend().

std::string YACS::ENGINE::InputCalStreamPort::_extrap
protected

Definition at line 71 of file CalStreamPort.hxx.

Referenced by getExtrap(), and setExtrap().

std::string YACS::ENGINE::InputCalStreamPort::_interp
protected

Definition at line 70 of file CalStreamPort.hxx.

Referenced by getInterp(), and setInterp().

int YACS::ENGINE::InputCalStreamPort::_level
protected

Definition at line 72 of file CalStreamPort.hxx.

Referenced by getLevel(), and setLevel().

std::string YACS::ENGINE::InputCalStreamPort::_schema
protected

Definition at line 69 of file CalStreamPort.hxx.

Referenced by getSchema(), and setSchema().

const char InputCalStreamPort::NAME ="InputCalStreamPort"
static

Definition at line 43 of file CalStreamPort.hxx.

Referenced by YACS::ENGINE::OutputCalStreamPort::addInPort(), getNameOfTypeOfCurrentInstance(), and YACS::ENGINE::OutputCalStreamPort::removeInPort().


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