Version: 8.3.0
YACS::ENGINE::DataPort Class Referenceabstract

#include <DataPort.hxx>

Inheritance diagram for YACS::ENGINE::DataPort:
Collaboration diagram for YACS::ENGINE::DataPort:

Public Member Functions

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 throw (Exception)
 
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
 
int getNumId () const
 
void modified ()
 

Static Public Member Functions

static DataPortisCrossingType (const std::vector< DataPort * > &historyOfLink)
 

Static Public Attributes

static const char NAME [] ="DataPort"
 

Protected Member Functions

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 Attributes

TypeCode_type
 
std::string _name
 
- Protected Attributes inherited from YACS::ENGINE::Port
Node_node
 
int _id
 

Additional Inherited Members

- 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 DataPort.hxx.

Constructor & Destructor Documentation

DataPort::~DataPort ( )
protectedvirtual

Definition at line 29 of file DataPort.cxx.

30 {
31  if(_type)
32  _type->decrRef();
33 }
DataPort::DataPort ( const DataPort other,
Node newHelder 
)
protected

Definition at line 41 of file DataPort.cxx.

References _type, and YACS::ENGINE::RefCounter::incrRef().

41  :Port(other,newHelder),_name(other._name),_type(other._type)
42 {
43  if(_type)
44  _type->incrRef();
45 }
DataPort::DataPort ( const std::string &  name,
Node node,
TypeCode type 
)
protected

Definition at line 35 of file DataPort.cxx.

References _type, and YACS::ENGINE::RefCounter::incrRef().

35  :Port(node),_name(name),_type(type)
36 {
37  if(_type)
38  _type->incrRef();
39 }

Member Function Documentation

TypeCode* YACS::ENGINE::DataPort::edGetType ( ) const
inline

Definition at line 53 of file DataPort.hxx.

Referenced by YACS::HMI::SubjectNode::addSubjectIDSPort(), YACS::HMI::SubjectNode::addSubjectInputPort(), YACS::HMI::SubjectNode::addSubjectODSPort(), YACS::HMI::SubjectNode::addSubjectOutputPort(), YACS::ENGINE::Loop::buildDelegateOf(), YACS::ENGINE::ForEachLoop::buildDelegateOf(), YACS::ENGINE::SalomePythonNode::cloneNode(), YACS::ENGINE::CppNode::cloneNode(), YACS::ENGINE::PythonNode::cloneNode(), YACS::ENGINE::PyFuncNode::cloneNode(), YACS::HMI::ValueDelegate::createEditor(), YACS::ENGINE::InputCppPort::dump(), YACS::ENGINE::InputCorbaPort::dump(), YACS::ENGINE::OutputCppPort::dump(), YACS::ENGINE::InputPyPort::dump(), YACS::ENGINE::OutputCorbaPort::dump(), YACS::ENGINE::OutputPyPort::dump(), YACS::HMI::EditionForEachLoop::EditionForEachLoop(), YACS::ENGINE::XmlNode::execute(), YACS::ENGINE::SalomePythonNode::execute(), YACS::ENGINE::CORBANode::execute(), YACS::ENGINE::DistributedPythonNode::execute(), YACS::ENGINE::SalomeNode::execute(), YACS::ENGINE::PythonNode::executeLocal(), YACS::ENGINE::PyFuncNode::executeLocal(), YACS::ENGINE::PythonNode::executeRemote(), YACS::ENGINE::PyFuncNode::executeRemote(), YACS::ENGINE::OutputCorbaPort::getAnyOut(), YACS::ENGINE::AnyOutputPort::getAsString(), YACS::ENGINE::AnyInputPort::getAsString(), YACS::ENGINE::OutputPresetPort::getData(), YACS::ENGINE::OutputStudyPort::getDataFromStudy(), YACS::ENGINE::InputStudyPort::getIOR(), YACS::ENGINE::OutputPresetPort::getPyObj(), YACS::ENGINE::InputPresetPort::getPyObj(), YACS::ENGINE::InputCorbaPort::getPyObj(), YACS::ENGINE::OutputCorbaPort::getPyObj(), YACS::ENGINE::SalomePythonNode::load(), YACS::ENGINE::PyFuncNode::loadLocal(), YACS::HMI::CommandSetInPortValue::localExecute(), YACS::HMI::CommandSetOutPortValue::localExecute(), YACS::HMI::CommandSetInPortValue::localReverse(), YACS::HMI::CommandSetOutPortValue::localReverse(), YACS::HMI::TreeView::onCommitData(), YACS::ENGINE::InputStudyPort::putDataInStudy(), YACS::ENGINE::OutputStudyPort::putIOR(), YACS::ENGINE::DynParaLoop::putValueOnBranch(), YACS::HMI::SubjectDataPort::registerUndoDestroy(), YACS::HMI::SchemaInPortItem::SchemaInPortItem(), YACS::HMI::SchemaOutPortItem::SchemaOutPortItem(), YACS::ENGINE::Proc::setInPortValue(), YACS::HMI::SchemaOutPortItem::update(), YACS::HMI::SchemaInPortItem::update(), YACS::HMI::EditionOptimizerLoop::update(), and YACS::ENGINE::VisitorSaveSchema::visitForEachLoop().

