#include <AnyInputPort.hxx>
Public Member Functions | |
AnyInputPort (const std::string &name, Node *node, TypeCode *type, bool canBeNull=false) | |
AnyInputPort (const AnyInputPort &other, Node *newHelder) | |
virtual | ~AnyInputPort () |
void | exSaveInit () |
Save the current data value for further reinitialization of the port. More... | |
void | exRestoreInit () |
Restore the saved data value to current data value. More... | |
Any * | getValue () const |
int | getIntValue () const |
void | put (Any *data) |
void * | get () const |
virtual std::string | getAsString () |
returns port value as a string that can be used in a GUI for example More... | |
virtual bool | isEmpty () |
void | put (const void *data) throw (ConversionException) |
InputPort * | clone (Node *newHelder) const |
std::string | dump () |
virtual std::string | typeName () |
Public Member Functions inherited from YACS::ENGINE::InputPort | |
virtual | ~InputPort () |
std::string | getNameOfTypeOfCurrentInstance () const |
virtual InputPort * | getPublicRepresentant () |
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 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 () |
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 | |
TypeCode * | edGetType () 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 () |
Node * | getNode () 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 | |
Any * | _value |
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 |
Private Attributes | |
YACS::BASES::Mutex | _mutex |
Additional Inherited Members | |
Static Public Member Functions inherited from YACS::ENGINE::DataPort | |
static DataPort * | isCrossingType (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" |
Definition at line 33 of file AnyInputPort.hxx.
AnyInputPort::AnyInputPort | ( | const AnyInputPort & | other, |
Node * | newHelder | ||
) |
|
virtual |
Definition at line 53 of file AnyInputPort.cxx.
References _value, DEBTRACE, YACS::ENGINE::RefCounter::decrRef(), and YACS::ENGINE::RefCounter::getRefCnt().
Implements YACS::ENGINE::InputPort.
Reimplemented in YACS::ENGINE::SeqAnyInputPort, and YACS::ENGINE::InterceptorInputPort.
Definition at line 120 of file AnyInputPort.cxx.
References AnyInputPort().
Referenced by YACS::ENGINE::OptimizerLoop::initInterceptors().
|
virtual |
Reimplemented from YACS::ENGINE::InputPort.
Reimplemented in YACS::ENGINE::SeqAnyInputPort.
Definition at line 125 of file AnyInputPort.cxx.
References YACS::ENGINE::DataPort::_name, _value, YACS::ENGINE::Bool, YACS::ENGINE::Double, YACS::ENGINE::Any::getBoolValue(), YACS::ENGINE::Any::getDoubleValue(), YACS::ENGINE::Any::getIntValue(), YACS::ENGINE::Any::getStringValue(), YACS::ENGINE::Any::getType(), YACS::ENGINE::Int, YACS::ENGINE::TypeCode::kind(), and YACS::ENGINE::String.
|
virtual |
Restore the saved data value to current data value.
If no data has been saved (_initValue == 0) don't restore
Implements YACS::ENGINE::InputPort.
Definition at line 77 of file AnyInputPort.cxx.
References YACS::ENGINE::InputPort::_initValue, _value, YACS::ENGINE::RefCounter::decrRef(), and YACS::ENGINE::RefCounter::incrRef().
|
virtual |
Save the current data value for further reinitialization of the port.
Implements YACS::ENGINE::InputPort.
Definition at line 66 of file AnyInputPort.cxx.
References YACS::ENGINE::InputPort::_initValue, _value, YACS::ENGINE::RefCounter::decrRef(), and YACS::ENGINE::RefCounter::incrRef().
|
virtual |
Implements YACS::ENGINE::InputPort.
Definition at line 104 of file AnyInputPort.cxx.
References _value.
|
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 109 of file AnyInputPort.cxx.
References _mutex, _value, YACS::ENGINE::Runtime::convertNeutralAsString(), YACS::ENGINE::DataPort::edGetType(), and YACS::ENGINE::getRuntime().
|
inline |
Definition at line 42 of file AnyInputPort.hxx.
Referenced by YACS::ENGINE::ForLoop::exUpdateState(), YACS::ENGINE::OptimizerLoop::exUpdateState(), YACS::ENGINE::Switch::exUpdateState(), YACS::ENGINE::ForEachLoop::exUpdateState(), YACS::ENGINE::OptimizerLoop::finalize(), YACS::ENGINE::DynParaLoop::getMaxLevelOfParallelism(), YACS::ENGINE::ForEachLoop::getNbOfElementsToBeProcessed(), YACS::ENGINE::ForLoop::getNbSteps(), YACS::ENGINE::Switch::getReadyTasks(), YACS::ENGINE::DynParaLoop::isMultiplicitySpecified(), YACS::ENGINE::ForLoop::updateStateOnFinishedEventFrom(), YACS::ENGINE::VisitorSaveSchema::visitForEachLoop(), YACS::ENGINE::VisitorSaveSchema::visitForLoop(), YACS::ENGINE::VisitorSaveSchema::visitOptimizerLoop(), and YACS::ENGINE::VisitorSaveSchema::visitSwitch().
|
inline |
Definition at line 41 of file AnyInputPort.hxx.
Referenced by YACS::ENGINE::OptimizerLoop::exUpdateState().
|
virtual |
Reimplemented from YACS::ENGINE::InputPort.
Definition at line 99 of file AnyInputPort.cxx.
References _value.
Referenced by YACS::ENGINE::ForLoop::exUpdateState(), YACS::ENGINE::Switch::exUpdateState(), YACS::ENGINE::ForLoop::getNbSteps(), YACS::ENGINE::VisitorSaveSchema::visitForEachLoop(), YACS::ENGINE::VisitorSaveSchema::visitForLoop(), YACS::ENGINE::VisitorSaveSchema::visitOptimizerLoop(), and YACS::ENGINE::VisitorSaveSchema::visitSwitch().
void AnyInputPort::put | ( | Any * | data | ) |
Definition at line 87 of file AnyInputPort.cxx.
References _mutex, _value, DEBTRACE, YACS::ENGINE::RefCounter::decrRef(), YACS::ENGINE::RefCounter::getRefCnt(), and YACS::ENGINE::RefCounter::incrRef().
Referenced by YACS::ENGINE::OptimizerLoop::setAlgorithm().
|
virtual |
Implements YACS::ENGINE::InputPort.
Definition at line 115 of file AnyInputPort.cxx.
|
inlinevirtual |
Reimplemented from YACS::ENGINE::InputPort.
Definition at line 50 of file AnyInputPort.hxx.
|
private |
Definition at line 54 of file AnyInputPort.hxx.
Referenced by getAsString(), and put().
|
protected |
Definition at line 52 of file AnyInputPort.hxx.
Referenced by AnyInputPort(), dump(), exRestoreInit(), exSaveInit(), get(), getAsString(), YACS::ENGINE::SeqAnyInputPort::getNumberOfElements(), YACS::ENGINE::SeqAnyInputPort::getValueAtRank(), isEmpty(), put(), and ~AnyInputPort().