Vcsn  2.2
Be Rational
visitor.hxx
Go to the documentation of this file.
3 #include <cassert>
4 
5 namespace vcsn
6 {
7  namespace rat
8  {
9 #define VISIT(Type, Name) \
10  template <typename Context> \
11  void \
12  const_visitor<Context>::visit(const Type ## _t& Name)
13 
15  {
16  for (const auto& t : v)
17  t->accept(*this);
18  }
19 
21  {
22  for (const auto& t : v)
23  t->accept(*this);
24  }
25 
27  {
28  for (const auto& t : v)
29  t->accept(*this);
30  }
31 
32  VISIT(shuffle, v)
33  {
34  for (const auto& t : v)
35  t->accept(*this);
36  }
37 
38  VISIT(ldiv, v)
39  {
40  for (const auto& t : v)
41  t->accept(*this);
42  }
43 
44  VISIT(sum, v)
45  {
46  for (const auto& t : v)
47  t->accept(*this);
48  }
49 
50  VISIT(star, v)
51  {
52  v.sub()->accept(*this);
53  }
54 
56  {
57  v.sub()->accept(*this);
58  }
59 
60  VISIT(rweight, v)
61  {
62  v.sub()->accept(*this);
63  }
64 
65  VISIT(complement, v)
66  {
67  v.sub()->accept(*this);
68  }
69 
71  {
72  v.sub()->accept(*this);
73  }
74 
76  {}
77 
78  VISIT(zero,)
79  {}
80 
82  {}
83 
84 #undef VISIT
85 
86  } // namespace rat
87 } // namespace vcsn
unary< type_t::complement, Context > complement
Definition: fwd.hh:121
Definition: a-star.hh:8
variadic< type_t::shuffle, Context > shuffle
Definition: fwd.hh:149
variadic< type_t::infiltration, Context > infiltration
Definition: fwd.hh:143
An inner node with multiple children.
Definition: expression.hh:118
unary< type_t::transposition, Context > transposition
Definition: fwd.hh:127
An inner node implementing a weight.
Definition: expression.hh:264
variadic< type_t::sum, Context > sum
Definition: fwd.hh:152
variadic< type_t::ldiv, Context > ldiv
Definition: fwd.hh:146
#define VISIT(Type, Name)
Definition: visitor.hxx:9