Version: 8.3.0
YACS::ENGINE::OutPort Class Referenceabstract

#include <OutPort.hxx>

Inheritance diagram for YACS::ENGINE::OutPort:
Collaboration diagram for YACS::ENGINE::OutPort:

Public Member Functions

virtual void checkConsistency (LinkInfo &info) const
 
virtual int edGetNumberOfOutLinks () const
 
virtual std::set< InPort * > edSetInPort () const =0
 
virtual bool isAlreadyLinkedWith (InPort *withp) const =0
 
virtual void getAllRepresented (std::set< OutPort * > &represented) const
 
virtual bool addInPort (InPort *inPort)=0 throw (Exception)
 
virtual int removeInPort (InPort *inPort, bool forward)=0 throw (Exception)
 
virtual ~OutPort ()
 
std::vector< DataPort * > calculateHistoryOfLinkWith (InPort *end)
 
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 void edRemoveAllLinksLinkedWithMe ()=0 throw (Exception)
 
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

 OutPort (const OutPort &other, Node *newHelder)
 
 OutPort (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)
 

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

Detailed Description

Definition at line 36 of file OutPort.hxx.

Constructor & Destructor Documentation

OutPort::OutPort ( const OutPort other,
Node newHelder 
)
protected

Definition at line 29 of file OutPort.cxx.

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

Definition at line 33 of file OutPort.cxx.

33  :DataPort(name,node,type),Port(node)
34 {
35 }
OutPort::~OutPort ( )
virtual

Definition at line 37 of file OutPort.cxx.

38 {
39 }

Member Function Documentation

std::vector< DataPort * > OutPort::calculateHistoryOfLinkWith ( InPort end)

Definition at line 55 of file OutPort.cxx.

References YACS::ENGINE::Node::_father, YACS::ENGINE::Node::getAllAscendanceOf(), YACS::ENGINE::ComposedNode::getDelegateOf(), YACS::ENGINE::Node::getFather(), YACS::ENGINE::ComposedNode::getLowestCommonAncestor(), YACS::ENGINE::Port::getNode(), CORBAEngineTest::i, isAlreadyLinkedWith(), and PMMLBasicsTestLauncher::ret.

56 {
57  if(!isAlreadyLinkedWith(end))
58  throw Exception("ComposedNode::edRemoveLink : unexisting link");
59  vector<DataPort *> ret;
61  list<ComposedNode *> allAscendanceOfNodeStart=getNode()->getAllAscendanceOf(lwstCmnAnctr);
62  list<ComposedNode *> allAscendanceOfNodeEnd=end->getNode()->getAllAscendanceOf(lwstCmnAnctr);
63 
64  // --- Part of test if the link from 'start' to 'end' really exist particulary all eventually intermediate ports created
65 
66  ComposedNode *iterS=getNode()->getFather();
67  pair<OutPort *,OutPort *> currentPortO(this,this);
68  ret.push_back(currentPortO.first);
69  while(iterS!=lwstCmnAnctr)
70  {
71  iterS->getDelegateOf(currentPortO, end, allAscendanceOfNodeEnd);
72  if(currentPortO.first!=ret.back())
73  ret.push_back(currentPortO.first);
74  iterS=iterS->_father;
75  }
76  iterS=end->getNode()->getFather();
77  InPort *currentPortI=end;
78  int i=0;
79  while(iterS!=lwstCmnAnctr)
80  {
81  vector<DataPort *>::iterator iter2;
82  iterS->getDelegateOf(currentPortI, this, allAscendanceOfNodeStart);
83  if(currentPortI!=ret.back())
84  {
85  i++;
86  ret.push_back(currentPortI);
87  }
88  iterS=iterS->_father;
89  }
90  vector<DataPort *>::iterator iter=ret.end(); iter-=i;
91  reverse(iter,ret.end());
92  return ret;
93 }
void OutPort::checkConsistency ( LinkInfo info) const
virtual

Reimplemented in YACS::ENGINE::CollectorSwOutPort.

Definition at line 41 of file OutPort.cxx.

42 {
43 }
int OutPort::edGetNumberOfOutLinks ( ) const
virtual

Reimplemented in YACS::ENGINE::CollectorSwOutPort.

Definition at line 50 of file OutPort.cxx.

References edSetInPort().

Referenced by YACS::ENGINE::OptimizerLoop::setAlgorithm(), and YACS::ENGINE::OutputCalStreamPort::setDepend().

51 {
52  return edSetInPort().size();
53 }
virtual std::set<InPort *> YACS::ENGINE::OutPort::edSetInPort ( ) const
pure virtual
void OutPort::getAllRepresented ( std::set< OutPort * > &  represented) const
virtual

Reimplemented in YACS::ENGINE::OutputPort4DS2DF, YACS::ENGINE::AnySplitOutputPort, and YACS::ENGINE::CollectorSwOutPort.

Definition at line 45 of file OutPort.cxx.

Referenced by YACS::ENGINE::AnySplitOutputPort::getAllRepresented().

46 {
47  represented.insert((OutPort *)this);
48 }
virtual int YACS::ENGINE::OutPort::removeInPort ( InPort inPort,
bool  forward 
) throw (Exception)
pure virtual
virtual std::string YACS::ENGINE::OutPort::typeName ( )
inlinevirtual

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