Vcsn  2.8
Be Rational
vcsn::rat::copy_impl< InExpSet, OutExpSet > Class Template Reference

Functor to copy/convert a rational expression. More...

#include <copy.hh>

Inheritance diagram for vcsn::rat::copy_impl< InExpSet, OutExpSet >:
Collaboration diagram for vcsn::rat::copy_impl< InExpSet, OutExpSet >:

Classes

struct  visit_tuple
 

Public Types

using in_expressionset_t = InExpSet
 
using out_expressionset_t = OutExpSet
 
using super_t = typename in_expressionset_t::const_visitor
 
using self_t = copy_impl
 
using in_context_t = context_t_of< in_expressionset_t >
 
using in_expression_t = typename in_expressionset_t::value_t
 
using out_expression_t = typename out_expressionset_t::value_t
 
template<type_t Type>
using unary_t = typename super_t::template unary_t< Type >
 
template<type_t Type>
using variadic_t = typename super_t::template variadic_t< Type >
 

Public Member Functions

 copy_impl (const in_expressionset_t &in_rs, const out_expressionset_t &out_rs)
 
out_expression_t operator() (const in_expression_t &v)
 Entry point: copy/convert v. More...
 

Protected Types

using ors_t = out_expressionset_t
 
using bin_t = out_expression_t(ors_t::*)(const out_expression_t &, const out_expression_t &) const
 
using tuple_t = typename super_t::tuple_t
 

Protected Member Functions

out_expression_t rec_ (const in_expression_t &v)
 Easy recursion. More...
 
template<exp::type_t Type, typename Fun >
void rec_ (const unary_t< Type > &v, Fun &&fun)
 Factor the handling of unary operations. More...
 
template<exp::type_t Type, typename Fun >
void rec_ (const variadic_t< Type > &v, Fun &&fun)
 Factor the handling of n-ary operations. More...
 
 VCSN_RAT_VISIT (add, v)
 
 VCSN_RAT_VISIT (complement, v)
 
 VCSN_RAT_VISIT (compose, v)
 
 VCSN_RAT_VISIT (conjunction, v)
 
 VCSN_RAT_VISIT (infiltrate, v)
 
 VCSN_RAT_VISIT (ldivide, v)
 
 VCSN_RAT_VISIT (one,)
 
 VCSN_RAT_VISIT (mul, v)
 
 VCSN_RAT_VISIT (shuffle, v)
 
 VCSN_RAT_VISIT (star, v)
 
 VCSN_RAT_VISIT (transposition, v)
 
 VCSN_RAT_VISIT (zero,)
 
 VCSN_RAT_VISIT (atom, v)
 
 VCSN_RAT_VISIT (name, v)
 
 VCSN_RAT_VISIT (lweight, v)
 
 VCSN_RAT_VISIT (rweight, v)
 
void visit (const tuple_t &v, std::true_type) override
 

Protected Attributes

const in_expressionset_tin_rs_
 Expressionset to decode the input value. More...
 
const out_expressionset_tout_rs_
 Expressionset to build the output value. More...
 
out_expression_t res_
 Output value, under construction. More...
 

Detailed Description

template<typename InExpSet, typename OutExpSet>
class vcsn::rat::copy_impl< InExpSet, OutExpSet >

Functor to copy/convert a rational expression.

Template Parameters
InExpSetthe input expressionset type.
OutExpSetthe output expressionset type.

Definition at line 34 of file copy.hh.

Member Typedef Documentation

◆ bin_t

template<typename InExpSet , typename OutExpSet >
using vcsn::rat::copy_impl< InExpSet, OutExpSet >::bin_t = out_expression_t (ors_t::*)(const out_expression_t&, const out_expression_t&) const
protected

Definition at line 103 of file copy.hh.

◆ in_context_t

template<typename InExpSet , typename OutExpSet >
using vcsn::rat::copy_impl< InExpSet, OutExpSet >::in_context_t = context_t_of<in_expressionset_t>

Definition at line 43 of file copy.hh.

◆ in_expression_t

template<typename InExpSet , typename OutExpSet >
using vcsn::rat::copy_impl< InExpSet, OutExpSet >::in_expression_t = typename in_expressionset_t::value_t

