DiaDes  0.1
DIAgnosis of Discrete-Event System
AutomataConversion.hh
Go to the documentation of this file.
1 #ifndef __DIADES__PETRI__AUTOMATACONVERSION__HH
2 #define __DIADES__PETRI__AUTOMATACONVERSION__HH
3 
13 #include <vector>
17 #include <diades/petri/Net.hh>
18 
19 
20 namespace Diades
21 {
22  namespace Petri
23  {
27 
36  void automataConversion(const std::vector< std::reference_wrapper<const ObservableComponent> > & automata,
37  const SynchronisationRules & sync,
38 
39  Net & result);
40 
41 
51  template<typename ConstReferenceIterator>
52  void automataConversion(ConstReferenceIterator begin, ConstReferenceIterator end,
53  const SynchronisationRules & sync,
54 
55  Net & result)
56 
57  {
58  typedef std::vector< std::reference_wrapper<const ObservableComponent> > RefVector;
59  RefVector automata;
60  while(begin != end)
61  {
62  automata.push_back(*begin);
63  ++begin;
64  }
65  if(automata.empty())
66  {
67  throw FunctionException("automataConversion","empty range of automata.");
68  }
69  automataConversion(automata,sync,result);
70  }
71 
72 
73  };
74 };
75 
76 
77 
78 #endif
void automataConversion(const std::vector< std::reference_wrapper< const ObservableComponent > > &automata, const SynchronisationRules &sync, Net &result)
An observable Component defined as a automaton.
Namespace of the Diades project.
1-bounded Petri nets
Definition: Net.hh:62