Base class for Input Ports. More...
#include <InputPort.hxx>
Public Member Functions | |
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 void | exSaveInit ()=0 |
virtual void | exRestoreInit ()=0 |
virtual InputPort * | clone (Node *newHelder) const =0 |
virtual bool | isEmpty () |
virtual void * | get () const =0 |
virtual void | put (const void *data)=0 throw (ConversionException) |
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 | |
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 |
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 () |
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 () |
Static Public Attributes | |
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 | |
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 | |
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 |
Additional Inherited Members | |
Static Public Member Functions inherited from YACS::ENGINE::DataPort | |
static DataPort * | isCrossingType (const std::vector< DataPort * > &historyOfLink) |
Static Protected Attributes inherited from YACS::ENGINE::Port | |
static int | _total = 0 |
static const char | NAME [] ="Port" |
Base class for Input Ports.
Definition at line 43 of file InputPort.hxx.
|
virtual |
Definition at line 89 of file InputPort.cxx.
References _initValue, and YACS::ENGINE::RefCounter::decrRef().
|
protected |
Definition at line 48 of file InputPort.cxx.
bool InputPort::canBeNull | ( | ) | const |
Definition at line 174 of file InputPort.cxx.
References _canBeNull.
|
virtual |
Check basically that this port has one chance to be specified on time. It's a necessary condition not sufficient at all.
Definition at line 148 of file InputPort.cxx.
References YACS::ENGINE::InPort::_backLinks, _canBeNull, YACS::ENGINE::DataPort::_name, YACS::ENGINE::Port::_node, edIsManuallyInitialized(), and YACS::ENGINE::Node::getName().
Referenced by YACS::ENGINE::OutNode::checkBasicConsistency(), YACS::ENGINE::StudyOutNode::checkBasicConsistency(), and exInit().
Implemented in YACS::ENGINE::ProxyPort, YACS::ENGINE::SeqAnyInputPort, YACS::ENGINE::InputPyPort, YACS::ENGINE::InPropertyPort, YACS::ENGINE::InputStudyPort, YACS::ENGINE::InputCorbaPort, YACS::ENGINE::InputPresetPort, YACS::ENGINE::InterceptorInputPort, YACS::ENGINE::InputCppPort, YACS::ENGINE::AnyInputPort, YACS::ENGINE::InputPort4DF2DS, YACS::ENGINE::InputXmlPort, and YACS::ENGINE::ConditionInputPort.
Referenced by YACS::ENGINE::OptimizerLoop::initInterceptors().
|
virtual |
Reimplemented in YACS::ENGINE::InputPyPort, YACS::ENGINE::SeqAnyInputPort, YACS::ENGINE::InputCorbaPort, YACS::ENGINE::InputStudyPort, YACS::ENGINE::InputPresetPort, YACS::ENGINE::InputCppPort, YACS::ENGINE::InputXmlPort, YACS::ENGINE::ConditionInputPort, and YACS::ENGINE::AnyInputPort.
Definition at line 158 of file InputPort.cxx.
Referenced by getHumanRepr().
void YACS::ENGINE::InputPort::edInit | ( | T | value | ) |
Definition at line 126 of file InputPort.hxx.
References YACS::ENGINE::RefCounter::decrRef(), and YACS::ENGINE::AtomAny::New().
Referenced by YACS::ENGINE::Runtime::createForEachLoop(), YACS::ENGINE::RuntimeSALOME::createOptimizerLoop(), YACS::ENGINE::DynParaLoop::forceMultiplicity(), YACS::HMI::CommandSetInPortValue::localExecute(), YACS::HMI::CommandSetSwitchSelect::localExecute(), YACS::HMI::CommandSetForLoopSteps::localExecute(), YACS::HMI::CommandSetWhileCondition::localExecute(), YACS::HMI::CommandSetForEachBranch::localExecute(), YACS::HMI::CommandSetInPortValue::localReverse(), YACS::HMI::CommandSetSwitchSelect::localReverse(), YACS::HMI::CommandSetForLoopSteps::localReverse(), YACS::HMI::CommandSetWhileCondition::localReverse(), YACS::HMI::CommandSetForEachBranch::localReverse(), YACS::forlooptypeParser< T >::nsteps(), YACS::ENGINE::nodeParser::onEnd(), YACS::ENGINE::portParser::onEnd(), YACS::bloctypeParser< T >::parameter(), YACS::whilelooptypeParser< T >::post(), YACS::switchtypeParser::select(), and YACS::ENGINE::Proc::setInPortValue().
void InputPort::edInit | ( | Any * | value | ) |
Definition at line 95 of file InputPort.cxx.
References YACS::ENGINE::DataPort::_type, YACS::ENGINE::Runtime::adapt(), exSaveInit(), YACS::ENGINE::getRuntime(), YACS::ENGINE::Port::modified(), put(), and YACS::ENGINE::Runtime::RUNTIME_ENGINE_INTERACTION_IMPL_NAME.
void InputPort::edInit | ( | const std::string & | impl, |
const void * | value | ||
) |
Initialize the port with an object (value) coming from a world with implementation impl.
You should be careful when using this method : the caller must set the context according to implementation For instance, if implementation is Python, the caller must hold the Global Interpreter Lock (also known as GIL).
Definition at line 120 of file InputPort.cxx.
References YACS::ENGINE::DataPort::_type, YACS::ENGINE::Runtime::adapt(), exSaveInit(), YACS::ENGINE::getRuntime(), YACS::ENGINE::Port::modified(), and put().
bool InputPort::edIsInitialized | ( | ) | const |
soon deprecated
Perform a quick and not complete check. Use ComposedNode::CheckConsistency instead.
Definition at line 84 of file InputPort.cxx.
References YACS::ENGINE::InPort::_backLinks, and edIsManuallyInitialized().
|
virtual |
Specifies if this port has been manually set by the call of InputPort::edInit.
Reimplemented in YACS::ENGINE::InputPyPort, YACS::ENGINE::InputCorbaPort, YACS::ENGINE::InputCppPort, and YACS::ENGINE::InputXmlPort.
Definition at line 76 of file InputPort.cxx.
References _initValue.
Referenced by checkBasicConsistency(), edIsInitialized(), YACS::ENGINE::DynParaLoop::isMultiplicitySpecified(), YACS::HMI::SchemaInPortItem::SchemaInPortItem(), and YACS::HMI::SchemaInPortItem::update().
|
virtual |
Removes eventually previous manual initialisation.
Reimplemented in YACS::ENGINE::InputPyPort, YACS::ENGINE::InputCorbaPort, YACS::ENGINE::InputCppPort, and YACS::ENGINE::InputXmlPort.
Definition at line 140 of file InputPort.cxx.
References _initValue, and YACS::ENGINE::RefCounter::decrRef().
Referenced by YACS::ENGINE::InputXmlPort::edRemoveManInit(), YACS::ENGINE::InputCppPort::edRemoveManInit(), YACS::ENGINE::InputCorbaPort::edRemoveManInit(), and YACS::ENGINE::InputPyPort::edRemoveManInit().
|
virtual |
Definition at line 63 of file InputPort.cxx.
References checkBasicConsistency(), and exRestoreInit().
Referenced by YACS::ENGINE::ForLoop::init(), YACS::ENGINE::WhileLoop::init(), YACS::ENGINE::DynParaLoop::init(), YACS::ENGINE::OptimizerLoop::init(), and YACS::ENGINE::SplitterNode::init().
|
pure virtual |
Implemented in YACS::ENGINE::ProxyPort, YACS::ENGINE::InputPyPort, YACS::ENGINE::InputCorbaPort, YACS::ENGINE::InPropertyPort, YACS::ENGINE::InputCppPort, YACS::ENGINE::InputXmlPort, YACS::ENGINE::InputPort4DF2DS, YACS::ENGINE::ConditionInputPort, and YACS::ENGINE::AnyInputPort.
Referenced by exInit(), and YACS::ENGINE::ProxyPort::exRestoreInit().
|
pure virtual |
Implemented in YACS::ENGINE::ProxyPort, YACS::ENGINE::InputPyPort, YACS::ENGINE::InputCorbaPort, YACS::ENGINE::InPropertyPort, YACS::ENGINE::InputCppPort, YACS::ENGINE::InputPort4DF2DS, YACS::ENGINE::InputXmlPort, YACS::ENGINE::ConditionInputPort, and YACS::ENGINE::AnyInputPort.
Referenced by edInit(), and YACS::ENGINE::ProxyPort::exSaveInit().
|
pure virtual |
Implemented in YACS::ENGINE::ProxyPort, YACS::ENGINE::InputPyPort, YACS::ENGINE::InPropertyPort, YACS::ENGINE::InputCorbaPort, YACS::ENGINE::InputCppPort, YACS::ENGINE::InputPort4DF2DS, YACS::ENGINE::InputXmlPort, YACS::ENGINE::ConditionInputPort, and YACS::ENGINE::AnyInputPort.
Referenced by YACS::ENGINE::ProxyPort::get(), YACS::ENGINE::DynParaLoop::prepareInputsFromOutOfScope(), YACS::ENGINE::VisitorSaveState::visitForLoop(), and YACS::ENGINE::VisitorSaveState::visitSwitch().
|
virtual |
Reimplemented in YACS::ENGINE::InputPyPort.
Definition at line 164 of file InputPort.cxx.
References dump().
|
virtual |
Reimplemented from YACS::ENGINE::DataFlowPort.
Definition at line 58 of file InputPort.cxx.
References NAME.
|
inlinevirtual |
returns the final physical port behind 'this'.
Reimplemented from YACS::ENGINE::InPort.
Reimplemented in YACS::ENGINE::ProxyPort, and YACS::ENGINE::InPropertyPort.
Definition at line 57 of file InputPort.hxx.
Referenced by YACS::ENGINE::ProxyPort::getPublicRepresentant(), YACS::ENGINE::OptimizerLoop::initInterceptors(), and YACS::ENGINE::OutputPort::isAlreadyInSet().
|
virtual |
Reimplemented in YACS::ENGINE::InputPyPort, YACS::ENGINE::InputCorbaPort, YACS::ENGINE::InputCppPort, YACS::ENGINE::InputXmlPort, and YACS::ENGINE::AnyInputPort.
Definition at line 70 of file InputPort.cxx.
Referenced by YACS::ENGINE::WhileLoop::exUpdateState(), YACS::ENGINE::VisitorSaveState::visitForLoop(), YACS::ENGINE::VisitorSaveState::visitSwitch(), and YACS::ENGINE::VisitorSaveState::visitWhileLoop().
|
inlinevirtual |
Reimplemented in YACS::ENGINE::ProxyPort.
Definition at line 59 of file InputPort.hxx.
|
pure virtual |
Implemented in YACS::ENGINE::CorbaPyStruct, YACS::ENGINE::ProxyPort, YACS::ENGINE::CorbaPySequence, YACS::ENGINE::CorbaPyObjref, YACS::ENGINE::PyCorbaStruct, YACS::ENGINE::NeutralCorbaStruct, YACS::ENGINE::NeutralPyStruct, YACS::ENGINE::PyCorbaSequence, YACS::ENGINE::CorbaPyBool, YACS::ENGINE::NeutralCorbaObjref, YACS::ENGINE::NeutralPySequence, YACS::ENGINE::InputPyPort, YACS::ENGINE::NeutralCorbaString, YACS::ENGINE::PyCorbaObjref, YACS::ENGINE::NeutralPyObjref, YACS::ENGINE::CorbaPyString, YACS::ENGINE::NeutralCorbaSequence, YACS::ENGINE::PyCorbaBool, YACS::ENGINE::NeutralPyBool, YACS::ENGINE::InPropertyPort, YACS::ENGINE::NeutralCorbaBool, YACS::ENGINE::PyCorbaString, YACS::ENGINE::CorbaPyInt, YACS::ENGINE::NeutralPyString, YACS::ENGINE::InputCorbaPort, YACS::ENGINE::ConditionInputPort, YACS::ENGINE::NeutralCorbaDouble, YACS::ENGINE::PyCorbaDouble, YACS::ENGINE::AnyInputPort, YACS::ENGINE::InputCppPort, YACS::ENGINE::InputPort4DF2DS, YACS::ENGINE::NeutralPyInt, YACS::ENGINE::InputXmlPort, YACS::ENGINE::CorbaPyDouble, YACS::ENGINE::CorbaCorba, YACS::ENGINE::CppCpp, YACS::ENGINE::NeutralCpp, YACS::ENGINE::NeutralInit, YACS::ENGINE::NeutralXml, YACS::ENGINE::NeutralCorbaInt, YACS::ENGINE::PyCorbaInt, YACS::ENGINE::CorbaCpp, YACS::ENGINE::CorbaNeutral, YACS::ENGINE::CorbaXml, YACS::ENGINE::CppCorba, YACS::ENGINE::PyCpp, YACS::ENGINE::PyInit, YACS::ENGINE::XmlCorba, YACS::ENGINE::NeutralPyDouble, YACS::ENGINE::PyNeutral, YACS::ENGINE::PyXml, YACS::ENGINE::CppNeutral, YACS::ENGINE::CppPy, YACS::ENGINE::CppXml, YACS::ENGINE::XmlCpp, YACS::ENGINE::XmlNeutral, and YACS::ENGINE::XmlPython.
Referenced by edInit(), YACS::ENGINE::DynParaLoop::prepareInputsFromOutOfScope(), and YACS::ENGINE::DynParaLoop::putValueOnBranch().
|
virtual |
Definition at line 169 of file InputPort.cxx.
References _stringRef.
|
inlinevirtual |
Reimplemented from YACS::ENGINE::DataFlowPort.
Reimplemented in YACS::ENGINE::ProxyPort, YACS::ENGINE::InputPyPort, YACS::ENGINE::InputCorbaPort, YACS::ENGINE::InputStudyPort, YACS::ENGINE::InputPresetPort, YACS::ENGINE::ConditionInputPort, YACS::ENGINE::InPropertyPort, and YACS::ENGINE::AnyInputPort.
Definition at line 81 of file InputPort.hxx.
|
friend |
Definition at line 46 of file InputPort.hxx.
|
friend |
Definition at line 45 of file InputPort.hxx.
|
protected |
Definition at line 89 of file InputPort.hxx.
Referenced by canBeNull(), and checkBasicConsistency().
|
protected |
Definition at line 87 of file InputPort.hxx.
Referenced by edIsManuallyInitialized(), edRemoveManInit(), YACS::ENGINE::AnyInputPort::exRestoreInit(), YACS::ENGINE::ConditionInputPort::exRestoreInit(), YACS::ENGINE::InputPort4DF2DS::exRestoreInit(), YACS::ENGINE::AnyInputPort::exSaveInit(), YACS::ENGINE::ConditionInputPort::exSaveInit(), YACS::ENGINE::InputPort4DF2DS::exSaveInit(), InputPort(), and ~InputPort().
|
protected |
Definition at line 88 of file InputPort.hxx.
Referenced by YACS::ENGINE::InputCppPort::dump(), YACS::ENGINE::InputCorbaPort::dump(), YACS::ENGINE::InputPyPort::dump(), and setStringRef().
|
static |
Definition at line 48 of file InputPort.hxx.
Referenced by YACS::ENGINE::OutputPort::addInPort(), YACS::ENGINE::DynParaLoop::buildDelegateOf(), YACS::ENGINE::Loop::buildDelegateOf(), YACS::ENGINE::Loop::getDelegateOf(), getNameOfTypeOfCurrentInstance(), YACS::ENGINE::Loop::releaseDelegateOf(), and YACS::ENGINE::OutputPort::removeInPort().