Version: 9.15.0
YACS::ENGINE::AnySplitOutputPort Class Reference

#include <ForEachLoop.hxx>

Inheritance diagram for YACS::ENGINE::AnySplitOutputPort:
Collaboration diagram for YACS::ENGINE::AnySplitOutputPort:

Private Member Functions

bool decrRef ()
 
void incrRef () const
 
 AnySplitOutputPort (const std::string &name, Node *node, TypeCode *type)
 
 AnySplitOutputPort (const AnySplitOutputPort &other, Node *newHelder)
 
bool addInPort (InPort *inPort)
 
void getAllRepresented (std::set< OutPort * > &represented) const
 
int removeInPort (InPort *inPort, bool forward)
 
void addRepr (OutPort *repr, InterceptorInputPort *intercptr)
 
OutPortgetRepr () const
 
OutputPortclone (Node *newHelder) const
 

Private Attributes

OutPort_repr
 
InterceptorInputPort_intercptr
 
unsigned int _cnt
 

Friends

class ForEachLoopGen
 
class SplitterNode
 

Additional Inherited Members

- Public Member Functions inherited from YACS::ENGINE::OutputPort
virtual ~OutputPort ()
 
std::set< InPort * > edSetInPort () const
 
bool isAlreadyLinkedWith (InPort *withp) const
 
bool isAlreadyInSet (InputPort *inputPort) const
 
bool isConnected () const
 
std::string getNameOfTypeOfCurrentInstance () const
 
int removeInPort (InPort *inPort, bool forward)
 
virtual bool edAddInputPort (InputPort *phyPort)
 
virtual bool edAddInPropertyPort (InPropertyPort *phyPort)
 
virtual int edRemoveInputPort (InputPort *inputPort, bool forward)
 
bool addInPort (InPort *inPort)
 
void edRemoveAllLinksLinkedWithMe ()
 
virtual void exInit ()
 
virtual void checkBasicConsistency () const
 Check validity of output port. Nothing on base class. More...
 
virtual std::string dump ()
 
virtual void put (const void *data)
 
virtual std::string typeName ()
 
- 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
TypeCodeedGetType () 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 ()
 
NodegetNode () const
 
int getNumId () const
 
void modified ()
 
- Public Member Functions inherited from YACS::ENGINE::OutPort
virtual void checkConsistency (LinkInfo &info) const
 
virtual int edGetNumberOfOutLinks () const
 
virtual ~OutPort ()
 
std::vector< DataPort * > calculateHistoryOfLinkWith (InPort *end)
 
- Static Public Member Functions inherited from YACS::ENGINE::DataPort
static DataPortisCrossingType (const std::vector< DataPort * > &historyOfLink)
 
- Static Public Attributes inherited from YACS::ENGINE::OutputPort
static const char NAME [] ="OutputPort"
 
- 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 inherited from YACS::ENGINE::OutputPort
 OutputPort (const OutputPort &other, Node *newHelder)
 
 OutputPort (const std::string &name, Node *node, TypeCode *type)
 
const std::set< InputPort * > & getSetOfPhyLinks () const
 Returns physical links linked to this. Contrary to edSetInPort that returns semantic links. More...
 
- 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::OutPort
 OutPort (const OutPort &other, Node *newHelder)
 
 OutPort (const std::string &name, Node *node, TypeCode *type)
 
- Protected Attributes inherited from YACS::ENGINE::OutputPort
std::set< InputPort * > _setOfInputPort
 
- Protected Attributes inherited from YACS::ENGINE::DataPort
TypeCode_type
 
std::string _name
 
- Protected Attributes inherited from YACS::ENGINE::Port
Node_node
 
int _id
 
- Static Protected Attributes inherited from YACS::ENGINE::Port
static int _total = 0
 
static const char NAME [] ="Port"
 

Detailed Description

Definition at line 54 of file ForEachLoop.hxx.

Constructor & Destructor Documentation

◆ AnySplitOutputPort() [1/2]

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

Definition at line 98 of file ForEachLoop.cxx.

98  :OutputPort(name,node,type),
99  DataPort(name,node,type),Port(node),
100  _repr(0),_intercptr(0),_cnt(1)
101 {
102 }
InterceptorInputPort * _intercptr
Definition: ForEachLoop.hxx:60
DataPort(const DataPort &other, Node *newHelder)
Definition: DataPort.cxx:41
OutputPort(const OutputPort &other, Node *newHelder)
Definition: OutputPort.cxx:38
Port(Node *node)
Definition: Port.cxx:34

Referenced by clone().

◆ AnySplitOutputPort() [2/2]

AnySplitOutputPort::AnySplitOutputPort ( const AnySplitOutputPort other,
Node newHelder 
)
private

Definition at line 104 of file ForEachLoop.cxx.

