Version: 9.15.0
YACS::ENGINE::ElementaryPoint Class Reference

#include <ElementaryPoint.hxx>

Inheritance diagram for YACS::ENGINE::ElementaryPoint:
Collaboration diagram for YACS::ENGINE::ElementaryPoint:

Public Member Functions

 ElementaryPoint (Node *node)
 
AbstractPointfindPointWithNode (Node *node)
 
bool contains (Node *node) const override
 
bool anyOf (const std::set< Node * > &nodes) const override
 
AbstractPointdeepCopy (AbstractPoint *father) const override
 
NodegetFirstNode () override
 
NodegetLastNode () override
 
int getNumberOfNodes () const
 
int getMaxLevelOfParallelism () const
 
void getWeightRegardingDPL (ComplexWeight *weight)
 
void partitionRegardingDPL (const PartDefinition *pd, std::map< ComposedNode *, YACS::BASES::AutoRefCnt< PartDefinition > > &zeMap) const
 
std::string getRepr () const
 
void accept (PointVisitor *pv) override
 
AbstractPointexpandNonSimpleCaseOn (NotSimpleCasePoint *pathologicalPt, const std::set< Node * > &uncatchedNodes) override
 
virtual ~ElementaryPoint ()
 
void setNode (Node *node)
 
NodegetNode () const
 
std::string getNodeName () const
 
- Public Member Functions inherited from YACS::ENGINE::AbstractPoint
 AbstractPoint ()=default
 
 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)
 
bool isNullBeforeNullAfter (BlocPoint *sop)
 
LinkedBlocPointtryAsLink (BlocPoint *sop)
 
ForkBlocPointtryAsFork (BlocPoint *sop)
 
ForkBlocPointtryAsForkBis (BlocPoint *sop)
 
ForkBlocPointtryAsForkTer (BlocPoint *sop)
 
ForkBlocPointtryAsForkQuatro (BlocPoint *sop)
 
virtual ~AbstractPoint ()
 
bool isSimplyLinkedAfter (BlocPoint *sop, Node *node)
 
bool isSimplyLinkedBefore (BlocPoint *sop, Node *node)
 

Private Attributes

Node_node
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::ENGINE::AbstractPoint
static void TryAsNotSimpleCase (AbstractPoint *father, const std::vector< AbstractPoint * > &ptsToKill, std::list< AbstractPoint * > &nodes, bool &somethingDone)
 
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)
 
static void FeedData (AbstractPoint *ptToBeRewired, std::map< std::string, std::tuple< ElementaryPoint *, Node *, std::shared_ptr< Bloc > > > *m)
 
static void FeedData (const std::list< AbstractPoint * > &ptsToBeRewired, std::map< std::string, std::tuple< ElementaryPoint *, Node *, std::shared_ptr< Bloc > > > *m)
 
static void Rewire (const std::vector< AbstractPoint * > &ptsToKill, std::map< std::string, std::tuple< ElementaryPoint *, Node *, std::shared_ptr< Bloc > > > *m)
 
static void UnRewire (std::map< std::string, std::tuple< ElementaryPoint *, Node *, std::shared_ptr< Bloc > > > &m)
 
static void Display (std::map< std::string, std::tuple< ElementaryPoint *, Node *, std::shared_ptr< Bloc > > > *m)
 
- Protected Attributes inherited from YACS::ENGINE::AbstractPoint
AbstractPoint_father = nullptr
 

Detailed Description

Definition at line 34 of file ElementaryPoint.hxx.

Constructor & Destructor Documentation

◆ ElementaryPoint()

YACS::ENGINE::ElementaryPoint::ElementaryPoint ( Node node)
inline

Definition at line 39 of file ElementaryPoint.hxx.

Referenced by deepCopy().

◆ ~ElementaryPoint()

ElementaryPoint::~ElementaryPoint ( )
virtual

Definition at line 28 of file ElementaryPoint.cxx.

29 {
30 }

Member Function Documentation

◆ accept()

void ElementaryPoint::accept ( PointVisitor pv)
overridevirtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 92 of file ElementaryPoint.cxx.

93 {
94  pv->beginElementaryPoint(this);
95  pv->endElementaryPoint(this);
96 }
virtual void beginElementaryPoint(ElementaryPoint *pt)=0
virtual void endElementaryPoint(ElementaryPoint *pt)=0

References YACS::ENGINE::PointVisitor::beginElementaryPoint(), and YACS::ENGINE::PointVisitor::endElementaryPoint().

◆ anyOf()

bool ElementaryPoint::anyOf ( const std::set< Node * > &  nodes) const
overridevirtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 45 of file ElementaryPoint.cxx.

46 {
47  return nodes.find(_node)!=nodes.end();
48 }

References _node.

◆ contains()

bool ElementaryPoint::contains ( Node node) const
overridevirtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 40 of file ElementaryPoint.cxx.

41 {
42  return _node==node;
43 }

References _node.

◆ deepCopy()

AbstractPoint * ElementaryPoint::deepCopy ( AbstractPoint father) const
overridevirtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 50 of file ElementaryPoint.cxx.

51 {
53  ret->setFather(father);
54  return ret;
55 }

