Version: 8.3.0
YACS::ENGINE::BlocPoint Class Reference

#include <BlocPoint.hxx>

Inheritance diagram for YACS::ENGINE::BlocPoint:
Collaboration diagram for YACS::ENGINE::BlocPoint:

Public Member Functions

 BlocPoint (const std::list< AbstractPoint * > &nodes, AbstractPoint *father)
 
AbstractPointfindPointWithNode (Node *node)
 
AbstractPointgetNodeAfter (Node *node)
 
AbstractPointgetNodeB4 (Node *node)
 
bool contains (Node *node)
 
int getNumberOfNodes () const
 
const std::list< AbstractPoint * > & getListOfPoints () const
 
virtual ~BlocPoint ()
 
- Public Member Functions inherited from YACS::ENGINE::AbstractPoint
 AbstractPoint (AbstractPoint *father)
 
AbstractPointgetFather () const
 
AbstractPointgetGodFather ()
 
bool amIGod ()
 
void setFather (AbstractPoint *father)
 
bool isBegin ()
 
bool isLast ()
 
bool isSimplyLinkedBeforeAfter (BlocPoint *sop)
 
bool isSimplyLinkedAfterNullBefore (BlocPoint *sop)
 
bool isSimplyLinkedBeforeNullAfter (BlocPoint *sop)
 
LinkedBlocPointtryAsLink (BlocPoint *sop)
 
ForkBlocPointtryAsFork (BlocPoint *sop)
 
ForkBlocPointtryAsForkBis (BlocPoint *sop)
 
ForkBlocPointtryAsForkTer (BlocPoint *sop)
 
virtual NodegetFirstNode ()=0
 
virtual NodegetLastNode ()=0
 
virtual int getMaxLevelOfParallelism () const =0
 
virtual std::string getRepr () const =0
 
virtual ~AbstractPoint ()
 
bool isSimplyLinkedAfter (BlocPoint *sop, Node *node)
 
bool isSimplyLinkedBefore (BlocPoint *sop, Node *node)
 

Protected Attributes

std::list< AbstractPoint * > _nodes
 
- Protected Attributes inherited from YACS::ENGINE::AbstractPoint
AbstractPoint_father
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::ENGINE::AbstractPoint
static bool IsGatherB4Ext (Node *node)
 
static bool IsSimplyLinkedAfterExt (Node *node)
 
static bool IsScatterAfterExt (Node *node)
 
static bool IsSimplyLinkedBeforeExt (Node *node)
 
static bool IsNoLinksBefore (Node *node)
 
static bool IsNoLinksAfter (Node *node)
 
static NodeGetNodeB4 (Node *node)
 
static NodeGetNodeAfter (Node *node)
 
static AbstractPointGetDirectSonOf (AbstractPoint *refFather, AbstractPoint *sonOrLittleSon)
 
static bool IsCommonDirectSonOf (AbstractPoint *refFather, const std::list< OutGate * > &outgs, AbstractPoint *&ret)
 
static bool IsCommonDirectSonOf (AbstractPoint *refFather, const std::list< InGate * > &ings, AbstractPoint *&ret)
 

Detailed Description

Definition at line 32 of file BlocPoint.hxx.

Constructor & Destructor Documentation

BlocPoint::BlocPoint ( const std::list< AbstractPoint * > &  nodes,
AbstractPoint father 
)

Definition at line 25 of file BlocPoint.cxx.

References _nodes, and YACS::ENGINE::AbstractPoint::setFather().

25  :AbstractPoint(father),_nodes(nodes)
26 {
27  for(std::list<AbstractPoint *>::const_iterator it=_nodes.begin();it!=_nodes.end();it++)
28  (*it)->setFather(this);
29 }
BlocPoint::~BlocPoint ( )
virtual

Definition at line 88 of file BlocPoint.cxx.

References _nodes.

89 {
90  for(std::list<AbstractPoint *>::iterator it=_nodes.begin();it!=_nodes.end();it++)
91  delete *it;
92 }

Member Function Documentation

bool BlocPoint::contains ( Node node)
virtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 70 of file BlocPoint.cxx.

References _nodes.

71 {
72  for(std::list<AbstractPoint *>::iterator it=_nodes.begin();it!=_nodes.end();it++)
73  {
74  if((*it)->contains(node))
75  return true;
76  }
77  return false;
78 }
AbstractPoint * BlocPoint::findPointWithNode ( Node node)
virtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 31 of file BlocPoint.cxx.

References _nodes, YACS::ENGINE::AbstractPoint::GetDirectSonOf(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::SetOfPoints::findPointWithNode(), YACS::ENGINE::AbstractPoint::tryAsFork(), YACS::ENGINE::AbstractPoint::tryAsForkBis(), and YACS::ENGINE::AbstractPoint::tryAsForkTer().

32 {
33  for(std::list<AbstractPoint *>::iterator it=_nodes.begin();it!=_nodes.end();it++)
34  {
35  AbstractPoint *ret((*it)->findPointWithNode(node));
36  if(ret)
38  }
39  return 0;
40 }
AbstractPoint * BlocPoint::getNodeAfter ( Node node)

Definition at line 42 of file BlocPoint.cxx.

References YACS::ENGINE::Node::getOutGate(), YACS::ENGINE::AbstractPoint::IsCommonDirectSonOf(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::AbstractPoint::tryAsLink().

43 {
44  OutGate *oug(node->getOutGate());
45  std::list<InGate *> fl(oug->edSetInGate());
46  if(fl.size()>=1)
47  {
48  AbstractPoint *ret(0);
49  IsCommonDirectSonOf(this,fl,ret);
50  return ret;
51  }
52  else
53  return 0;
54 }
AbstractPoint * BlocPoint::getNodeB4 ( Node node)

Definition at line 56 of file BlocPoint.cxx.

References YACS::ENGINE::Node::getInGate(), YACS::ENGINE::AbstractPoint::IsCommonDirectSonOf(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::AbstractPoint::tryAsLink().

57 {
58  InGate *ing(node->getInGate());
59  std::list<OutGate *> bl(ing->getBackLinks());
60  if(bl.size()>=1)
61  {
62  AbstractPoint *ret(0);
63  IsCommonDirectSonOf(this,bl,ret);
64  return ret;
65  }
66  else
67  return 0;
68 }
int BlocPoint::getNumberOfNodes ( ) const
virtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 80 of file BlocPoint.cxx.

References _nodes, and PMMLBasicsTestLauncher::ret.

81 {
82  int ret(0);
83  for(std::list<AbstractPoint *>::const_iterator it=_nodes.begin();it!=_nodes.end();it++)
84  ret+=(*it)->getNumberOfNodes();
85  return ret;
86 }

Member Data Documentation


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