104  :OutputPort(other,newHelder),
105  DataPort(other,newHelder),
106  Port(other,newHelder),
107  _repr(0),_intercptr(0),_cnt(1)
108 {
109 }

Member Function Documentation

◆ addInPort()

bool AnySplitOutputPort::addInPort ( InPort inPort)
privatevirtual

Implements YACS::ENGINE::OutPort.

Definition at line 111 of file ForEachLoop.cxx.

112 {
113  bool ret=OutputPort::addInPort(inPort);
114  if(_repr)
116  return ret;
117 }
virtual bool addInPort(InPort *inPort)=0
bool addInPort(InPort *inPort)
Definition: OutputPort.cxx:205

References _intercptr, _repr, YACS::ENGINE::OutputPort::addInPort(), and YACS::ENGINE::OutPort::addInPort().

◆ addRepr()

void AnySplitOutputPort::addRepr ( OutPort repr,
InterceptorInputPort intercptr 
)
private

Definition at line 136 of file ForEachLoop.cxx.

137 {
138  _repr=repr;
139  _intercptr=intercptr;
140 }

References _intercptr, and _repr.

Referenced by YACS::ENGINE::ForEachLoopGen::buildDelegateOf(), and YACS::ENGINE::ForEachLoopGen::ForEachLoopGen().

◆ clone()

OutputPort * AnySplitOutputPort::clone ( Node newHelder) const
privatevirtual

Implements YACS::ENGINE::OutputPort.

Definition at line 142 of file ForEachLoop.cxx.

143 {
144  return new AnySplitOutputPort(*this,newHelder);
145 }
AnySplitOutputPort(const std::string &name, Node *node, TypeCode *type)
Definition: ForEachLoop.cxx:98

References AnySplitOutputPort().

◆ decrRef()

bool AnySplitOutputPort::decrRef ( )
private

Definition at line 88 of file ForEachLoop.cxx.

89 {
90  return (--_cnt==0);
91 }

References _cnt.

◆ getAllRepresented()

void AnySplitOutputPort::getAllRepresented ( std::set< OutPort * > &  represented) const
privatevirtual

Reimplemented from YACS::ENGINE::OutPort.

Definition at line 119 of file ForEachLoop.cxx.

120 {
121  if(!_repr)
122  OutPort::getAllRepresented(represented);
123  else
124  _repr->getAllRepresented(represented);
125 }
virtual void getAllRepresented(std::set< OutPort * > &represented) const
Definition: OutPort.cxx:45

References _repr, and YACS::ENGINE::OutPort::getAllRepresented().

◆ getRepr()

OutPort* YACS::ENGINE::AnySplitOutputPort::getRepr ( ) const
inlineprivate

Definition at line 71 of file ForEachLoop.hxx.

71 { return _repr; }

References _repr.

◆ incrRef()

void AnySplitOutputPort::incrRef ( ) const
private

Definition at line 93 of file ForEachLoop.cxx.

94 {
95  _cnt++;
96 }

References _cnt.

◆ removeInPort()

int AnySplitOutputPort::removeInPort ( InPort inPort,
bool  forward 
)
privatevirtual

Implements YACS::ENGINE::OutPort.

Definition at line 127 of file ForEachLoop.cxx.

128 {
129  bool ret=OutputPort::removeInPort(inPort,forward);
130  if(_repr)
131  if(_setOfInputPort.empty())
132  _repr->removeInPort(_intercptr,forward);
133  return ret;
134 }
virtual int removeInPort(InPort *inPort, bool forward)=0
int removeInPort(InPort *inPort, bool forward)
Definition: OutputPort.cxx:228
std::set< InputPort * > _setOfInputPort
Definition: OutputPort.hxx:77

References _intercptr, _repr, YACS::ENGINE::OutputPort::_setOfInputPort, YACS::ENGINE::OutputPort::removeInPort(), and YACS::ENGINE::OutPort::removeInPort().

Friends And Related Function Documentation

◆ ForEachLoopGen

friend class ForEachLoopGen
friend

Definition at line 56 of file ForEachLoop.hxx.

◆ SplitterNode

friend class SplitterNode
friend

Definition at line 57 of file ForEachLoop.hxx.

Member Data Documentation

◆ _cnt

unsigned int YACS::ENGINE::AnySplitOutputPort::_cnt
mutableprivate

Definition at line 61 of file ForEachLoop.hxx.

Referenced by decrRef(), and incrRef().

◆ _intercptr

InterceptorInputPort* YACS::ENGINE::AnySplitOutputPort::_intercptr
private

Definition at line 60 of file ForEachLoop.hxx.

Referenced by addInPort(), addRepr(), and removeInPort().

◆ _repr

OutPort* YACS::ENGINE::AnySplitOutputPort::_repr
private

Definition at line 59 of file ForEachLoop.hxx.

Referenced by addInPort(), addRepr(), getAllRepresented(), getRepr(), and removeInPort().


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