Vcsn  2.3
Be Rational
vcsn::context< LabelSet, WeightSet > Class Template Reference

#include <context.hh>

Inheritance diagram for vcsn::context< LabelSet, WeightSet >:
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 expression 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...
 
contextoperator= (context &&that)
 
const labelset_ptrlabelset () const
 
const weightset_ptrweightset () const
 
std::ostream & print_set (std::ostream &o, format fmt={}) const
 

Static Public Member Functions

static symbol 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 18 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 26 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 expression atoms.

Definition at line 37 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 23 of file context.hh.

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

Definition at line 21 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 39 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 24 of file context.hh.

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

Definition at line 22 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 27 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 41 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 47 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 55 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 132 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 83 of file context.hh.

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

Definition at line 60 of file context.hh.

template<typename LabelSet, typename WeightSet>
std::ostream& vcsn::context< LabelSet, WeightSet >::print_set ( std::ostream &  o,
format  fmt = {} 
) const
inline

Definition at line 106 of file context.hh.

Referenced by vcsn::rat::expressionset_impl< Context >::print_set().

template<typename LabelSet, typename WeightSet>
static symbol 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 72 of file context.hh.

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: