Version: 8.3.0
YACS::ENGINE::InPort Class Reference

#include <InPort.hxx>

Inheritance diagram for YACS::ENGINE::InPort:
Collaboration diagram for YACS::ENGINE::InPort:

Public Member Functions

virtual InPortgetPublicRepresentant ()
 
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 ()
 
virtual std::string typeName ()
 
- Public Member Functions inherited from YACS::ENGINE::DataPort
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 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 ()
 

Protected Member Functions

 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 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 Attributes

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 Loop
 
class OutPort
 
class ProxyPort
 
class OutputPort
 
class DynParaLoop
 
class ForEachLoop
 
class SplitterNode
 
class ComposedNode
 
class OptimizerLoop
 
class ElementaryNode
 
class CollectorSwOutPort
 
class OutputDataStreamPort
 
class InterceptorInputPort
 

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

Detailed Description

Definition at line 46 of file InPort.hxx.

Constructor & Destructor Documentation

InPort::~InPort ( )
virtual

Definition at line 38 of file InPort.cxx.

39 {
40 }
InPort::InPort ( const InPort other,
Node newHelder 
)
protected

Definition at line 28 of file InPort.cxx.

29  :
30  DataPort(other,newHelder),Port(other,newHelder)
31 {
}
InPort::InPort ( const std::string &  name,
Node node,
TypeCode type 
)
protected

Definition at line 33 of file InPort.cxx.

34  :
35  DataPort(name,node,type),Port(node)
36 {
}

Member Function Documentation

int InPort::edGetNumberOfLinks ( ) const
virtual

Returns number of physical backlinks NOT number of user backlinks.

Reimplemented in YACS::ENGINE::ProxyPort.

Definition at line 43 of file InPort.cxx.

References _backLinks.

Referenced by YACS::ENGINE::ProxyPort::edGetNumberOfLinks(), YACS::ENGINE::DynParaLoop::isMultiplicitySpecified(), YACS::HMI::SchemaInPortItem::SchemaInPortItem(), YACS::ENGINE::OptimizerLoop::setAlgorithm(), YACS::ENGINE::InputCalStreamPort::setDepend(), and YACS::HMI::SchemaInPortItem::update().

44 {
45  return _backLinks.size();
46 }
void InPort::edNotifyDereferencedBy ( OutPort fromPort)
protectedvirtual

Reimplemented in YACS::ENGINE::ProxyPort, and YACS::ENGINE::ConditionInputPort.

Definition at line 74 of file InPort.cxx.

References _backLinks, and YACS::ENGINE::Port::modified().

Referenced by YACS::ENGINE::ConditionInputPort::edNotifyDereferencedBy(), and YACS::ENGINE::ProxyPort::edNotifyDereferencedBy().

75 {
76  _backLinks.erase(fromPort);
77  modified();
78 }
void InPort::edNotifyReferencedBy ( OutPort fromPort)
protectedvirtual

Reimplemented in YACS::ENGINE::ProxyPort, and YACS::ENGINE::ConditionInputPort.

Definition at line 68 of file InPort.cxx.

References _backLinks, and YACS::ENGINE::Port::modified().

Referenced by YACS::ENGINE::ConditionInputPort::edNotifyReferencedBy(), YACS::ENGINE::ProxyPort::edNotifyReferencedBy(), YACS::ENGINE::DynParaLoop::prepareInputsFromOutOfScope(), and YACS::ENGINE::DynParaLoop::putValueOnBranch().

69 {
70  _backLinks.insert(fromPort);
71  modified();
72 }
void InPort::edRemoveAllLinksLinkedWithMe ( ) throw (Exception)
protectedvirtual

Implements YACS::ENGINE::DataPort.

Reimplemented in YACS::ENGINE::ProxyPort.

Definition at line 48 of file InPort.cxx.

References _backLinks, YACS::ENGINE::Port::_node, YACS::ENGINE::ComposedNode::edRemoveLink(), YACS::ENGINE::Node::getRootNode(), and YACS::ENGINE::Port::modified().

Referenced by YACS::ENGINE::ProxyPort::edRemoveAllLinksLinkedWithMe(), and YACS::ENGINE::DynParaLoop::forceMultiplicity().

49 {
50  set<OutPort *> temp(_backLinks);//edRemoveLink called after causes invalidation of set iterator.
51  for(set<OutPort *>::iterator iter=temp.begin();iter!=temp.end();iter++)
52  {
53  set<OutPort *> trueBackOutputs;
54  (*iter)->getAllRepresented(trueBackOutputs);
55  for(set<OutPort *>::iterator iter2=trueBackOutputs.begin();iter2!=trueBackOutputs.end();iter2++)
56  _node->getRootNode()->edRemoveLink(*iter2,this);
57  }
58  _backLinks.clear();
59  modified();
60 }
std::set< OutPort * > InPort::edSetOutPort ( ) const
virtual

