Version: 8.3.0
YACS::ENGINE::ForkBlocPoint Class Reference

#include <ForkBlocPoint.hxx>

Inheritance diagram for YACS::ENGINE::ForkBlocPoint:
Collaboration diagram for YACS::ENGINE::ForkBlocPoint:

Public Member Functions

 ForkBlocPoint (const std::list< AbstractPoint * > &nodes, AbstractPoint *father)
 
NodegetFirstNode ()
 
NodegetLastNode ()
 
int getMaxLevelOfParallelism () const
 
std::string getRepr () const
 
virtual ~ForkBlocPoint ()
 
- Public Member Functions inherited from YACS::ENGINE::BlocPoint
 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 ~AbstractPoint ()
 
bool isSimplyLinkedAfter (BlocPoint *sop, Node *node)
 
bool isSimplyLinkedBefore (BlocPoint *sop, Node *node)
 

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)
 
- Protected Attributes inherited from YACS::ENGINE::BlocPoint
std::list< AbstractPoint * > _nodes
 

Detailed Description

Definition at line 30 of file ForkBlocPoint.hxx.

Constructor & Destructor Documentation

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

Definition at line 27 of file ForkBlocPoint.cxx.

27  :BlocPoint(nodes,father)
28 {
29 }
ForkBlocPoint::~ForkBlocPoint ( )
virtual

Definition at line 31 of file ForkBlocPoint.cxx.

32 {
33 }

Member Function Documentation

Node * ForkBlocPoint::getFirstNode ( )
virtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 35 of file ForkBlocPoint.cxx.

References YACS::ENGINE::BlocPoint::_nodes.

36 {
37  if(_nodes.empty())
38  throw Exception("ForkBlocPoint::getFirstNode : error no branches !");
39  return _nodes.front()->getFirstNode();
40 }
Node * ForkBlocPoint::getLastNode ( )
virtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 42 of file ForkBlocPoint.cxx.

References YACS::ENGINE::BlocPoint::_nodes.

43 {
44  if(_nodes.empty())
45  throw Exception("ForkBlocPoint::getLastNode : error no branches !");
46  return _nodes.front()->getLastNode();//not a bug - seen from the outside only first branch exists !
47 }
int ForkBlocPoint::getMaxLevelOfParallelism ( ) const
virtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 49 of file ForkBlocPoint.cxx.

References YACS::ENGINE::BlocPoint::_nodes, and PMMLBasicsTestLauncher::ret.

50 {
51  int ret(0);
52  for(std::list<AbstractPoint *>::const_iterator it=_nodes.begin();it!=_nodes.end();it++)
53  ret+=(*it)->getMaxLevelOfParallelism();
54  return ret;
55 }
std::string ForkBlocPoint::getRepr ( ) const
virtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 57 of file ForkBlocPoint.cxx.

References YACS::ENGINE::BlocPoint::_nodes, and PMMLBasicsTestLauncher::ret.

58 {
59  std::size_t sz(_nodes.size()),ii(0);
60  std::string ret("[");
61  std::vector<std::string> elts(sz);
62  for(std::list<AbstractPoint *>::const_iterator it=_nodes.begin();it!=_nodes.end();it++,ii++)
63  elts[ii]=(*it)->getRepr();
64  std::sort(elts.begin(),elts.end());
65  ii=0;
66  for(std::list<AbstractPoint *>::const_iterator it=_nodes.begin();it!=_nodes.end();it++,ii++)
67  {
68  ret+=elts[ii];
69  if(ii!=sz-1)
70  ret+="*";
71  }
72  ret+="]";
73  return ret;
74 }

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