19 template <
typename InExpSet,
typename OutExpSet = InExpSet>
20 typename OutExpSet::value_t
21 copy(
const InExpSet& in_rs,
const OutExpSet& out_rs,
22 const typename InExpSet::value_t&
v);
28 template <
typename InExpSet,
typename OutExpSet = InExpSet>
30 :
public InExpSet::const_visitor
35 using super_t =
typename in_expressionset_t::const_visitor;
41 using node_t =
typename super_t::node_t;
42 using inner_t =
typename super_t::inner_t;
43 template <type_t Type>
45 template <type_t Type>
47 using leaf_t =
typename super_t::leaf_t;
70 template <exp::type_t Type>
75 =
typename out_expressionset_t::template unary_t<Type>;
76 res_ = std::make_shared<out_unary_t>(
copy(v.sub()));
80 template <exp::type_t Type>
85 =
typename out_expressionset_t::template variadic_t<Type>;
86 typename out_expressionset_t::values_t sub;
87 for (
const auto& s: v)
88 sub.emplace_back(
copy(s));
89 res_ = std::make_shared<out_variadic_t>(sub);
130 template <
bool = in_context_t::is_lat,
131 typename Dummy =
void>
140 std::get<I>(v.sub()));
144 template <
size_t... I>
158 template <
typename Dummy>
181 template <
typename InExpSet,
typename OutExpSet>
182 typename OutExpSet::value_t
183 copy(
const InExpSet& in_rs,
const OutExpSet& out_rs,
184 const typename InExpSet::value_t&
v)
VCSN_RAT_VISIT(shuffle, v)
typename in_expressionset_t::value_t in_value_t
typename in_expressionset_t::const_visitor super_t
copier(const in_expressionset_t &in_rs, const out_expressionset_t &out_rs)
context_t_of< in_expressionset_t > in_context_t
VCSN_RAT_VISIT(transposition, v)
out_value_t copy(const in_value_t &v)
Easy recursion.
typename out_expressionset_t::value_t out_value_t
typename super_t::template variadic_t< Type > variadic_t
VCSN_RAT_VISIT(infiltration, v)
out_value_t work_(const tuple_t &v, detail::index_sequence< I... >)
Copy all the tapes.
auto work_(const tuple_t &v)
Copy one tape.
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
An inner node with multiple children.
void copy_(const variadic_t< Type > &v)
Factor the copy of n-ary operations.
void copy_(const unary_t< Type > &v)
Factor the copy of n-ary operations.
#define BUILTIN_UNREACHABLE()
Functor to copy/convert a rational expression.
typename super_t::tuple_t tuple_t
void visit(const tuple_t &v, std::true_type) override
out_value_t operator()(const tuple_t &)
typename super_t::inner_t inner_t
VCSN_RAT_VISIT(complement, v)
const out_expressionset_t & out_rs_
expressionset to build the output value.
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
typename super_t::template unary_t< Type > unary_t
VCSN_RAT_VISIT(lweight, v)
OutExpSet out_expressionset_t
An inner node implementing a weight.
typename super_t::leaf_t leaf_t
OutExpSet::value_t copy(const InExpSet &in_rs, const OutExpSet &out_rs, const typename InExpSet::value_t &v)
Copy/convert a rational expression.
VCSN_RAT_VISIT(rweight, v)
const in_expressionset_t & in_rs_
expressionset to decode the input value.
out_value_t res_
Output value, under construction.
InExpSet in_expressionset_t
out_value_t operator()(const in_value_t &v)
Entry point: print v.
typename super_t::node_t node_t
VCSN_RAT_VISIT(conjunction, v)
out_value_t operator()(const tuple_t &v)
Entry point.