Vcsn  2.8
Be Rational
vcsn::detail::nullable_helper< LabelSet > Struct Template Reference

Add support for an empty word to a LabelSet that does not provide such special label to this end. More...

#include <nullableset.hh>

Collaboration diagram for vcsn::detail::nullable_helper< LabelSet >:

Public Types

using labelset_t = LabelSet
 
using value_t = std::pair< typename labelset_t::value_t, bool >
 

Static Public Member Functions

static ATTRIBUTE_PURE constexpr value_t one ()
 
static ATTRIBUTE_PURE constexpr value_t special ()
 
template<typename Ls >
static ATTRIBUTE_PURE std::enable_if_t< Ls::has_one(), bool > is_one_ (const value_t &l)
 
template<typename Ls >
static ATTRIBUTE_PURE std::enable_if_t<!Ls::has_one(), bool > is_one_ (const value_t &l)
 
static ATTRIBUTE_PURE bool is_one (const value_t &l)
 
template<typename Value >
static Value transpose (const labelset_t &ls, Value l)
 
template<typename... Args>
static value_t value (const labelset_t &ls, Args &&... args)
 
static ATTRIBUTE_PURE labelset_t::value_t get_value (const value_t &v)
 
static auto generators (const labelset_t &ls)
 
static auto pregenerators (const labelset_t &ls)
 

Detailed Description

template<typename LabelSet>
struct vcsn::detail::nullable_helper< LabelSet >

Add support for an empty word to a LabelSet that does not provide such special label to this end.

Template Parameters
LabelSetthe LabelSet to which we want to add nullable support (e.g., a letterset<>).

Definition at line 29 of file nullableset.hh.

Member Typedef Documentation

◆ labelset_t

template<typename LabelSet >
using vcsn::detail::nullable_helper< LabelSet >::labelset_t = LabelSet

Definition at line 31 of file nullableset.hh.

◆ value_t

template<typename LabelSet >
using vcsn::detail::nullable_helper< LabelSet >::value_t = std::pair<typename labelset_t::value_t, bool>

Definition at line 32 of file nullableset.hh.

Member Function Documentation

◆ generators()

template<typename LabelSet >
static auto vcsn::detail::nullable_helper< LabelSet >::generators ( const labelset_t ls)
inlinestatic

Definition at line 98 of file nullableset.hh.

◆ get_value()

◆ is_one()

◆ is_one_() [1/2]

template<typename LabelSet >
template<typename Ls >
static ATTRIBUTE_PURE std::enable_if_t<Ls::has_one(), bool> vcsn::detail::nullable_helper< LabelSet >::is_one_ ( const value_t l)
inlinestatic

Definition at line 51 of file nullableset.hh.

References vcsn::detail::nullable_helper< LabelSet >::get_value().

Here is the call graph for this function:

◆ is_one_() [2/2]

template<typename LabelSet >
template<typename Ls >
static ATTRIBUTE_PURE std::enable_if_t<!Ls::has_one(), bool> vcsn::detail::nullable_helper< LabelSet >::is_one_ ( const value_t l)
inlinestatic

Definition at line 59 of file nullableset.hh.

◆ one()

◆ pregenerators()

template<typename LabelSet >
static auto vcsn::detail::nullable_helper< LabelSet >::pregenerators ( const labelset_t ls)
inlinestatic

Definition at line 103 of file nullableset.hh.

◆ special()

template<typename LabelSet >
static ATTRIBUTE_PURE constexpr value_t vcsn::detail::nullable_helper< LabelSet >::special ( )
inlinestatic

Definition at line 43 of file nullableset.hh.

◆ transpose()

template<typename LabelSet >
template<typename Value >
static Value vcsn::detail::nullable_helper< LabelSet >::transpose ( const labelset_t ls,
Value  l 
)
inlinestatic

Definition at line 73 of file nullableset.hh.

References vcsn::detail::nullable_helper< LabelSet >::get_value(), and vcsn::detail::nullable_helper< LabelSet >::is_one().

Here is the call graph for this function:

◆ value()

template<typename LabelSet >
template<typename... Args>
static value_t vcsn::detail::nullable_helper< LabelSet >::value ( const labelset_t ls,
Args &&...  args 
)
inlinestatic

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