]> SALOME platform Git repositories - modules/yacs.git/blob - src/engine/OutGate.hxx
Salome HOME
merge from branch DEV tag mergeto_trunk_04apr08
[modules/yacs.git] / src / engine / OutGate.hxx
1 #ifndef __OUTGATE_HXX__
2 #define __OUTGATE_HXX__
3
4 #include "Port.hxx"
5 #include "Exception.hxx"
6
7 #include <map>
8 #include <set>
9
10 namespace YACS
11 {
12   namespace ENGINE
13   {
14     class InGate;
15     class ElementaryNode;
16     
17     class OutGate : public Port
18     {
19       friend class ElementaryNode;
20     protected:
21       std::map<InGate *, bool> _setOfInGate;
22     public:
23       static const char NAME[];
24     public:
25       OutGate(Node *node);
26       std::string getNameOfTypeOfCurrentInstance() const;
27       void exReset();
28       void exNotifyDone();
29       void exNotifyFailed();
30       void exNotifyDisabled();
31       void edDisconnectAllLinksFromMe();
32       bool edAddInGate(InGate *inGate);
33       std::map<InGate *, bool>& edMapInGate() { return _setOfInGate; }
34       std::set<InGate *> edSetInGate() const;
35       void edRemoveInGate(InGate *inGate, bool coherenceWithInGate=true) throw(Exception);
36       int getNbOfInGatesConnected() const;
37       bool isAlreadyInSet(InGate *inGate) const;
38       virtual std::string typeName() {return "YACS__ENGINE__OutGate";}
39     protected:
40       void edRemoveInGateOneWay(InGate *inGate);
41     };
42   }
43 }
44
45 #endif