Version: 9.16.0
YACS::ENGINE::InputPort4DF2DS Class Reference

#include <Loop.hxx>

Inheritance diagram for YACS::ENGINE::InputPort4DF2DS:
Collaboration diagram for YACS::ENGINE::InputPort4DF2DS:

Public Member Functions

 InputPort4DF2DS (DFToDSForLoop *node, TypeCode *type)
 
void getAllRepresentants (std::set< InPort * > &repr) const
 
void releaseData () override
 
void put (const void *data)
 
InputPortclone (Node *newHelder) const
 
void * get () const
 
void exRestoreInit ()
 
void exSaveInit ()
 
void put (Any *data)
 
 ~InputPort4DF2DS ()
 
- Public Member Functions inherited from YACS::ENGINE::InputPort
virtual ~InputPort ()
 
std::string getNameOfTypeOfCurrentInstance () const
 
virtual InputPortgetPublicRepresentant ()
 returns the final physical port behind 'this'. More...
 
virtual bool isIntermediate () const
 
virtual bool edIsManuallyInitialized () const
 Specifies if this port has been manually set by the call of InputPort::edInit. More...
 
bool edIsInitialized () const
 soon deprecated More...
 
template<class T >
void edInit (T value)
 
void edInit (Any *value)
 
void edInit (const std::string &impl, const void *value)
 Initialize the port with an object (value) coming from a world with implementation impl. More...
 
virtual void edRemoveManInit ()
 Removes eventually previous manual initialisation. More...
 
virtual void checkBasicConsistency () const
 Check basically that this port has one chance to be specified on time. It's a necessary condition not sufficient at all. More...
 
virtual void exInit (bool start)
 
virtual void exSaveInit ()=0
 
virtual void exRestoreInit ()=0
 
virtual InputPortclone (Node *newHelder) const =0
 
virtual bool isEmpty ()
 
virtual void * get () const =0
 
virtual void releaseData ()=0
 
virtual void put (const void *data)=0
 
virtual std::string dump ()
 
virtual std::string getHumanRepr ()
 
virtual void setStringRef (std::string strRef)
 
virtual std::string typeName ()
 
bool canBeNull () const
 
- Public Member Functions inherited from YACS::ENGINE::DataFlowPort
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 ~DataFlowPort ()
 
virtual std::string typeName ()
 
virtual std::string valToStr ()
 Gives a string representation of the data, for user interfaces. More...
 
virtual void valFromStr (std::string valstr)
 Allows to set data from a string representation used in user interface. More...
 
- 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::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...
 
bool canSafelySqueezeMemory () const
 
bool isBackLinked () const
 
virtual ~InPort ()
 
virtual std::string typeName ()
 

Protected Attributes

Any_data
 
- Protected Attributes inherited from YACS::ENGINE::InputPort
Any_initValue
 
std::string _stringRef
 
bool _canBeNull
 
- 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< std::pair< OutPort *, bool > > _backLinks
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::ENGINE::DataPort
static DataPortisCrossingType (const std::vector< DataPort * > &historyOfLink)
 
- Static Public Attributes inherited from YACS::ENGINE::InputPort
static const char NAME [] ="InputPort"
 
- Static Public Attributes inherited from YACS::ENGINE::DataFlowPort
static const char NAME [] ="DataFlowPort"
 
- Static Public Attributes inherited from YACS::ENGINE::DataPort
static const char NAME [] ="DataPort"
 
- Protected Member Functions inherited from YACS::ENGINE::InputPort
 InputPort (const InputPort &other, Node *newHelder)
 
 InputPort (const std::string &name, Node *node, TypeCode *type, bool canBeNull=false)
 
void releaseDataUnsafe ()
 
