Version: 9.16.0
YACS::ENGINE::OutputCalStreamPort Class Reference

Class for Output Calcium DataStream Ports. More...

#include <CalStreamPort.hxx>

Inheritance diagram for YACS::ENGINE::OutputCalStreamPort:
Collaboration diagram for YACS::ENGINE::OutputCalStreamPort:

Public Member Functions

 OutputCalStreamPort (const std::string &name, Node *node, TypeCode *type)
 
 OutputCalStreamPort (const OutputCalStreamPort &other, Node *newHelder)
 
virtual ~OutputCalStreamPort ()
 
void setDepend (const std::string &depend)
 
void setLevel (const std::string &schema)
 
std::string getDepend ()
 
int getLevel ()
 
void setSchema (const std::string &schema)
 
std::string getSchema ()
 
void setProperty (const std::string &name, const std::string &value)
 Set a new value for a property of the port. More...
 
virtual bool addInPort (InPort *inPort)
 
std::string getNameOfTypeOfCurrentInstance () const
 
OutputCalStreamPortclone (Node *newHelder) const
 
virtual int removeInPort (InPort *inPort, bool forward)
 
- Public Member Functions inherited from YACS::ENGINE::OutputDataStreamPort
 OutputDataStreamPort (const OutputDataStreamPort &other, Node *newHelder)
 
 OutputDataStreamPort (const std::string &name, Node *node, TypeCode *type)
 
virtual ~OutputDataStreamPort ()
 
virtual OutputDataStreamPortclone (Node *newHelder) const
 
std::set< InPort * > edSetInPort () const
 
bool isAlreadyLinkedWith (InPort *withp) const
 
virtual std::string getNameOfTypeOfCurrentInstance () const
 
virtual bool addInPort (InPort *inPort)
 
virtual bool edAddInputDataStreamPort (InputDataStreamPort *port)
 
int edRemoveInputDataStreamPort (InputDataStreamPort *inPort, bool forward)
 
void edRemoveAllLinksLinkedWithMe ()
 
int removeInPort (InPort *inPort, bool forward)
 
virtual std::string typeName ()
 
- Public Member Functions inherited from YACS::ENGINE::DataStreamPort
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)
 
std::string getNameOfTypeOfCurrentInstance () const
 
virtual TypeOfChannel getTypeOfChannel () const =0
 returns type of channel the port will use for data exchange on runtime : DATAFLOW or DATASTREAM. More...
 
bool isDifferentTypeOf (const DataPort *other) const
 
virtual void edRemoveAllLinksLinkedWithMe ()=0
 
virtual std::string typeName ()
 
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
 
virtual std::string getNameOfTypeOfCurrentInstance () const
 
int getNumId () const
 
virtual std::string typeName ()
 
void modified ()
 
- Public Member Functions inherited from YACS::ENGINE::OutPort
virtual void checkConsistency (LinkInfo &info) const
 
virtual int edGetNumberOfOutLinks () const
 
virtual std::set< InPort * > edSetInPort () const =0
 
virtual bool isAlreadyLinkedWith (InPort *withp) const =0
 
virtual void getAllRepresented (std::set< OutPort * > &represented) const
 
virtual bool addInPort (InPort *inPort)=0
 
virtual int removeInPort (InPort *inPort, bool forward)=0
 
virtual ~OutPort ()
 
std::vector< DataPort * > calculateHistoryOfLinkWith (InPort *end)
 
virtual std::string typeName ()
 

Static Public Attributes

static const char NAME [] ="OutputCalStreamPort"
 
- Static Public Attributes inherited from YACS::ENGINE::OutputDataStreamPort
static const char NAME [] ="OutputDataStreamPort"
 
- 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
 
int _level
 
double _delta
 
- Protected Attributes inherited from YACS::ENGINE::OutputDataStreamPort
std::set< InputDataStreamPort * > _setOfInputDataStreamPort
 
- 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
 

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::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 Member Functions inherited from YACS::ENGINE::OutPort
 OutPort (const OutPort &other, Node *newHelder)
 
 OutPort (const std::string &name, Node *node, TypeCode *type)
 
- Static Protected Attributes inherited from YACS::ENGINE::Port
static int _total = 0
 
static const char NAME [] ="Port"
 

Detailed Description

Class for Output Calcium DataStream Ports.

