Version: 8.3.0
YACS::ENGINE::InPropertyPort Class Reference

class for Input Property Ports More...

#include <InPropertyPort.hxx>

Inheritance diagram for YACS::ENGINE::InPropertyPort:
Collaboration diagram for YACS::ENGINE::InPropertyPort:

Public Member Functions

virtual ~InPropertyPort ()
 
std::string getNameOfTypeOfCurrentInstance () const
 
virtual InPropertyPortgetPublicRepresentant ()
 returns the final physical port behind 'this'. More...
 
virtual std::string typeName ()
 
virtual void exNewPropertyValue (const std::string &name, const std::string &value)
 
virtual void exSaveInit ()
 
virtual void exRestoreInit ()
 
virtual InPropertyPortclone (Node *newHelder) const
 
virtual void * get () const
 
virtual void put (const void *data) throw (ConversionException)
 
virtual void put (YACS::ENGINE::Any *data)
 
- Public Member Functions inherited from YACS::ENGINE::InputPort
virtual ~InputPort ()
 
std::string getNameOfTypeOfCurrentInstance () const
 
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 throw (Exception)
 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 bool isEmpty ()
 
virtual std::string dump ()
 
virtual std::string getHumanRepr ()
 
virtual void setStringRef (std::string strRef)
 
bool canBeNull () const
 
- Public Member Functions inherited from YACS::ENGINE::DataFlowPort
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 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)
 
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 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 [] ="InPropertyPort"
 
- 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

 InPropertyPort (const InPropertyPort &other, Node *newHelder)
 
 InPropertyPort (const std::string &name, Node *node, TypeCode *type, bool canBeNull=false)
 
- 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)
 
- 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 () throw (Exception)
 
virtual void edNotifyReferencedBy (OutPort *fromPort)
 
virtual void edNotifyDereferencedBy (OutPort *fromPort)
 
virtual void getAllRepresentants (std::set< InPort * > &repr) const
 

Protected Attributes

YACS::ENGINE::Any_property_data
 
YACS::ENGINE::Any_init_property_data
 
- Protected Attributes inherited from YACS::ENGINE::InputPort
Any_initValue
 
std::string _stringRef
 
bool _canBeNull
 
- Protected Attributes inherited from YACS::ENGINE::InPort
std::set< OutPort * > _backLinks
 
- Protected Attributes inherited from YACS::ENGINE::DataPort
TypeCode_type
 
std::string _name
 
- Protected Attributes inherited from YACS::ENGINE::Port
Node_node
 
int _id
 

Friends

class Runtime
 
class OutPort
 
class Node
 

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

class for Input Property Ports

Definition at line 37 of file InPropertyPort.hxx.

Constructor & Destructor Documentation

InPropertyPort::~InPropertyPort ( )
virtual

Definition at line 47 of file InPropertyPort.cxx.

47 {}
InPropertyPort::InPropertyPort ( const InPropertyPort other,
Node newHelder 
)
protected

Definition at line 32 of file InPropertyPort.cxx.

Referenced by clone().

33  : InputPort(other, newHelder),
34  DataPort(other, newHelder),
35  Port(other, newHelder),
37 {}
InPropertyPort::InPropertyPort ( const std::string &  name,
Node node,
TypeCode type,
bool  canBeNull = false 
)
protected

Definition at line 39 of file InPropertyPort.cxx.

40  : InputPort(name, node, type, canBeNull),
41  DataPort(name, node, type),
42  Port(node),
44 {
45 }

Member Function Documentation

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

Implements YACS::ENGINE::InputPort.

Definition at line 75 of file InPropertyPort.cxx.

References InPropertyPort().

76 {
77  return new InPropertyPort(*this,newHelder);
78 }
void InPropertyPort::exNewPropertyValue ( const std::string &  name,
const std::string &  value 
)
virtual

Definition at line 55 of file InPropertyPort.cxx.

