Vcsn  2.8
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 
27  {
28  for (const auto& t : v)
29  t->accept(*this);
30  }
31 
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 
45  {
46  v.sub()->accept(*this);
47  }
48 
49  VISIT(shuffle, v)
50  {
51  for (const auto& t : v)
52  t->accept(*this);
53  }
54 
55  VISIT(ldivide, v)
56  {
57  for (const auto& t : v)
58  t->accept(*this);
59  }
60 
62  {
63  v.sub()->accept(*this);
64  }
65 
67  {
68  v.sub()->accept(*this);
69  }
70 
71  VISIT(rweight, v)
72  {
73  v.sub()->accept(*this);
74  }
75 
77  {
78  v.sub()->accept(*this);
79  }
80 
82  {
83  v.sub()->accept(*this);
84  }
85 
87  {}
88 
89  VISIT(zero,)
90  {}
91 
93  {}
94 
95 #undef VISIT
96 
97  } // namespace rat
98 } // namespace vcsn
An inner node with multiple children.
Definition: expression.hh:119
#define VISIT(Type, Name)
Definition: visitor.hxx:9
An inner node to name the subexpression.
Definition: expression.hh:290
Definition: a-star.hh:8
An inner node implementing a weight.
Definition: expression.hh:256
return v
Definition: multiply.hh:362