53 { return _type; }
virtual void YACS::ENGINE::DataPort::edRemoveAllLinksLinkedWithMe ( ) throw (Exception)
pure virtual
void DataPort::edSetType ( TypeCode type)

Definition at line 47 of file DataPort.cxx.

References _type, YACS::ENGINE::RefCounter::decrRef(), and YACS::ENGINE::RefCounter::incrRef().

Referenced by YACS::ENGINE::Switch::buildDelegateOf(), and YACS::ENGINE::OptimizerLoop::setAlgorithm().

48 {
49  if(_type)
50  _type->decrRef();
51  _type=type;
52  if(_type)
53  _type->incrRef();
54 }
std::string DataPort::getAsString ( )
virtual

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

Do nothing here. To subclass

Reimplemented in YACS::ENGINE::OutputPyPort, YACS::ENGINE::OutputCorbaPort, YACS::ENGINE::InputPyPort, YACS::ENGINE::InputStudyPort, YACS::ENGINE::InputCorbaPort, YACS::ENGINE::InputPresetPort, YACS::ENGINE::ConditionInputPort, YACS::ENGINE::AnyInputPort, YACS::ENGINE::AnyOutputPort, YACS::ENGINE::OutputStudyPort, and YACS::ENGINE::OutputPresetPort.

Definition at line 84 of file DataPort.cxx.

Referenced by YACS::ENGINE::Proc::getInPortValue(), YACS::ENGINE::Proc::getOutPortValue(), YACS::HMI::SubjectForLoop::getValue(), YACS::HMI::SubjectWhileLoop::getValue(), YACS::HMI::SubjectSwitch::getValue(), YACS::HMI::SubjectDynParaLoop::getValue(), 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::SchemaInPortItem::SchemaInPortItem(), YACS::HMI::SchemaOutPortItem::SchemaOutPortItem(), YACSPMMLBasicsTest1::testYACSdriver_LRANN(), YACSPMMLBasicsTest1::testYACSdriver_PmmlDoesNotExist(), YACSPMMLBasicsTest1::testYACSdriverLinearRegression(), YACSPMMLBasicsTest1::testYACSdriverNeuralNetwork(), YACS::HMI::SchemaOutPortItem::update(), YACS::HMI::SchemaInPortItem::update(), YACS::HMI::EditionForEachLoop::update(), and YACS::HMI::EditionOptimizerLoop::update().

85 {
86  return "";
87 }
std::string YACS::ENGINE::DataPort::getName ( ) const
inline

Definition at line 55 of file DataPort.hxx.

