Version: 8.3.0
YACS::ENGINE::InputPresetPort Class Reference

Class for PRESET input Ports. More...

#include <PresetPorts.hxx>

Inheritance diagram for YACS::ENGINE::InputPresetPort:
Collaboration diagram for YACS::ENGINE::InputPresetPort:

Public Member Functions

 InputPresetPort (const std::string &name, Node *node, TypeCode *type)
 
 InputPresetPort (const InputPresetPort &other, Node *newHelder)
 
InputPortclone (Node *newHelder) const
 
void setData (std::string data)
 
std::string getData ()
 
virtual std::string dump ()
 
virtual std::string getAsString ()
 returns port value as a string that can be used in a GUI for example More...
 
virtual PyObject * getPyObj ()
 
virtual std::string typeName ()
 
- Public Member Functions inherited from YACS::ENGINE::InputXmlPort
 InputXmlPort (const std::string &name, Node *node, TypeCode *type)
 
 InputXmlPort (const InputXmlPort &other, Node *newHelder)
 
bool edIsManuallyInitialized () const
 Specifies if this port has been manually set by the call of InputPort::edInit. More...
 
void edRemoveManInit ()
 Removes eventually previous manual initialisation. More...
 
virtual void put (const void *data) throw (ConversionException)
 
void put (const char *data) throw (ConversionException)
 
InputPortclone (Node *newHelder) const
 
virtual const char * getXml () const
 
void * get () const throw (Exception)
 
bool isEmpty ()
 
virtual void exSaveInit ()
 Save the current data value for further reinitialization of the port. More...
 
virtual void exRestoreInit ()
 Restore the saved data value to current data value. More...
 
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::InputPort
virtual ~InputPort ()
 
std::string getNameOfTypeOfCurrentInstance () const
 
virtual InputPortgetPublicRepresentant ()
 returns the final physical port behind 'this'. More...
 
virtual bool isIntermediate () const
 
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 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 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 ()
 
- 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
 
- 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 ()
 

Protected Attributes

std::string _storeData
 
- Protected Attributes inherited from YACS::ENGINE::InputXmlPort
std::string _data
 
std::string _initData
 
- 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
 

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"
 
- 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)
 
- Static Protected Attributes inherited from YACS::ENGINE::Port
static int _total = 0
 
static const char NAME [] ="Port"
 

Detailed Description

Class for PRESET input Ports.

See Also
OutNode

Definition at line 49 of file PresetPorts.hxx.

Constructor & Destructor Documentation

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

Definition at line 155 of file PresetPorts.cxx.

Referenced by clone().

156  : InputXmlPort(name, node, type),
157  DataPort(name, node, type),
158  Port(node)
159 {
160 }
InputPresetPort::InputPresetPort ( const InputPresetPort other,
Node newHelder 
)

Definition at line 162 of file PresetPorts.cxx.

163  : InputXmlPort(other,newHelder),
164  DataPort(other,newHelder),
165  Port(other,newHelder),_storeData(other._storeData)
166 {
167 }

Member Function Documentation

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

Implements YACS::ENGINE::InputPort.

Definition at line 169 of file PresetPorts.cxx.

References InputPresetPort().

170 {
171  return new InputPresetPort(*this,newHelder);
172 }
std::string InputPresetPort::dump ( )
virtual

Reimplemented from YACS::ENGINE::InputXmlPort.

Definition at line 187 of file PresetPorts.cxx.

References YACS::ENGINE::InputXmlPort::_data.

Referenced by YACS::ENGINE::OutNode::dump(), and getPyObj().

188 {
189  return _data;
190 }
std::string InputPresetPort::getAsString ( )
virtual

returns port value as a string that can be used in a GUI for example

Do nothing here. To subclass

Reimplemented from YACS::ENGINE::DataPort.

Definition at line 204 of file PresetPorts.cxx.

References YACS::ENGINE::convertPyObjectToString(), DEBTRACE, and getPyObj().

205 {
207  PyObject* ob=getPyObj();
208  DEBTRACE(PyObject_Str(ob));
209  std::string s=convertPyObjectToString(ob);
210  DEBTRACE(s);
211  Py_DECREF(ob);
212  return s;
213 }
std::string InputPresetPort::getData ( )

Definition at line 181 of file PresetPorts.cxx.

References _storeData, and DEBTRACE.

Referenced by YACS::ENGINE::OutNode::dump().

182 {
183  DEBTRACE("InputPresetPort::getData " << _storeData);
184  return _storeData;
185 }
PyObject * InputPresetPort::getPyObj ( )
virtual

Definition at line 192 of file PresetPorts.cxx.

References YACS::ENGINE::InputXmlPort::_data, YACS::ENGINE::convertXmlStrPyObject(), DEBTRACE, dump(), and YACS::ENGINE::DataPort::edGetType().

Referenced by getAsString().

193 {
194  DEBTRACE(dump());
195  if(_data=="")
196  {
197  Py_INCREF(Py_None);
198  return Py_None;
199  }
200  else
202 }
void InputPresetPort::setData ( std::string  data)

Definition at line 174 of file PresetPorts.cxx.

References _storeData, DEBTRACE, and YACS::ENGINE::Port::modified().

Referenced by YACS::ENGINE::OutNode::setData().

175 {
176  _storeData = data;
177  DEBTRACE( "InputPresetPort::setData " << _storeData );
178  modified();
179 }
virtual std::string YACS::ENGINE::InputPresetPort::typeName ( )
inlinevirtual

Reimplemented from YACS::ENGINE::InputPort.

Definition at line 60 of file PresetPorts.hxx.

60 {return "YACS__ENGINE__InputPresetPort";}

Member Data Documentation

std::string YACS::ENGINE::InputPresetPort::_storeData
protected

Definition at line 62 of file PresetPorts.hxx.

Referenced by getData(), and setData().


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