Vcsn  2.3
Be Rational
visitor.hxx
Go to the documentation of this file.
1 #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 
20  VISIT(compose, v)
21  {
22  for (const auto& t : v)
23  t->accept(*this);
24  }
25 
26  VISIT(conjunction, v)
27  {
28  for (const auto& t : v)
29  t->accept(*this);
30  }
31 
32  VISIT(infiltrate, v)
33  {
34  for (const auto& t : v)
35  t->accept(*this);
36  }
37 
38  VISIT(mul, v)
39  {
40  for (const auto& t : v)
41  t->accept(*this);
42  }
43 
44  VISIT(shuffle, v)
45  {
46  for (const auto& t : v)
47  t->accept(*this);
48  }
49 
50  VISIT(ldivide, v)
51  {
52  for (const auto& t : v)
53  t->accept(*this);
54  }
55 
56  VISIT(star, v)
57  {
58  v.sub()->accept(*this);
59  }
60 
62  {
63  v.sub()->accept(*this);
64  }
65 
66  VISIT(rweight, v)
67  {
68  v.sub()->accept(*this);
69  }
70 
71  VISIT(complement, v)
72  {
73  v.sub()->accept(*this);
74  }
75 
77  {
78  v.sub()->accept(*this);
79  }
80 
82  {}
83 
84  VISIT(zero,)
85  {}
86 
88  {}
89 
90 #undef VISIT
91 
92  } // namespace rat
93 } // namespace vcsn
return v
Definition: multiply.hh:361
variadic< type_t::ldivide, Context > ldivide
Definition: fwd.hh:148
variadic< type_t::infiltrate, Context > infiltrate
Definition: fwd.hh:145
unary< type_t::transposition, Context > transposition
Definition: fwd.hh:129
An inner node implementing a weight.
Definition: expression.hh:264
variadic< type_t::shuffle, Context > shuffle
Definition: fwd.hh:154
Definition: a-star.hh:8
variadic< type_t::mul, Context > mul
Definition: fwd.hh:151
variadic< type_t::conjunction, Context > conjunction
Definition: fwd.hh:142
unary< type_t::complement, Context > complement
Definition: fwd.hh:123
#define VISIT(Type, Name)
Definition: visitor.hxx:9
An inner node with multiple children.
Definition: expression.hh:118