DiaDes  0.1
DIAgnosis of Discrete-Event System
Extension.hh
Go to the documentation of this file.
1 #ifndef __DIADES__PETRI__EXTENSION_HH_
2 #define __DIADES__PETRI__EXTENSION_HH_
3 
13 #include<set>
14 #include<diades/utils/Box.hh>
15 #include<diades/graph/Graph.hh>
16 
17 
18 namespace Diades
19 {
20  namespace Petri
21  {
22  using Diades::Utils::CBox;
23  using std::set;
24 
25  class BranchingProcess;
26 
34  class Extension
35  {
36  public:
45 
46  private:
49 
50 
52  typedef std::set<Condition> Conditions;
53 
54 
56  Conditions _conditions;
57 
59  Transition _transition;
60 
61  public:
66  Extension();
67 
68 
73  Extension(const Extension & extension);
74 
79 
80 
81 
88  {
89  _process = process;
90  }
91 
92 
99  const BranchingProcess & process() const
100  {
101  return _process.obj();
102  }
103 
110  {
111  _process = process;
112  }
113 
114 
115 
121  void setTransition(const Transition & transition)
122  {
123  _transition = transition;
124  }
125 
126 
127 
134  const Transition & transition() const
135  {
136  return _transition;
137  }
138 
139 
140 
147  const Conditions & conditions() const
148  {
149  return _conditions;
150  }
151 
152 
159  void addCondition(const Condition & condition);
160 
161 
162 
169  void removeCondition(const Condition & condition);
170 
171 
181  bool meets(const set<Event> & events) const;
182 
187  void clear();
188 
189 
190 
196  bool operator==(const Extension & extension) const;
197 
198 
199 
200 
201  };
202 
203  }
204 }
205 
206 
207 
208 
209 #endif
Conditions _conditions
_conditions the conditions of the Extension
Definition: Extension.hh:56
bool meets(const set< Event > &events) const
Transition _transition
_transition the Transition associated with this Extension
Definition: Extension.hh:59
CBox< BranchingProcess > _process
@ _process the BranchingProcess that owns this Extension
Definition: Extension.hh:48
const Object & obj() const
Definition: Box.hh:262
Diades::Graph::Node Condition
Condition a Condition of a BranchingProcess
Definition: Extension.hh:40
Diades::Graph::Node Event
Event an Event of a BranchingProcess
Definition: Extension.hh:38
void addCondition(const Condition &condition)
std::set< Condition > Conditions
Conditions a set of Conditions
Definition: Extension.hh:52
const Conditions & conditions() const
Definition: Extension.hh:147
void setProcess(const BranchingProcess &process)
Definition: Extension.hh:87
Diades::Graph::Node Transition
Transition a Transition of a Net
Definition: Extension.hh:44
Namespace of the Diades project.
bool operator==(const Extension &extension) const
Definition of the Box Utils.
A CBox is a container that contains at most a constant reference to an object.
Definition: Box.hh:198
This class implements a branching process of a Net (see Esparza 2002).
void setProcess(BranchingProcess &process)
Definition: Extension.hh:109
const Transition & transition() const
Definition: Extension.hh:134
void removeCondition(const Condition &condition)
Diades::Graph::Node Place
Place a Place of a Net
Definition: Extension.hh:42
const BranchingProcess & process() const
Definition: Extension.hh:99
void setTransition(const Transition &transition)
Definition: Extension.hh:121