References _node, ElementaryPoint(), and YACS::ENGINE::AbstractPoint::setFather().

Referenced by expandNonSimpleCaseOn().

◆ expandNonSimpleCaseOn()

AbstractPoint * ElementaryPoint::expandNonSimpleCaseOn ( NotSimpleCasePoint pathologicalPt,
const std::set< Node * > &  uncatchedNodes 
)
overridevirtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 98 of file ElementaryPoint.cxx.

99 {
100  if(uncatchedNodes.find(_node)!=uncatchedNodes.end())
101  return this;
102  else
103  {
104  std::list<AbstractPoint *> l;
105  AbstractPoint *p0(this->deepCopy(getFather())),*p1(pathologicalPt->getUnique()->deepCopy(getFather()));
106  l.push_back(p0);
107  l.push_back(p1);
108  AbstractPoint *ret(new ForkBlocPoint(l,getFather()));
109  p0->setFather(ret); p1->setFather(ret);
110  return ret;
111  }
112 }
virtual AbstractPoint * deepCopy(AbstractPoint *father) const =0
AbstractPoint * getFather() const
AbstractPoint * getUnique()
Definition: BlocPoint.cxx:111
AbstractPoint * deepCopy(AbstractPoint *father) const override

References _node, YACS::ENGINE::AbstractPoint::deepCopy(), deepCopy(), YACS::ENGINE::AbstractPoint::getFather(), YACS::ENGINE::BlocPoint::getUnique(), testCppPluginInvokation::l, and YACS::ENGINE::AbstractPoint::setFather().

◆ findPointWithNode()

AbstractPoint * ElementaryPoint::findPointWithNode ( Node node)
virtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 32 of file ElementaryPoint.cxx.

33 {
34  if(node==_node)
35  return this;
36  else
37  return nullptr;
38 }

References _node.

◆ getFirstNode()

Node * ElementaryPoint::getFirstNode ( )
overridevirtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 57 of file ElementaryPoint.cxx.

58 {
59  return _node;
60 }

References _node.

◆ getLastNode()

Node * ElementaryPoint::getLastNode ( )
overridevirtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 62 of file ElementaryPoint.cxx.

63 {
64  return _node;
65 }

References _node.

◆ getMaxLevelOfParallelism()

int ElementaryPoint::getMaxLevelOfParallelism ( ) const
virtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 72 of file ElementaryPoint.cxx.

73 {
75 }
virtual int getMaxLevelOfParallelism() const =0

References _node, and YACS::ENGINE::Node::getMaxLevelOfParallelism().

◆ getNode()

Node* YACS::ENGINE::ElementaryPoint::getNode ( ) const
inline

Definition at line 56 of file ElementaryPoint.hxx.

56 { return _node; }

Referenced by Visitor1::beginElementaryPoint(), and YACS::ENGINE::AbstractPoint::Display().

◆ getNodeName()

std::string ElementaryPoint::getNodeName ( ) const

Definition at line 114 of file ElementaryPoint.cxx.

115 {
116  return _node->getName();
117 }
const std::string & getName() const
Definition: Node.hxx:125

References _node, and YACS::ENGINE::Node::getName().

Referenced by Visitor1::beginElementaryPoint(), and YACS::ENGINE::AbstractPoint::Display().

◆ getNumberOfNodes()

int ElementaryPoint::getNumberOfNodes ( ) const
virtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 67 of file ElementaryPoint.cxx.

68 {
69  return 1;
70 }

◆ getRepr()

std::string ElementaryPoint::getRepr ( ) const
virtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 87 of file ElementaryPoint.cxx.

88 {
89  return _node->getName();
90 }

References _node, and YACS::ENGINE::Node::getName().

◆ getWeightRegardingDPL()

void ElementaryPoint::getWeightRegardingDPL ( ComplexWeight weight)
virtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 77 of file ElementaryPoint.cxx.

78 {
80 }
virtual void getWeightRegardingDPL(ComplexWeight *weight)=0

References _node, and YACS::ENGINE::Node::getWeightRegardingDPL().

◆ partitionRegardingDPL()

void ElementaryPoint::partitionRegardingDPL ( const PartDefinition pd,
std::map< ComposedNode *, YACS::BASES::AutoRefCnt< PartDefinition > > &  zeMap 
) const
virtual

Implements YACS::ENGINE::AbstractPoint.

Definition at line 82 of file ElementaryPoint.cxx.

83 {
84  _node->partitionRegardingDPL(pd,zeMap);
85 }
virtual void partitionRegardingDPL(const PartDefinition *pd, std::map< ComposedNode *, YACS::BASES::AutoRefCnt< PartDefinition > > &zeMap)=0

References _node, and YACS::ENGINE::Node::partitionRegardingDPL().

◆ setNode()

void YACS::ENGINE::ElementaryPoint::setNode ( Node node)
inline

Definition at line 55 of file ElementaryPoint.hxx.

55 { _node=node; }

Referenced by YACS::ENGINE::AbstractPoint::Rewire(), and YACS::ENGINE::AbstractPoint::UnRewire().

Member Data Documentation

◆ _node


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