Vcsn  2.1
Be Rational
fwd.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory> // shared_ptr
4 
5 namespace vcsn
6 {
7  namespace dyn
8  {
9  namespace detail
10  {
12  template <typename To, typename From>
13  inline
14  To dyn_cast(From&& from)
15  {
16 #ifdef NDEBUG
17  return static_cast<To>(std::forward<From>(from));
18 #else
19  return dynamic_cast<To>(std::forward<From>(from));
20 #endif
21  }
22  }
23 
24  // vcsn/dyn/automaton.hh.
25  namespace detail
26  {
27  class automaton_base;
28  template <typename Aut>
29  class automaton_wrapper;
30  }
31  using automaton = std::shared_ptr<detail::automaton_base>;
32 
33  // vcsn/dyn/context.hh.
34  namespace detail
35  {
36  class context_base;
37  template <typename Context>
38  class context_wrapper;
39  }
41  using context = std::shared_ptr<const detail::context_base>;
42 
43  // vcsn/dyn/expansion.hh.
44  namespace detail
45  {
46  class expansion_base;
47  template <typename Aut>
48  class expansion_wrapper;
49  }
50  using expansion = std::shared_ptr<const detail::expansion_base>;
51 
52  // vcsn/dyn/label.hh.
53  namespace detail
54  {
55  class label_base;
56  template <typename T>
58  }
59  using label = std::shared_ptr<const detail::label_base>;
60 
61  // vcsn/dyn/polynomial.hh.
62  namespace detail
63  {
64  class polynomial_base;
65  template <typename PolynomialSet>
67  }
68  using polynomial = std::shared_ptr<const detail::polynomial_base>;
69 
70  // vcsn/dyn/expression.hh.
71  namespace detail
72  {
73  class expression_base;
74  template <typename ExpSet>
75  class expression_wrapper;
76  }
77  using expression = std::shared_ptr<detail::expression_base>;
78 
79  // vcsn/dyn/weight.hh.
80  namespace detail
81  {
82  class weight_base;
83  template <typename T>
85  }
86  using weight = std::shared_ptr<const detail::weight_base>;
87  }
88 
89  // vcsn/dyn/type-ast.hh.
90  namespace ast
91  {
92  class ast_node;
93  class automaton;
94  class context;
95  class expansionset;
96  class expressionset;
97  class genset;
98  class letterset;
99  class nullableset;
100  class oneset;
101  class other;
102  class polynomialset;
103  class tuple;
104  class tupleset;
105  class weightset;
106  class wordset;
107  }
108 } // namespace vcsn
Implementation of labels are letters.
Definition: fwd.hh:10
std::shared_ptr< const detail::label_base > label
Definition: fwd.hh:59
std::shared_ptr< const detail::context_base > context
A dyn::context.
Definition: fwd.hh:41
Aggregate a polynomial and its polynomialset.
Definition: fwd.hh:66
ValueSet::value_t tuple(const ValueSet &vs, const typename ValueSets::value_t &...v)
Definition: tuple.hh:28
std::shared_ptr< const detail::weight_base > weight
Definition: fwd.hh:86
Provide a variadic mul on top of a binary mul(), and one().
Definition: fwd.hh:46
Implementation of labels are ones: there is a single instance of label.
Definition: oneset.hh:17
std::shared_ptr< detail::automaton_base > automaton
Definition: automaton.hh:69
std::shared_ptr< const detail::expansion_base > expansion
Definition: expansion.hh:73
std::shared_ptr< const detail::polynomial_base > polynomial
Definition: fwd.hh:68
Aggregate a label and its labelset.
Definition: fwd.hh:57
std::shared_ptr< detail::expression_base > expression
Definition: expression.hh:78
Aggregate a weight and its weightset.
Definition: fwd.hh:84
Implementation of labels are words.
Definition: fwd.hh:31
To dyn_cast(From &&from)
A dynamic_cast in debug mode, static_cast with NDEBUG.
Definition: fwd.hh:14
Implementation of labels are nullables (letter or empty).
Definition: fwd.hh:14