Salome HOME
PR: merge from BR_DATACONV_PR tag "mergeto_trunk_25oct06"
[modules/yacs.git] / src / engine / Switch.cxx
1 #include "Switch.hxx"
2
3 using namespace YACS::ENGINE;
4 using namespace std;
5
6 Switch::Switch(const string& name):ComposedNode(name)
7 {
8 }
9
10 Switch::~Switch()
11 {
12 }
13
14 void Switch::edSetNumberOfCases(int numberOfCases)
15 {
16   _vectorOfNode.resize(numberOfCases);
17 }
18
19 void Switch::edSetNode(int caseId, Node *node) throw(Exception)
20 {
21   if(caseId>=_vectorOfNode.size())
22     throw Exception("Switch::edSetNode : caseId is too large compared to number of cases");
23   _vectorOfNode[caseId]=node;
24 }
25
26 void Switch::checkNoCyclePassingThrough(Node *node) throw(Exception)
27 {
28   throw Exception("Switch::checkNoCyclePassingThrough : uncorrect control flow link relative to switch");
29 }