Vcsn  2.2
Be Rational
vcsn::detail::genset_labelset< GenSet > Struct Template Reference

This class has no modeling purpose, it only serves to factor code common to letterset and wordset. More...

#include <genset-labelset.hh>

Inheritance diagram for vcsn::detail::genset_labelset< GenSet >:
Collaboration diagram for vcsn::detail::genset_labelset< GenSet >:

Public Types

using genset_t = GenSet
 
using genset_ptr = std::shared_ptr< const genset_t >
 
using letter_t = typename genset_t::letter_t
 
using word_t = typename genset_t::word_t
 
using letters_t = typename genset_t::letters_t
 

Public Member Functions

 genset_labelset (const genset_ptr &gs)
 
 genset_labelset (const genset_t &gs={})
 
genset_ptr genset () const
 
const genset_tgenerators () const
 
template<typename Fun >
void convs_ (std::istream &i, Fun fun) const
 Read and process a class of letters. More...
 
letter_t get_letter (std::istream &i, bool quoted=true) const
 Read one letter from i. More...
 
template<typename... Args>
auto begin (Args &&...args) const -> decltype(this->genset() -> begin(std::forward< Args >(args)...))
 
template<typename... Args>
auto delimit (Args &&...args) const -> decltype(this->genset() -> delimit(std::forward< Args >(args)...))
 
template<typename... Args>
auto end (Args &&...args) const -> decltype(this->genset() -> end(std::forward< Args >(args)...))
 
template<typename... Args>
ATTRIBUTE_PURE auto equal (Args &&...args) const -> decltype(this->genset() -> equal(std::forward< Args >(args)...))
 
template<typename... Args>
auto get_word (Args &&...args) const -> decltype(this->genset() -> get_word(std::forward< Args >(args)...))
 
template<typename... Args>
ATTRIBUTE_PURE auto has (Args &&...args) const -> decltype(this->genset() -> has(std::forward< Args >(args)...))
 
template<typename... Args>
ATTRIBUTE_PURE auto is_letter (Args &&...args) const -> decltype(this->genset() -> is_letter(std::forward< Args >(args)...))
 
template<typename... Args>
ATTRIBUTE_PURE auto less (Args &&...args) const -> decltype(this->genset() -> less(std::forward< Args >(args)...))
 
template<typename... Args>
auto mul (Args &&...args) const -> decltype(this->genset() -> mul(std::forward< Args >(args)...))
 
template<typename... Args>
ATTRIBUTE_PURE auto transpose (Args &&...args) const -> decltype(this->genset() -> transpose(std::forward< Args >(args)...))
 
template<typename... Args>
auto undelimit (Args &&...args) const -> decltype(this->genset() -> undelimit(std::forward< Args >(args)...))
 

Static Public Member Functions

static symbol sname ()
 

Private Attributes

genset_ptr gs_
 

Detailed Description

template<typename GenSet>
struct vcsn::detail::genset_labelset< GenSet >

This class has no modeling purpose, it only serves to factor code common to letterset and wordset.

Definition at line 19 of file genset-labelset.hh.

Member Typedef Documentation

template<typename GenSet >
using vcsn::detail::genset_labelset< GenSet >::genset_ptr = std::shared_ptr<const genset_t>

Definition at line 22 of file genset-labelset.hh.

template<typename GenSet >
using vcsn::detail::genset_labelset< GenSet >::genset_t = GenSet

Definition at line 21 of file genset-labelset.hh.

template<typename GenSet >
using vcsn::detail::genset_labelset< GenSet >::letter_t = typename genset_t::letter_t

Definition at line 24 of file genset-labelset.hh.

template<typename GenSet >
using vcsn::detail::genset_labelset< GenSet >::letters_t = typename genset_t::letters_t

Definition at line 26 of file genset-labelset.hh.

template<typename GenSet >
using vcsn::detail::genset_labelset< GenSet >::word_t = typename genset_t::word_t

Definition at line 25 of file genset-labelset.hh.

Constructor & Destructor Documentation

template<typename GenSet >
vcsn::detail::genset_labelset< GenSet >::genset_labelset ( const genset_ptr gs)
inline

Definition at line 28 of file genset-labelset.hh.

template<typename GenSet >
vcsn::detail::genset_labelset< GenSet >::genset_labelset ( const genset_t gs = {})
inline

Definition at line 32 of file genset-labelset.hh.

Member Function Documentation

template<typename GenSet >
template<typename... Args>
auto vcsn::detail::genset_labelset< GenSet >::begin ( Args &&...  args) const -> decltype(this->genset()-> begin (std::forward<Args>(args)...))
inline

Definition at line 97 of file genset-labelset.hh.

template<typename GenSet >
template<typename Fun >
void vcsn::detail::genset_labelset< GenSet >::convs_ ( std::istream &  i,
Fun  fun 
) const
inline

Read and process a class of letters.

Letters are sorted, and uniqued.

Stream i is on the '[', read up to the closing ']', included. Apply fun to all the letters. Take negation into account. Classes can never be empty.

For instance "[a-d0-9_]", or "[^a-fz], or "[^]", but not "[]".

Precondition
i does not start with ']'.

Definition at line 65 of file genset-labelset.hh.

References vcsn::detail::conv_label_class_(), and vcsn::eat().

Referenced by vcsn::letterset< GenSet >::convs(), and vcsn::wordset< GenSet >::convs().

Here is the call graph for this function:

template<typename GenSet >
template<typename... Args>
auto vcsn::detail::genset_labelset< GenSet >::delimit ( Args &&...  args) const -> decltype(this->genset()-> delimit (std::forward<Args>(args)...))
inline

Definition at line 98 of file genset-labelset.hh.

template<typename GenSet >
template<typename... Args>
auto vcsn::detail::genset_labelset< GenSet >::end ( Args &&...  args) const -> decltype(this->genset()-> end (std::forward<Args>(args)...))
inline

Definition at line 99 of file genset-labelset.hh.

template<typename GenSet >
template<typename... Args>
ATTRIBUTE_PURE auto vcsn::detail::genset_labelset< GenSet >::equal ( Args &&...  args) const -> decltype(this->genset()-> equal (std::forward<Args>(args)...))
inline

Definition at line 100 of file genset-labelset.hh.

template<typename GenSet >
const genset_t& vcsn::detail::genset_labelset< GenSet >::generators ( ) const
inline

Definition at line 41 of file genset-labelset.hh.

References vcsn::detail::genset_labelset< GenSet >::gs_.

Referenced by vcsn::random_label().

template<typename GenSet >
letter_t vcsn::detail::genset_labelset< GenSet >::get_letter ( std::istream &  i,
bool  quoted = true 
) const
inline

Read one letter from i.

Definition at line 78 of file genset-labelset.hh.

References vcsn::detail::genset_labelset< GenSet >::genset(), vcsn::detail::genset_labelset< GenSet >::has(), vcsn::str_escape(), and VCSN_REQUIRE.

Referenced by vcsn::letterset< GenSet >::conv().

Here is the call graph for this function:

template<typename GenSet >
template<typename... Args>
auto vcsn::detail::genset_labelset< GenSet >::get_word ( Args &&...  args) const -> decltype(this->genset()-> get_word (std::forward<Args>(args)...))
inline

Definition at line 101 of file genset-labelset.hh.

template<typename GenSet >
template<typename... Args>
ATTRIBUTE_PURE auto vcsn::detail::genset_labelset< GenSet >::has ( Args &&...  args) const -> decltype(this->genset()-> has (std::forward<Args>(args)...))
inline
template<typename GenSet >
template<typename... Args>
ATTRIBUTE_PURE auto vcsn::detail::genset_labelset< GenSet >::is_letter ( Args &&...  args) const -> decltype(this->genset()-> is_letter (std::forward<Args>(args)...))
inline

Definition at line 103 of file genset-labelset.hh.

template<typename GenSet >
template<typename... Args>
ATTRIBUTE_PURE auto vcsn::detail::genset_labelset< GenSet >::less ( Args &&...  args) const -> decltype(this->genset()-> less (std::forward<Args>(args)...))
inline

Definition at line 104 of file genset-labelset.hh.

template<typename GenSet >
template<typename... Args>
auto vcsn::detail::genset_labelset< GenSet >::mul ( Args &&...  args) const -> decltype(this->genset()-> mul (std::forward<Args>(args)...))
inline

Definition at line 105 of file genset-labelset.hh.

Referenced by vcsn::random_label().

template<typename GenSet >
static symbol vcsn::detail::genset_labelset< GenSet >::sname ( )
inlinestatic

Definition at line 46 of file genset-labelset.hh.

References vcsn::sname().

Referenced by vcsn::letterset< GenSet >::sname(), and vcsn::wordset< GenSet >::sname().

Here is the call graph for this function:

template<typename GenSet >
template<typename... Args>
ATTRIBUTE_PURE auto vcsn::detail::genset_labelset< GenSet >::transpose ( Args &&...  args) const -> decltype(this->genset()-> transpose (std::forward<Args>(args)...))
inline
template<typename GenSet >
template<typename... Args>
auto vcsn::detail::genset_labelset< GenSet >::undelimit ( Args &&...  args) const -> decltype(this->genset()-> undelimit (std::forward<Args>(args)...))
inline

Definition at line 107 of file genset-labelset.hh.

Member Data Documentation


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