Returns physical backlinks NOT user backlinks.

Reimplemented in YACS::ENGINE::ProxyPort.

Definition at line 63 of file InPort.cxx.

References _backLinks.

Referenced by YACS::ENGINE::ProxyPort::edSetOutPort(), YACS::ENGINE::ElementaryNode::ensureLoading(), YACS::ENGINE::Switch::getAllInPortsComingFromOutsideOfCurrentScope(), YACS::ENGINE::OutputPort4DS2DF::getAllRepresented(), YACS::ENGINE::OptimizerLoop::initInterceptors(), and YACS::ENGINE::OptimizerLoop::OptimizerLoop().

64 {
65  return _backLinks;
66 }
void InPort::getAllRepresentants ( std::set< InPort * > &  repr) const
protectedvirtual

Reimplemented in YACS::ENGINE::ProxyPort, YACS::ENGINE::InputDataStreamPort4DS2DF, YACS::ENGINE::InterceptorInputPort, and YACS::ENGINE::InputPort4DF2DS.

Definition at line 80 of file InPort.cxx.

Referenced by YACS::ENGINE::ProxyPort::getAllRepresentants(), YACS::ENGINE::CollectorSwOutPort::isAlreadyLinkedWith(), and YACS::ENGINE::OutputPort::isAlreadyLinkedWith().

81 {
82  repr.insert((InPort *)this);
83 }
virtual InPort* YACS::ENGINE::InPort::getPublicRepresentant ( )
inlinevirtual

Reimplemented in YACS::ENGINE::ProxyPort, YACS::ENGINE::InputPort, and YACS::ENGINE::InPropertyPort.

Definition at line 62 of file InPort.hxx.

Referenced by YACS::ENGINE::OutputPort::edRemoveInputPort(), and YACS::ENGINE::OutputPort::isAlreadyLinkedWith().

62 { return this; }
virtual std::string YACS::ENGINE::InPort::typeName ( )
inlinevirtual

Reimplemented from YACS::ENGINE::DataPort.

Reimplemented in YACS::ENGINE::ProxyPort, YACS::ENGINE::InputPyPort, YACS::ENGINE::InputPort, YACS::ENGINE::InputCorbaPort, YACS::ENGINE::InputStudyPort, YACS::ENGINE::InputPresetPort, YACS::ENGINE::ConditionInputPort, YACS::ENGINE::InPropertyPort, YACS::ENGINE::AnyInputPort, and YACS::ENGINE::InputDataStreamPort.

Definition at line 66 of file InPort.hxx.

66 {return "YACS__ENGINE__InPort";}

Friends And Related Function Documentation

friend class CollectorSwOutPort
friend

Definition at line 58 of file InPort.hxx.

friend class ComposedNode
friend

Definition at line 55 of file InPort.hxx.

friend class DynParaLoop
friend

Definition at line 52 of file InPort.hxx.

friend class ElementaryNode
friend

Definition at line 57 of file InPort.hxx.

friend class ForEachLoop
friend

Definition at line 53 of file InPort.hxx.

friend class InterceptorInputPort
friend

Definition at line 60 of file InPort.hxx.

friend class Loop
friend

Definition at line 48 of file InPort.hxx.

friend class OptimizerLoop
friend

Definition at line 56 of file InPort.hxx.

friend class OutPort
friend

Definition at line 49 of file InPort.hxx.

friend class OutputDataStreamPort
friend

Definition at line 59 of file InPort.hxx.

friend class OutputPort
friend

Definition at line 51 of file InPort.hxx.

friend class ProxyPort
friend

Definition at line 50 of file InPort.hxx.

friend class SplitterNode
friend

Definition at line 54 of file InPort.hxx.

Member Data Documentation

std::set<OutPort *> YACS::ENGINE::InPort::_backLinks
protected

Definition at line 75 of file InPort.hxx.

Referenced by YACS::ENGINE::InputPort::checkBasicConsistency(), edGetNumberOfLinks(), YACS::ENGINE::InputPort::edIsInitialized(), edNotifyDereferencedBy(), edNotifyReferencedBy(), edRemoveAllLinksLinkedWithMe(), edSetOutPort(), and YACS::ENGINE::ElementaryNode::getReadyTasks().


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