References YACS::ENGINE::Port::_node, DEBTRACE, and YACS::ENGINE::Node::setProperty().

Referenced by put().

56 {
57  DEBTRACE("Adding new Property to the node " << name << " " << value);
58  _node->setProperty(name, value);
59 }
void InPropertyPort::exRestoreInit ( )
virtual

Implements YACS::ENGINE::InputPort.

Definition at line 68 of file InPropertyPort.cxx.

References _init_property_data, and _property_data.

69 {
70  if(!_init_property_data)return;
72 }
void InPropertyPort::exSaveInit ( )
virtual

Implements YACS::ENGINE::InputPort.

Definition at line 62 of file InPropertyPort.cxx.

References _init_property_data, and _property_data.

63 {
65 }
void * InPropertyPort::get ( ) const
virtual

Implements YACS::ENGINE::InputPort.

Definition at line 81 of file InPropertyPort.cxx.

References _property_data.

82 {
83  return (void*) _property_data;
84 }
string InPropertyPort::getNameOfTypeOfCurrentInstance ( ) const
virtual

Reimplemented from YACS::ENGINE::DataFlowPort.

Definition at line 49 of file InPropertyPort.cxx.

References NAME.

50 {
51  return NAME;
52 }
virtual InPropertyPort* YACS::ENGINE::InPropertyPort::getPublicRepresentant ( )
inlinevirtual

returns the final physical port behind 'this'.

Reimplemented from YACS::ENGINE::InputPort.

Definition at line 53 of file InPropertyPort.hxx.

53 { return this; }
void InPropertyPort::put ( const void *  data) throw (ConversionException)
virtual

Implements YACS::ENGINE::InputPort.

Definition at line 87 of file InPropertyPort.cxx.

88 {
89  put((YACS::ENGINE::Any *)data);
90 }
void InPropertyPort::put ( YACS::ENGINE::Any data)
virtual

Definition at line 93 of file InPropertyPort.cxx.

References _property_data, DEBTRACE, YACS::ENGINE::RefCounter::decrRef(), exNewPropertyValue(), YACS::ENGINE::RefCounter::getRefCnt(), CORBAEngineTest::i, YACS::ENGINE::RefCounter::incrRef(), and YACS::ENGINE::SequenceAny::size().

94 {
95  // Add new properties to the node
96  YACS::ENGINE::SequenceAny * seq_data = static_cast<YACS::ENGINE::SequenceAny*>(data);
97  for (int i = 0; i < seq_data->size(); i++)
98  {
99  std::string key = ((*seq_data)[i]["name"])->getStringValue();
100  std::string value = ((*seq_data)[i]["value"])->getStringValue();
101  exNewPropertyValue(key, value);
102  }
103 
104  if(_property_data)
106  _property_data = data;
108  DEBTRACE("value ref count: " << _property_data->getRefCnt());
109 }
virtual std::string YACS::ENGINE::InPropertyPort::typeName ( )
inlinevirtual

Reimplemented from YACS::ENGINE::InputPort.

Definition at line 55 of file InPropertyPort.hxx.

55 {return "YACS__ENGINE__InPropertyPort";}

Friends And Related Function Documentation

friend class Node
friend

Definition at line 41 of file InPropertyPort.hxx.

friend class OutPort
friend

Definition at line 40 of file InPropertyPort.hxx.

friend class Runtime
friend

Definition at line 39 of file InPropertyPort.hxx.

Member Data Documentation

YACS::ENGINE::Any* YACS::ENGINE::InPropertyPort::_init_property_data
protected

Definition at line 70 of file InPropertyPort.hxx.

Referenced by exRestoreInit(), and exSaveInit().

YACS::ENGINE::Any* YACS::ENGINE::InPropertyPort::_property_data
protected

Definition at line 69 of file InPropertyPort.hxx.

Referenced by exRestoreInit(), exSaveInit(), get(), and put().

const char InPropertyPort::NAME ="InPropertyPort"
static

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