Awali
Another Weighted Automata library
no_history.hh
Go to the documentation of this file.
1 // This file is part of Awali.
2 // Copyright 2016-2022 Sylvain Lombardy, Victor Marsault, Jacques Sakarovitch
3 //
4 // Awali is a free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef AWALI_NO_HISTORY_HH
18 # define AWALI_NO_HISTORY_HH
19 
21 
22 namespace awali { namespace sttc {
23 
28  class no_history final : public history_base {
29  public:
30 
31  std::ostream&
32  print_state_name(state_t, std::ostream& o,
33  const std::string& /*fmt*/) const override {
34  return o;
35  }
36 
37 
38  history_kind_t get_nature() const override {
40  }
41 
42  bool has_history(state_t) const override {
43  return false;
44  }
45 
46  bool remove_history(state_t) override {
47  return false;
48  };
49 
50 
51  bool has_history() const override {
52  return false;
53  }
54 
56  throw std::runtime_error("Origin state not available");
57  }
58 
59  std::vector<state_t> get_state_set(state_t) override {
60  throw std::runtime_error("Origin state set not available");
61  }
62  };
63  }
64 }//end of ns awali::stc
65 
66 #endif // !AWALI_NO_HISTORY_HH
base type for history of automata
Definition: history.hh:40
specialisation of history_base
Definition: no_history.hh:28
bool has_history(state_t) const override
Definition: no_history.hh:42
history_kind_t get_nature() const override
Definition: no_history.hh:38
state_t get_state(state_t) override
Definition: no_history.hh:55
std::vector< state_t > get_state_set(state_t) override
Definition: no_history.hh:59
bool has_history() const override
Definition: no_history.hh:51
bool remove_history(state_t) override
Definition: no_history.hh:46
std::ostream & print_state_name(state_t, std::ostream &o, const std::string &) const override
Definition: no_history.hh:32
history_kind_t
The different kinds of history.
Definition: enums.hh:178
@ NO_HISTORY
The state has no history.
Main namespace of Awali.
Definition: ato.hh:22
unsigned state_t
Definition: types.hh:21