Definition at line 82 of file CalStreamPort.hxx.

Constructor & Destructor Documentation

◆ OutputCalStreamPort() [1/2]

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

Definition at line 214 of file CalStreamPort.cxx.

214 :
215 OutputDataStreamPort(name, node, type),
216 DataPort(name, node, type),
217 Port(node),_depend("TIME_DEPENDENCY"),_schema("TI_SCHEM"),_level(-1)
218{
219}
DataPort(const DataPort &other, Node *newHelder)
Definition: DataPort.cxx:41
OutputDataStreamPort(const OutputDataStreamPort &other, Node *newHelder)
Port(Node *node)
Definition: Port.cxx:34

Referenced by clone().

◆ OutputCalStreamPort() [2/2]

OutputCalStreamPort::OutputCalStreamPort ( const OutputCalStreamPort other,
Node newHelder 
)

Definition at line 221 of file CalStreamPort.cxx.

221 :
222 OutputDataStreamPort(other,newHelder),
223 DataPort(other,newHelder),
224 Port(other,newHelder),
225 _depend(other._depend),_schema(other._schema),_level(other._level)
226{
227}

◆ ~OutputCalStreamPort()

OutputCalStreamPort::~OutputCalStreamPort ( )
virtual

Definition at line 229 of file CalStreamPort.cxx.

230{
231}

Member Function Documentation

◆ addInPort()

bool OutputCalStreamPort::addInPort ( InPort inPort)
virtual

Reimplemented from YACS::ENGINE::OutputDataStreamPort.

Definition at line 281 of file CalStreamPort.cxx.

282{
283 DEBTRACE("OutputCalStreamPort::addInPort " << InputCalStreamPort::NAME );
285 {
286 string what="not compatible type of port requested during building of link FROM ";
287 what+=NAME; what+=" TO "; what+=inPort->getNameOfTypeOfCurrentInstance();
288 throw Exception(what);
289 }
290
291 InputCalStreamPort* port=static_cast<InputCalStreamPort*>(inPort);
292 if(port->getDepend() != _depend)
293 {
294 std::string what= "incompatible DependencyType properties: "+_depend+" != "+ port->getDepend();
295 throw Exception(what);
296 }
297 bool ret;
298 ret= edAddInputDataStreamPort(port);
299 return ret;
300}
#define DEBTRACE(msg)
Definition: YacsTrace.hxx:31
std::string getNameOfTypeOfCurrentInstance() const
Definition: DataPort.cxx:56
Class for Input Calcium DataStream Ports.
virtual bool edAddInputDataStreamPort(InputDataStreamPort *port)

References _depend, DEBTRACE, YACS::ENGINE::OutputDataStreamPort::edAddInputDataStreamPort(), YACS::ENGINE::InputCalStreamPort::getDepend(), YACS::ENGINE::DataPort::getNameOfTypeOfCurrentInstance(), YACS::ENGINE::InputCalStreamPort::NAME, and NAME.

◆ clone()

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

Reimplemented from YACS::ENGINE::OutputDataStreamPort.

Definition at line 276 of file CalStreamPort.cxx.

277{
278 return new OutputCalStreamPort(*this,newHelder);
279}
OutputCalStreamPort(const std::string &name, Node *node, TypeCode *type)

References OutputCalStreamPort().

◆ getDepend()

std::string YACS::ENGINE::OutputCalStreamPort::getDepend ( )
inline

Definition at line 91 of file CalStreamPort.hxx.

91{return _depend;};

References _depend.

◆ getLevel()

int YACS::ENGINE::OutputCalStreamPort::getLevel ( )
inline

Definition at line 92 of file CalStreamPort.hxx.

92{return _level;};

References _level.

◆ getNameOfTypeOfCurrentInstance()

std::string OutputCalStreamPort::getNameOfTypeOfCurrentInstance ( ) const
virtual

Reimplemented from YACS::ENGINE::OutputDataStreamPort.

Definition at line 271 of file CalStreamPort.cxx.

272{
273 return NAME;
274}

References NAME.

◆ getSchema()

std::string YACS::ENGINE::OutputCalStreamPort::getSchema ( )
inline

Definition at line 94 of file CalStreamPort.hxx.

94{return _schema;};

References _schema.

◆ removeInPort()

