20 #ifndef __SWITCH_HXX__
21 #define __SWITCH_HXX__
41 int edGetNumberOfOutLinks()
const;
42 std::set<InPort *> edSetInPort()
const;
43 bool isAlreadyLinkedWith(
InPort *withp)
const;
44 std::string getNameOfTypeOfCurrentInstance()
const;
45 void edRemoveAllLinksLinkedWithMe() ;
47 void getAllRepresented(std::set<OutPort *>& represented)
const;
48 bool addInPort(
InPort *inPort) ;
49 int removeInPort(
InPort *inPort,
bool forward) ;
51 void getHumanReprOfIncompleteCases(std::ostream& stream)
const;
53 bool removePotentialProducerForMaster();
54 void checkConsistency(
LinkInfo& info)
const;
57 void addPotentialProducerForMaster(
OutPort *port);
58 bool checkManagementOfPort(
OutPort *port) ;
89 static const char DEFAULT_NODE_NAME[];
90 static const char SELECTOR_INPUTPORT_NAME[];
100 Switch(
const std::string& name);
102 void exUpdateState();
103 void init(
bool start=
true);
105 Node *edSetDefaultNode(
Node *DISOWNnode);
106 Node *edReleaseDefaultNode() ;
107 Node *edReleaseCase(
int caseId) ;
108 Node *edGetNode(
int caseId);
109 Node *edSetNode(
int caseId,
Node *DISOWNnode) ;
110 void edChangeCase(
int oldCase,
int newCase);
111 virtual bool edAddChild(
Node *DISOWNnode) ;
113 void getReadyTasks(std::vector<Task *>& tasks);
114 std::list<Node *> edGetDirectDescendants()
const;
116 void writeDot(std::ostream &os)
const;
117 int getNumberOfInputPorts()
const;
118 int getMaxLevelOfParallelism()
const;
121 void edRemoveChild(
Node *node) ;
122 std::list<InputPort *> getSetOfInputPort()
const;
123 std::list<InputPort *> getLocalInputPorts()
const;
126 OutPort *getOutPort(
const std::string& name)
const ;
127 InputPort* getInputPort(
const std::string& name)
const ;
128 Node *getChildByShortName(
const std::string& name)
const ;
129 std::string getMyQualifiedName(
const Node *directSon)
const;
130 std::string getCaseId(
const Node *node)
const ;
131 virtual void accept(
Visitor *visitor);
132 int getRankOfNode(
Node *node)
const;
133 virtual std::string
typeName() {
return "YACS__ENGINE__Switch";}
134 std::list<ProgressWeight> getProgressWeight()
const;
138 std::set<InPort *> getAllInPortsComingFromOutsideOfCurrentScope()
const;
139 void checkLinkPossibility(
OutPort *start,
const std::list<ComposedNode *>& pointsOfViewStart,
140 InPort *end,
const std::list<ComposedNode *>& pointsOfViewEnd) ;
141 void buildDelegateOf(std::pair<OutPort *, OutPort *>& port,
InPort *finalTarget,
const std::list<ComposedNode *>& pointsOfView);
142 void getDelegateOf(std::pair<OutPort *, OutPort *>& port,
InPort *finalTarget,
const std::list<ComposedNode *>& pointsOfView) ;
143 void releaseDelegateOf(
OutPort *portDwn,
OutPort *portUp,
InPort *finalTarget,
const std::list<ComposedNode *>& pointsOfView) ;
144 void checkCFLinks(
const std::list<OutPort *>& starts,
InputPort *end,
unsigned char& alreadyFed,
bool direction,
LinkInfo& info)
const;
145 void checkControlDependancy(
OutPort *start,
InPort *end,
bool cross,
146 std::map <
ComposedNode *, std::list < OutPort * > >& fw,
147 std::vector<OutPort *>& fwCross,
150 void checkNoCyclePassingThrough(
Node *node) ;
152 int getNbOfCases()
const;
153 static std::string getRepresentationOfCase(
int i);
#define YACSLIBENGINE_EXPORT
std::map< int, OutPort * > _potentialProducers
OutPort * _currentProducer
Base class for all composed nodes.
Base class for all calculation nodes.
Node * simpleClone(ComposedNode *father, bool editionOnly) const
FakeNodeForSwitch(Switch *sw, bool normalFinish, bool internalError=false)
Class that deal with list of semantics links for high level analysis.
Base class for all nodes.
Control node that emulates the C switch.
InputPort * edGetConditionPort()
std::vector< CollectorSwOutPort * > _alreadyExistingCollectors
static const int ID_FOR_DEFAULT_NODE
std::map< int, Node * > _mapOfNode
virtual std::string typeName()
std::map< InPort *, CollectorSwOutPort * > _outPortsCollector
FakeNodeForSwitch * _undispatchableNotificationNode