Vcsn  2.3a
Be Rational
lan_char_b.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vcsn/ctx/context.hh>
4 #include <vcsn/ctx/lan_char.hh>
5 #include <vcsn/weightset/b.hh>
6 
7 namespace vcsn
8 {
9  namespace ctx
10  {
12  }
13 }
14 
15 #include <vcsn/ctx/instantiate.hh>
16 #include <vcsn/algos/grail.hh>
17 
18 namespace vcsn
19 {
21 #if 0
22  /* fado. */
23  MAYBE_EXTERN template
24  std::ostream& fado<mutable_automaton<ctx::lan_char_b>>
25  (const mutable_automaton<ctx::lan_char_b>& aut, std::ostream& out);
26 
27  MAYBE_EXTERN template
28  std::ostream&
29  fado<vcsn::detail::transpose_automaton<mutable_automaton<ctx::lan_char_b>>>
30  (const vcsn::detail::transpose_automaton<mutable_automaton<ctx::lan_char_b>>& aut,
31  std::ostream& out);
32 
33  /* grail. */
34  MAYBE_EXTERN template
35  std::ostream& grail<mutable_automaton<ctx::lan_char_b>>
36  (const mutable_automaton<ctx::lan_char_b>& aut, std::ostream& out);
37 
38  MAYBE_EXTERN template
39  std::ostream&
40  grail<vcsn::detail::transpose_automaton<mutable_automaton<ctx::lan_char_b>>>
41  (const vcsn::detail::transpose_automaton<mutable_automaton<ctx::lan_char_b>>& aut,
42  std::ostream& out);
43 #endif
44 
45 #if VCSN_INSTANTIATION
46  namespace
47  {
48  namespace detail
49  {
50  template <typename Ctx>
51  bool
53  {
54  using aut_t = mutable_automaton<Ctx>;
55 
56 # define REGISTER(Algo, ...) \
57  dyn::detail::Algo ## _register(ssignature<__VA_ARGS__>(), \
58  dyn::detail::Algo<__VA_ARGS__>)
59 
60  REGISTER(fado, aut_t, std::ostream);
61  REGISTER(grail, aut_t, std::ostream);
62 # undef REGISTER
63  return true;
64  }
65 
66  static bool register_lan_char_b ATTRIBUTE_USED
67  = register_functions<ctx::lan_char_b>();
68  }
69  }
70 #endif
71 }
std::ostream & grail(const Aut &aut, std::ostream &out)
Print automaton in Grail format.
Definition: grail.hh:185
#define MAYBE_EXTERN
Definition: instantiate.hh:407
std::ostream & fado(const Aut &aut, std::ostream &out=std::cout)
Format automaton to FAdo format.
Definition: grail.hh:115
auto out(const Aut &aut, state_t_of< Aut > s)
Indexes of visible transitions leaving state s.
Definition: automaton.hh:84
#define REGISTER(Algo,...)
Definition: instantiate.hh:134
Definition: a-star.hh:8
VCSN_CTX_INSTANTIATE(ctx::lal_char_b)
bool register_functions()
Definition: instantiate.hh:313
context< lan_char, vcsn::b > lan_char_b
Definition: lan_char_b.hh:11