- Protected Member Functions inherited from YACS::ENGINE::DataFlowPort
 DataFlowPort (const DataFlowPort &other, Node *newHelder)
 
 DataFlowPort (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::InPort
 InPort (const InPort &other, Node *newHelder)
 
 InPort (const std::string &name, Node *node, TypeCode *type)
 
void edRemoveAllLinksLinkedWithMe ()
 
virtual void edNotifyReferencedBy (OutPort *fromPort, bool isLoopProof=true)
 
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

Definition at line 41 of file Loop.hxx.

Constructor & Destructor Documentation

◆ InputPort4DF2DS()

InputPort4DF2DS::InputPort4DF2DS ( DFToDSForLoop node,
TypeCode type 
)

Definition at line 37 of file Loop.cxx.

37 :
38 InputPort("", node, type),
39 DataPort("", node, type),
40 Port(node),_data(0)
41{
42}
DataPort(const DataPort &other, Node *newHelder)
Definition: DataPort.cxx:41
InputPort(const InputPort &other, Node *newHelder)
Definition: InputPort.cxx:36
Port(Node *node)
Definition: Port.cxx:34

◆ ~InputPort4DF2DS()

InputPort4DF2DS::~InputPort4DF2DS ( )

Definition at line 102 of file Loop.cxx.

103{
104 if(_data)
105 _data->decrRef();
106}

References _data, and YACS::ENGINE::RefCounter::decrRef().

Member Function Documentation

◆ clone()

InputPort * InputPort4DF2DS::clone ( Node newHelder) const
virtual

Implements YACS::ENGINE::InputPort.

Definition at line 83 of file Loop.cxx.

84{
85 throw Exception("InputPort4DF2DS::clone : internal error");
86}

◆ exRestoreInit()

void InputPort4DF2DS::exRestoreInit ( )
virtual

◆ exSaveInit()

void InputPort4DF2DS::exSaveInit ( )
virtual

◆ get()

void * InputPort4DF2DS::get ( ) const
virtual

Implements YACS::ENGINE::InputPort.

Definition at line 50 of file Loop.cxx.

51{
52 if(!_data)
53 {
54 std::string what="InputPort4DF2DS::get : no value currently in input whith name \""; what+=_name; what+="\"";
55 throw Exception(what);
56 }
57 return (void *)_data;
58}

References _data, and YACS::ENGINE::DataPort::_name.

◆ getAllRepresentants()

void InputPort4DF2DS::getAllRepresentants ( std::set< InPort * > &  repr) const
virtual

Reimplemented from YACS::ENGINE::InPort.

Definition at line 44 of file Loop.cxx.

45{
46 set<InPort *> s=_node->getOutputDataStreamPort("")->edSetInPort();
47 repr.insert(s.begin(),s.end());
48}
virtual OutputDataStreamPort * getOutputDataStreamPort(const std::string &name) const =0
std::set< InPort * > edSetInPort() const
Node * _node
Definition: Port.hxx:55

References YACS::ENGINE::Port::_node, YACS::ENGINE::OutputDataStreamPort::edSetInPort(), and YACS::ENGINE::Node::getOutputDataStreamPort().

◆ put() [1/2]

void InputPort4DF2DS::put ( Any data)

Definition at line 95 of file Loop.cxx.

96{
98 _data=data;
99 _data->incrRef();
100}
void releaseData() override
Definition: Loop.cxx:88

References _data, YACS::ENGINE::RefCounter::incrRef(), and releaseData().

◆ put() [2/2]

void InputPort4DF2DS::put ( const void *  data)
virtual

Implements YACS::ENGINE::InputPort.

Definition at line 78 of file Loop.cxx.

79{
80 put((Any *)data);
81}
: Interface for management of storage of data formated dynamically in its TypeCode....
Definition: Any.hxx:79
void put(const void *data)
Definition: Loop.cxx:78

References put().

Referenced by put().

◆ releaseData()

void InputPort4DF2DS::releaseData ( )
overridevirtual

Implements YACS::ENGINE::InputPort.

Definition at line 88 of file Loop.cxx.

89{
90 if(_data)
91 _data->decrRef();
92 _data = nullptr;
93}

References _data, and YACS::ENGINE::RefCounter::decrRef().

Referenced by put().

Member Data Documentation

◆ _data

Any* YACS::ENGINE::InputPort4DF2DS::_data
protected

Definition at line 55 of file Loop.hxx.

Referenced by exRestoreInit(), exSaveInit(), get(), put(), releaseData(), and ~InputPort4DF2DS().


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