Definition at line 44 of file copy.hh.

◆ in_expressionset_t

template<typename InExpSet , typename OutExpSet >
using vcsn::rat::copy_impl< InExpSet, OutExpSet >::in_expressionset_t = InExpSet

Definition at line 38 of file copy.hh.

◆ ors_t

template<typename InExpSet , typename OutExpSet >
using vcsn::rat::copy_impl< InExpSet, OutExpSet >::ors_t = out_expressionset_t
protected

Definition at line 93 of file copy.hh.

◆ out_expression_t

template<typename InExpSet , typename OutExpSet >
using vcsn::rat::copy_impl< InExpSet, OutExpSet >::out_expression_t = typename out_expressionset_t::value_t

Definition at line 45 of file copy.hh.

◆ out_expressionset_t

template<typename InExpSet , typename OutExpSet >
using vcsn::rat::copy_impl< InExpSet, OutExpSet >::out_expressionset_t = OutExpSet

Definition at line 39 of file copy.hh.

◆ self_t

template<typename InExpSet , typename OutExpSet >
using vcsn::rat::copy_impl< InExpSet, OutExpSet >::self_t = copy_impl

Definition at line 41 of file copy.hh.

◆ super_t

template<typename InExpSet , typename OutExpSet >
using vcsn::rat::copy_impl< InExpSet, OutExpSet >::super_t = typename in_expressionset_t::const_visitor

Definition at line 40 of file copy.hh.

◆ tuple_t

template<typename InExpSet , typename OutExpSet >
using vcsn::rat::copy_impl< InExpSet, OutExpSet >::tuple_t = typename super_t::tuple_t
protected

Definition at line 140 of file copy.hh.

◆ unary_t

template<typename InExpSet , typename OutExpSet >
template<type_t Type>
using vcsn::rat::copy_impl< InExpSet, OutExpSet >::unary_t = typename super_t::template unary_t<Type>

Definition at line 47 of file copy.hh.

◆ variadic_t

template<typename InExpSet , typename OutExpSet >
template<type_t Type>
using vcsn::rat::copy_impl< InExpSet, OutExpSet >::variadic_t = typename super_t::template variadic_t<Type>

Definition at line 49 of file copy.hh.

Constructor & Destructor Documentation

◆ copy_impl()

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::copy_impl ( const in_expressionset_t in_rs,
const out_expressionset_t out_rs 
)
inline

Definition at line 51 of file copy.hh.

References vcsn::rat::copy_impl< InExpSet, OutExpSet >::out_rs_.

Member Function Documentation

◆ operator()()

template<typename InExpSet , typename OutExpSet >
out_expression_t vcsn::rat::copy_impl< InExpSet, OutExpSet >::operator() ( const in_expression_t v)
inline

Entry point: copy/convert v.

Definition at line 59 of file copy.hh.

References vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_().

Here is the call graph for this function:

◆ rec_() [1/3]

template<typename InExpSet , typename OutExpSet >
out_expression_t vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_ ( const in_expression_t v)
inlineprotected

◆ rec_() [2/3]

template<typename InExpSet , typename OutExpSet >
template<exp::type_t Type, typename Fun >
void vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_ ( const unary_t< Type > &  v,
Fun &&  fun 
)
inlineprotected

Factor the handling of unary operations.

Definition at line 75 of file copy.hh.

References vcsn::rat::copy_impl< InExpSet, OutExpSet >::out_rs_, vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_(), and vcsn::rat::copy_impl< InExpSet, OutExpSet >::res_.

Here is the call graph for this function:

◆ rec_() [3/3]

template<typename InExpSet , typename OutExpSet >
template<exp::type_t Type, typename Fun >
void vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_ ( const variadic_t< Type > &  v,
Fun &&  fun 
)
inlineprotected

Factor the handling of n-ary operations.

Definition at line 84 of file copy.hh.

