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 auto sub =
typename out_expressionset_t::values_t{};
87 for (
const auto& s: v)
88 sub.emplace_back(
copy(s));
89 res_ = std::make_shared<out_variadic_t>(sub);
131 template <
bool = in_context_t::is_lat,
132 typename Dummy =
void>
141 std::get<I>(v.sub()));
145 template <
size_t... I>
159 template <
typename Dummy>
182 template <
typename InExpSet,
typename OutExpSet>
183 typename OutExpSet::value_t
184 copy(
const InExpSet& in_rs,
const OutExpSet& out_rs,
185 const typename InExpSet::value_t&
v)
VCSN_RAT_VISIT(conjunction, v)
typename super_t::inner_t inner_t
const out_expressionset_t & out_rs_
expressionset to build the output value.
#define BUILTIN_UNREACHABLE()
VCSN_RAT_VISIT(shuffle, v)
VCSN_RAT_VISIT(complement, v)
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
out_value_t operator()(const tuple_t &)
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
out_value_t res_
Output value, under construction.
Functor to copy/convert a rational expression.
out_value_t operator()(const in_value_t &v)
Entry point: print v.
An inner node implementing a weight.
VCSN_RAT_VISIT(rweight, v)
typename super_t::node_t node_t
VCSN_RAT_VISIT(infiltrate, v)
auto work_(const tuple_t &v)
Copy one tape.
typename in_expressionset_t::const_visitor super_t
typename super_t::tuple_t tuple_t
void visit(const tuple_t &v, std::true_type) override
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 work_(const tuple_t &v, detail::index_sequence< I... >)
Copy all the tapes.
typename in_expressionset_t::value_t in_value_t
OutExpSet out_expressionset_t
out_value_t operator()(const tuple_t &v)
Entry point.
VCSN_RAT_VISIT(ldivide, v)
typename out_expressionset_t::value_t out_value_t
out_value_t copy(const in_value_t &v)
Easy recursion.
const in_expressionset_t & in_rs_
expressionset to decode the input value.
typename super_t::template variadic_t< Type > variadic_t
InExpSet in_expressionset_t
typename super_t::template unary_t< Type > unary_t
VCSN_RAT_VISIT(lweight, v)
typename super_t::leaf_t leaf_t
An inner node with multiple children.
void copy_(const variadic_t< Type > &v)
Factor the handling of n-ary operations.
OutExpSet::value_t copy(const InExpSet &in_rs, const OutExpSet &out_rs, const typename InExpSet::value_t &v)
Copy/convert a rational expression.
void copy_(const unary_t< Type > &v)
Factor the handling of unary operations.
VCSN_RAT_VISIT(compose, v)