Awali
Another Weighted Automata library
Public Types | Public Member Functions | Static Public Member Functions
awali::sttc::set_alphabet< L > Class Template Reference

objets that represent the alphabets of letters as char More...

#include <setalpha.hh>

Inheritance diagram for awali::sttc::set_alphabet< L >:

Public Types

using const_iterator = typename letters_t::const_iterator
 
using iterator = typename letters_t::const_iterator
 
using letter_t = typename L::letter_t
 
using letters_t = std::set< letter_t >
 
using value_type = letter_t
 The type of our values, when seen as a container. More...
 

Public Member Functions

 set_alphabet ()=default
 
 set_alphabet (const letters_t &l)
 
 set_alphabet (const set_alphabet &)=default
 
 set_alphabet (const std::initializer_list< letter_t > &l)
 
set_alphabetadd_letter (letter_t l)
 Modify this by adding l, and return *this. More...
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
set_alphabetclear ()
 
const_iterator end () const
 
const_iterator find (letter_t l) const
 
bool has (letter_t l) const
 Whether l is a letter. More...
 
bool open (bool o) const
 Whether unknown letters should be added, or rejected. More...
 
std::ostream & print_set (std::ostream &o, const std::string &format="text") const
 
set_alphabetremove_letter (letter_t l)
 
unsigned size () const
 
template<unsigned version = version::fsm_json>
json::object_tto_json () const
 
virtual std::string vname (bool full=true) const override
 

Static Public Member Functions

static std::string sname ()
 

Detailed Description

template<typename L>
class awali::sttc::set_alphabet< L >

objets that represent the alphabets of letters as char

Template Parameters
Lthe type of letters

L is actually char_letters

Member Typedef Documentation

◆ const_iterator

template<typename L >
using awali::sttc::set_alphabet< L >::const_iterator = typename letters_t::const_iterator

◆ iterator

template<typename L >
using awali::sttc::set_alphabet< L >::iterator = typename letters_t::const_iterator

◆ letter_t

template<typename L >
using awali::sttc::set_alphabet< L >::letter_t = typename L::letter_t

◆ letters_t

template<typename L >
using awali::sttc::set_alphabet< L >::letters_t = std::set<letter_t>

◆ value_type

template<typename L >
using awali::sttc::set_alphabet< L >::value_type = letter_t

The type of our values, when seen as a container.

Constructor & Destructor Documentation

◆ set_alphabet() [1/4]

template<typename L >
awali::sttc::set_alphabet< L >::set_alphabet ( )
default

◆ set_alphabet() [2/4]

template<typename L >
awali::sttc::set_alphabet< L >::set_alphabet ( const set_alphabet< L > &  )
default

◆ set_alphabet() [3/4]

template<typename L >
awali::sttc::set_alphabet< L >::set_alphabet ( const std::initializer_list< letter_t > &  l)

◆ set_alphabet() [4/4]

template<typename L >
awali::sttc::set_alphabet< L >::set_alphabet ( const letters_t l)

Member Function Documentation

◆ add_letter()

template<typename L >
set_alphabet& awali::sttc::set_alphabet< L >::add_letter ( letter_t  l)

Modify this by adding l, and return *this.

◆ begin()

template<typename L >
const_iterator awali::sttc::set_alphabet< L >::begin ( ) const

◆ cbegin()

template<typename L >
const_iterator awali::sttc::set_alphabet< L >::cbegin ( ) const

◆ cend()

template<typename L >
const_iterator awali::sttc::set_alphabet< L >::cend ( ) const

◆ clear()

template<typename L >
set_alphabet& awali::sttc::set_alphabet< L >::clear ( )

◆ end()

template<typename L >
const_iterator awali::sttc::set_alphabet< L >::end ( ) const

◆ find()

template<typename L >
const_iterator awali::sttc::set_alphabet< L >::find ( letter_t  l) const

◆ has()

template<typename L >
bool awali::sttc::set_alphabet< L >::has ( letter_t  l) const

Whether l is a letter.

◆ open()

template<typename L >
bool awali::sttc::set_alphabet< L >::open ( bool  o) const

Whether unknown letters should be added, or rejected.

Parameters
owhether to accept
Returns
the previous status.

◆ print_set()

template<typename L >
std::ostream& awali::sttc::set_alphabet< L >::print_set ( std::ostream &  o,
const std::string &  format = "text" 
) const

◆ remove_letter()

template<typename L >
set_alphabet& awali::sttc::set_alphabet< L >::remove_letter ( letter_t  l)

◆ size()

template<typename L >
unsigned awali::sttc::set_alphabet< L >::size ( ) const

◆ sname()

template<typename L >
static std::string awali::sttc::set_alphabet< L >::sname ( )
static

◆ to_json()

template<typename L >
template<unsigned version = version::fsm_json>
json::object_t* awali::sttc::set_alphabet< L >::to_json ( ) const

◆ vname()

template<typename L >
virtual std::string awali::sttc::set_alphabet< L >::vname ( bool  full = true) const
overridevirtual

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