References vcsn::rat::copy_impl< InExpSet, OutExpSet >::out_rs_, vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_(), vcsn::res, and vcsn::rat::copy_impl< InExpSet, OutExpSet >::res_.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [1/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( add  ,
v   
)
inlineprotected

Definition at line 94 of file copy.hh.

References vcsn::rat::add, vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_(), and vcsn::v.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [2/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( complement  ,
v   
)
inlineprotected

Definition at line 95 of file copy.hh.

References vcsn::rat::complement, vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_(), and vcsn::v.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [3/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( compose  ,
v   
)
inlineprotected

Definition at line 96 of file copy.hh.

References vcsn::rat::compose, vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_(), and vcsn::v.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [4/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( conjunction  ,
v   
)
inlineprotected

Definition at line 97 of file copy.hh.

References vcsn::rat::conjunction, vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_(), and vcsn::v.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [5/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( infiltrate  ,
v   
)
inlineprotected

Definition at line 98 of file copy.hh.

References vcsn::rat::infiltrate, vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_(), and vcsn::v.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [6/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( ldivide  ,
v   
)
inlineprotected

Definition at line 99 of file copy.hh.

References vcsn::rat::ldivide, vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_(), and vcsn::v.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [7/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( one  )
inlineprotected

◆ VCSN_RAT_VISIT() [8/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( mul  ,
v   
)
inlineprotected

Definition at line 104 of file copy.hh.

References vcsn::rat::mul, vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_(), and vcsn::v.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [9/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( shuffle  ,
v   
)
inlineprotected

Definition at line 106 of file copy.hh.

References vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_(), vcsn::rat::shuffle, and vcsn::v.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [10/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( star  ,
v   
)
inlineprotected

Definition at line 107 of file copy.hh.

References vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_(), vcsn::rat::star, and vcsn::v.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [11/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( transposition  ,
v   
)
inlineprotected

Definition at line 108 of file copy.hh.

References vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_(), vcsn::rat::transposition, and vcsn::v.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [12/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( zero  )
inlineprotected

◆ VCSN_RAT_VISIT() [13/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( atom  ,
v   
)
inlineprotected

◆ VCSN_RAT_VISIT() [14/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( name  ,
v   
)
inlineprotected

Definition at line 117 of file copy.hh.

References vcsn::rat::copy_impl< InExpSet, OutExpSet >::out_rs_, vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_(), vcsn::rat::copy_impl< InExpSet, OutExpSet >::res_, and vcsn::v.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [15/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( lweight  ,
v   
)
inlineprotected

Definition at line 122 of file copy.hh.

References vcsn::rat::copy_impl< InExpSet, OutExpSet >::in_rs_, vcsn::rat::copy_impl< InExpSet, OutExpSet >::out_rs_, vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_(), vcsn::rat::copy_impl< InExpSet, OutExpSet >::res_, and vcsn::v.

Here is the call graph for this function:

◆ VCSN_RAT_VISIT() [16/16]

template<typename InExpSet , typename OutExpSet >
vcsn::rat::copy_impl< InExpSet, OutExpSet >::VCSN_RAT_VISIT ( rweight  ,
v   
)
inlineprotected

Definition at line 129 of file copy.hh.

References vcsn::rat::copy_impl< InExpSet, OutExpSet >::in_rs_, vcsn::rat::copy_impl< InExpSet, OutExpSet >::out_rs_, vcsn::rat::copy_impl< InExpSet, OutExpSet >::rec_(), vcsn::rat::copy_impl< InExpSet, OutExpSet >::res_, and vcsn::v.

Here is the call graph for this function:

◆ visit()

template<typename InExpSet , typename OutExpSet >
void vcsn::rat::copy_impl< InExpSet, OutExpSet >::visit ( const tuple_t v,
std::true_type   
)
inlineoverrideprotected

Definition at line 169 of file copy.hh.

References vcsn::rat::copy_impl< InExpSet, OutExpSet >::res_, and vcsn::v.

Member Data Documentation

◆ in_rs_

template<typename InExpSet , typename OutExpSet >
const in_expressionset_t& vcsn::rat::copy_impl< InExpSet, OutExpSet >::in_rs_
protected

◆ out_rs_

template<typename InExpSet , typename OutExpSet >
const out_expressionset_t& vcsn::rat::copy_impl< InExpSet, OutExpSet >::out_rs_
protected

◆ res_

template<typename InExpSet , typename OutExpSet >
out_expression_t vcsn::rat::copy_impl< InExpSet, OutExpSet >::res_
protected

The documentation for this class was generated from the following file: