Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
info.hh
Go to the documentation of this file.
1 #ifndef VCSN_CORE_RAT_INFO_HH
2 # define VCSN_CORE_RAT_INFO_HH
3 
4 # include <iostream>
5 # include <vcsn/core/rat/visitor.hh>
6 
7 namespace vcsn
8 {
9  namespace rat
10  {
11 
12  template <typename RatExpSet>
13  class info
14  : public RatExpSet::const_visitor
15  {
16  public:
17  using ratexpset_t = RatExpSet;
18  using node_t = typename ratexpset_t::node_t;
19  using super_t = typename ratexpset_t::const_visitor;
20 
22  void operator()(const node_t& v);
23 
24 # define DEFINE(Type) \
25  public: \
26  using Type ## _t = typename super_t::Type ## _t; \
27  size_t Type = 0; \
28  \
29  private: \
30  void visit(const Type ## _t& v);
31 
45 
46 # undef DEFINE
47  };
48 
49  } // namespace rat
50 } // namespace vcsn
51 
52 # include <vcsn/core/rat/info.hxx>
53 
54 #endif // !VCSN_CORE_RAT_INFO_HH
typename ratexpset_t::const_visitor super_t
Definition: info.hh:19
An inner node with multiple children.
Definition: fwd.hh:123
#define DEFINE(Type)
Definition: info.hh:24
std::ostream & info(const A &aut, std::ostream &out, bool detailed=false)
Definition: info.hh:218
typename ratexpset_t::node_t node_t
Definition: info.hh:18
RatExpSet ratexpset_t
Definition: info.hh:17
void operator()(const node_t &v)
For each node type, count its number of occurrences.
Definition: info.hxx:15
An inner node implementing a weight.
Definition: fwd.hh:145