50 #ifndef _SWITCHNODE_H_
51 #define _SWITCHNODE_H_
53 #include "util/functions.h"
54 using namespace ::br::pucrio::telemidia::util;
56 #include "../components/ContextNode.h"
57 #include "../components/CompositeNode.h"
58 #include "../components/NodeEntity.h"
59 #include "../components/IllegalNodeTypeException.h"
60 using namespace ::br::pucrio::telemidia::ncl::components;
62 #include "../interfaces/Port.h"
63 #include "../interfaces/InterfacePoint.h"
64 #include "../interfaces/SwitchPort.h"
65 using namespace ::br::pucrio::telemidia::ncl::interfaces;
68 #include "DescriptorSwitch.h"
69 #include "SwitchContent.h"
83 vector<Rule*> ruleList;
88 bool addNode(
unsigned int index, Node* node,
Rule* rule);
89 bool addNode(Node* node,
Rule* rule);
92 bool addNode(Node* node);
94 bool addSwitchPortMap(SwitchPort* switchPort,
95 Node* node, InterfacePoint* interfacePoint);
98 bool addPort(Port* port);
101 bool addPort(
int index, Port* port);
103 void exchangeNodesAndRules(
104 unsigned int index1,
unsigned int index2);
106 Node* getDefaultNode();
109 InterfacePoint *getMapInterface(Port *port);
112 Node* getNode(
string nodeId);
114 Node* getNode(
unsigned int index);
115 Node* getNode(
Rule* rule);
116 unsigned int getNumRules();
117 Rule* getRule(
unsigned int index);
118 unsigned int indexOfRule(
Rule* rule);
121 bool recursivelyContainsNode(Node* node);
124 bool recursivelyContainsNode(
string nodeId);
127 Node* recursivelyGetNode(
string nodeId);
130 bool removeNode(Node* node);
132 bool removeNode(
unsigned int index);
133 bool removeRule(
Rule* rule);
134 void setDefaultNode(Node* node);
142 #endif //_SWITCHNODE_H_
Definition: SwitchNode.h:80