Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vcsn::context< LabelSet, WeightSet > Class Template Reference

#include <context.hh>

Collaboration diagram for vcsn::context< LabelSet, WeightSet >:

Public Types

enum  {
  is_lal = vcsn::is_lal<context>::value, is_lan = vcsn::is_lan<context>::value, is_lao = vcsn::is_lao<context>::value, is_lar = vcsn::is_lar<context>::value,
  is_lat = vcsn::is_lat<context>::value, is_law = vcsn::is_law<context>::value
}
 
using labelset_t = LabelSet
 
using weightset_t = WeightSet
 
using labelset_ptr = std::shared_ptr< const labelset_t >
 
using weightset_ptr = std::shared_ptr< const weightset_t >
 
using kind_t = typename labelset_t::kind_t
 
using label_t = typename labelset_t::value_t
 Type of transition labels, and type of RatExp atoms. More...
 
using weight_t = typename weightset_t::value_t
 Type of weights. More...
 

Public Member Functions

 context (const context &that)
 
 context (const labelset_ptr &ls, const weightset_ptr &ws)
 
 context (const labelset_t &ls, const weightset_t &ws={})
 Build a context. More...
 
template<typename LabelSet2 = labelset_t>
 context (const std::initializer_list< typename LabelSet2::letter_t > &gs, const weightset_t &ws={})
 Build a context. More...
 
template<typename LabelSet2 = labelset_t>
 context ()
 Build a context whose labelset constructor takes no argument. More...
 
contextoperator= (context &&that)
 
std::string vname (bool full=true) const
 
const labelset_ptrlabelset () const
 
const weightset_ptrweightset () const
 
std::ostream & print_set (std::ostream &o, symbol format=symbol{"text"}) const
 

Static Public Member Functions

static std::string sname ()
 The name of this context, built from its parameters. More...
 
static context make (std::istream &is)
 Build from the description in is. More...
 
static constexpr bool has_one ()
 

Private Attributes

labelset_ptr ls_
 
weightset_ptr ws_
 

Detailed Description

template<typename LabelSet, typename WeightSet>
class vcsn::context< LabelSet, WeightSet >

Definition at line 19 of file context.hh.

Member Typedef Documentation

template<typename LabelSet, typename WeightSet>
using vcsn::context< LabelSet, WeightSet >::kind_t = typename labelset_t::kind_t

Definition at line 27 of file context.hh.

template<typename LabelSet, typename WeightSet>
using vcsn::context< LabelSet, WeightSet >::label_t = typename labelset_t::value_t

Type of transition labels, and type of RatExp atoms.

Definition at line 38 of file context.hh.

template<typename LabelSet, typename WeightSet>
using vcsn::context< LabelSet, WeightSet >::labelset_ptr = std::shared_ptr<const labelset_t>

Definition at line 24 of file context.hh.

template<typename LabelSet, typename WeightSet>
using vcsn::context< LabelSet, WeightSet >::labelset_t = LabelSet

Definition at line 22 of file context.hh.

template<typename LabelSet, typename WeightSet>
using vcsn::context< LabelSet, WeightSet >::weight_t = typename weightset_t::value_t

Type of weights.

Definition at line 40 of file context.hh.

template<typename LabelSet, typename WeightSet>
using vcsn::context< LabelSet, WeightSet >::weightset_ptr = std::shared_ptr<const weightset_t>

Definition at line 25 of file context.hh.

template<typename LabelSet, typename WeightSet>
using vcsn::context< LabelSet, WeightSet >::weightset_t = WeightSet

Definition at line 23 of file context.hh.

Member Enumeration Documentation

template<typename LabelSet, typename WeightSet>
anonymous enum
Enumerator
is_lal 
is_lan 
is_lao 
is_lar 
is_lat 
is_law 

Definition at line 28 of file context.hh.

Constructor & Destructor Documentation

template<typename LabelSet, typename WeightSet>
vcsn::context< LabelSet, WeightSet >::context ( const context< LabelSet, WeightSet > &  that)
inline

Definition at line 42 of file context.hh.

template<typename LabelSet, typename WeightSet>
vcsn::context< LabelSet, WeightSet >::context ( const labelset_ptr ls,
const weightset_ptr ws 
)
inline
Parameters
lsthe labelset
wsthe weightset

Definition at line 48 of file context.hh.

template<typename LabelSet, typename WeightSet>
vcsn::context< LabelSet, WeightSet >::context ( const labelset_t ls,
const weightset_t ws = {} 
)
inline

Build a context.

Parameters
lsthe labelset
wsthe weightset

Definition at line 56 of file context.hh.

template<typename LabelSet, typename WeightSet>
template<typename LabelSet2 = labelset_t>
vcsn::context< LabelSet, WeightSet >::context ( const std::initializer_list< typename LabelSet2::letter_t > &  gs,
const weightset_t ws = {} 
)
inline

Build a context.

Parameters
gsthe generators
wsthe weightset

Definition at line 77 of file context.hh.

template<typename LabelSet, typename WeightSet>
template<typename LabelSet2 = labelset_t>
vcsn::context< LabelSet, WeightSet >::context ( )
inline

Build a context whose labelset constructor takes no argument.

Definition at line 84 of file context.hh.

Member Function Documentation

template<typename LabelSet, typename WeightSet>
static constexpr bool vcsn::context< LabelSet, WeightSet >::has_one ( )
inlinestatic

Definition at line 146 of file context.hh.

template<typename LabelSet, typename WeightSet>
static context vcsn::context< LabelSet, WeightSet >::make ( std::istream &  is)
inlinestatic

Build from the description in is.

Definition at line 114 of file context.hh.

References vcsn::eat().

Here is the call graph for this function:

template<typename LabelSet, typename WeightSet>
context& vcsn::context< LabelSet, WeightSet >::operator= ( context< LabelSet, WeightSet > &&  that)
inline
template<typename LabelSet, typename WeightSet>
std::ostream& vcsn::context< LabelSet, WeightSet >::print_set ( std::ostream &  o,
symbol  format = symbol{"text"} 
) const
inline

Definition at line 135 of file context.hh.

template<typename LabelSet, typename WeightSet>
static std::string vcsn::context< LabelSet, WeightSet >::sname ( )
inlinestatic

The name of this context, built from its parameters.

E.g., "lal_char, b", "law_char, zmin".

Definition at line 101 of file context.hh.

References vcsn::sname().

Here is the call graph for this function:

template<typename LabelSet, typename WeightSet>
std::string vcsn::context< LabelSet, WeightSet >::vname ( bool  full = true) const
inline

Definition at line 107 of file context.hh.

References vcsn::context< LabelSet, WeightSet >::labelset(), and vcsn::context< LabelSet, WeightSet >::weightset().

Here is the call graph for this function:

Member Data Documentation

template<typename LabelSet, typename WeightSet>
labelset_ptr vcsn::context< LabelSet, WeightSet >::ls_
private
template<typename LabelSet, typename WeightSet>
weightset_ptr vcsn::context< LabelSet, WeightSet >::ws_
private

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