int OutputCalStreamPort::removeInPort ( InPort inPort,
bool  forward 
)
virtual

Reimplemented from YACS::ENGINE::OutputDataStreamPort.

Definition at line 303 of file CalStreamPort.cxx.

304{
305 DEBTRACE("OutputCalStreamPort::removeInPort");
307 {
308 string what="not compatible type of port requested during destruction of for link FROM ";
309 what+=NAME; what+=" TO "; what+=inPort->getNameOfTypeOfCurrentInstance();
310 throw Exception(what);
311 }
312 return edRemoveInputDataStreamPort(static_cast<InputDataStreamPort *>(inPort),forward);
313}
int edRemoveInputDataStreamPort(InputDataStreamPort *inPort, bool forward)

References DEBTRACE, YACS::ENGINE::OutputDataStreamPort::edRemoveInputDataStreamPort(), YACS::ENGINE::DataPort::getNameOfTypeOfCurrentInstance(), YACS::ENGINE::InputCalStreamPort::NAME, and NAME.

◆ setDepend()

void OutputCalStreamPort::setDepend ( const std::string &  depend)

Definition at line 233 of file CalStreamPort.cxx.

234{
235 DEBTRACE("OutputCalStreamPort::setDepend: " << edGetNumberOfOutLinks());
236 if(edGetNumberOfOutLinks() > 0)
237 {
238 throw Exception("Can not modify DependencyType property on a connected port");
239 }
240 if(depend != "TIME_DEPENDENCY" && depend != "ITERATION_DEPENDENCY")
241 {
242 throw Exception("DependencyType property must be TIME_DEPENDENCY or ITERATION_DEPENDENCY");
243 }
244 _depend=depend;
245}
virtual int edGetNumberOfOutLinks() const
Definition: OutPort.cxx:50

References _depend, DEBTRACE, and YACS::ENGINE::OutPort::edGetNumberOfOutLinks().

Referenced by setProperty().

◆ setLevel()

void OutputCalStreamPort::setLevel ( const std::string &  schema)

Definition at line 255 of file CalStreamPort.cxx.

256{
257 _level =atoi(level.c_str());
258}

References _level.

Referenced by setProperty().

◆ setProperty()

void OutputCalStreamPort::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 260 of file CalStreamPort.cxx.

261{
262 if(name == "DependencyType")
263 setDepend(value);
264 else if(name == "DateCalSchem")
265 setSchema(value);
266 else if(name == "StorageLevel")
267 setLevel(value);
269}
virtual void setProperty(const std::string &name, const std::string &value)
Set a new value for a property of the port.
void setSchema(const std::string &schema)
void setDepend(const std::string &depend)
void setLevel(const std::string &schema)

References setDepend(), setLevel(), YACS::ENGINE::DataStreamPort::setProperty(), and setSchema().

◆ setSchema()

void OutputCalStreamPort::setSchema ( const std::string &  schema)

Definition at line 247 of file CalStreamPort.cxx.

248{
249 if(schema != "TI_SCHEM" && schema != "TF_SCHEM" && schema != "ALPHA_SCHEM")
250 {
251 throw Exception("DateCalSchem property must be TI_SCHEM, TF_SCHEM or ALPHA_SCHEM");
252 }
253 _schema=schema;
254}

References _schema.

Referenced by setProperty().

Member Data Documentation

◆ _delta

double YACS::ENGINE::OutputCalStreamPort::_delta
protected

Definition at line 104 of file CalStreamPort.hxx.

◆ _depend

std::string YACS::ENGINE::OutputCalStreamPort::_depend
protected

Definition at line 101 of file CalStreamPort.hxx.

Referenced by addInPort(), getDepend(), and setDepend().

◆ _level

int YACS::ENGINE::OutputCalStreamPort::_level
protected

Definition at line 103 of file CalStreamPort.hxx.

Referenced by getLevel(), and setLevel().

◆ _schema

std::string YACS::ENGINE::OutputCalStreamPort::_schema
protected

Definition at line 102 of file CalStreamPort.hxx.

Referenced by getSchema(), and setSchema().

◆ NAME

const char OutputCalStreamPort::NAME ="OutputCalStreamPort"
static

Definition at line 85 of file CalStreamPort.hxx.

Referenced by addInPort(), getNameOfTypeOfCurrentInstance(), and removeInPort().


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