Referenced by YACS::ENGINE::RuntimeSALOME::adaptXmlToXml(), YACS::ENGINE::CollectorSwOutPort::addPotentialProducerForMaster(), YACS::HMI::SubjectNode::addSubjectIDSPort(), YACS::HMI::SubjectNode::addSubjectInputPort(), YACS::HMI::SubjectNode::addSubjectODSPort(), YACS::HMI::SubjectNode::addSubjectOutputPort(), YACS::ENGINE::DynParaLoop::buildDelegateOf(), YACS::ENGINE::OptimizerLoop::buildDelegateOf(), YACS::ENGINE::Loop::buildDelegateOf(), YACS::ENGINE::OutputPresetPort::checkBasicConsistency(), YACS::ENGINE::ForEachLoopPassedData::checkLevel2(), YACS::ENGINE::DynParaLoop::cloneAndPlaceNodesCoherently(), YACS::ENGINE::SalomePythonNode::cloneNode(), YACS::ENGINE::CppNode::cloneNode(), YACS::ENGINE::PythonNode::cloneNode(), YACS::ENGINE::PyFuncNode::cloneNode(), YACS::ENGINE::ElementaryNode::createMultiDatastreamPorts(), YACS::ENGINE::XmlNode::execute(), YACS::ENGINE::SalomePythonNode::execute(), YACS::ENGINE::CORBANode::execute(), YACS::ENGINE::DistributedPythonNode::execute(), YACS::ENGINE::SalomeNode::execute(), YACS::ENGINE::PythonNode::executeLocal(), YACS::ENGINE::PyFuncNode::executeLocal(), YACS::ENGINE::PythonNode::executeRemote(), YACS::ENGINE::PyFuncNode::executeRemote(), YACS::ENGINE::Loop::getDelegateOf(), YACS::ENGINE::CollectorSwOutPort::getHumanReprOfIncompleteCases(), YACS::HMI::SubjectDataPort::getName(), YACS::ENGINE::SalomePythonNode::load(), YACS::HMI::SubjectComposedNode::loadLinks(), YACS::ENGINE::PyFuncNode::loadLocal(), YACS::HMI::CommandOrderInputPorts::localExecute(), YACS::HMI::CommandOrderOutputPorts::localExecute(), YACS::HMI::CommandOrderInputPorts::localReverse(), YACS::HMI::CommandOrderOutputPorts::localReverse(), YACS::ENGINE::InputStudyPort::putDataInStudy(), YACS::HMI::SubjectLink::registerUndoDestroy(), YACS::ENGINE::Loop::releaseDelegateOf(), YACS::HMI::SubjectComposedNode::removeLink(), YACS::HMI::SubjectNode::saveLinks(), YACS::HMI::GuiExecutor::setInPortValue(), YACS::HMI::SubjectDataPort::setName(), YACS::HMI::SubjectInputPort::SubjectInputPort(), YACS::ENGINE::VisitorSaveSchema::writeSimpleDataLinks(), YACS::ENGINE::VisitorSaveSchema::writeSimpleStreamLinks(), and YACS::ENGINE::OutputCorbaPort::~OutputCorbaPort().

55 { return _name; }
virtual TypeOfChannel YACS::ENGINE::DataPort::getTypeOfChannel ( ) const
pure virtual

returns type of channel the port will use for data exchange on runtime : DATAFLOW or DATASTREAM.

Implemented in YACS::ENGINE::CollectorSwOutPort, YACS::ENGINE::DataStreamPort, and YACS::ENGINE::DataFlowPort.

Referenced by isDifferentTypeOf().

DataPort * DataPort::isCrossingType ( const std::vector< DataPort * > &  historyOfLink)
static

If in historyOfLink different type of Port are detected : The first one (by starting from the end of 'historyOfLink') is returned. Else 0 is returned if they are all of the same type.

Definition at line 70 of file DataPort.cxx.

References isDifferentTypeOf().

71 {
72  vector<DataPort *>::const_reverse_iterator iter=historyOfLink.rbegin()+1;
73  const DataPort *base=historyOfLink.back();
74  for(;iter!=historyOfLink.rend();iter++)
75  if(base->isDifferentTypeOf(*iter))
76  return *iter;
77  return 0;
78 }
bool DataPort::isDifferentTypeOf ( const DataPort other) const

Definition at line 61 of file DataPort.cxx.

References getTypeOfChannel().

Referenced by isCrossingType().

62 {
63  return getTypeOfChannel()!=other->getTypeOfChannel();
64 }

Member Data Documentation

TypeCode* YACS::ENGINE::DataPort::_type
protected
const char DataPort::NAME ="DataPort"
static

Definition at line 47 of file DataPort.hxx.

Referenced by getNameOfTypeOfCurrentInstance().


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