Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vcsn::char_letters Class Reference

#include <char.hh>

Collaboration diagram for vcsn::char_letters:

Public Types

using letter_t = char
 
using word_t = std::string
 

Public Member Functions

virtual std::string vname (bool=true) const
 
word_t to_word (const letter_t l) const
 
const word_tto_word (const word_t &l) const
 
word_t concat (const letter_t l, const letter_t r) const
 
word_t concat (const word_t &l, const letter_t r) const
 
word_t concat (const letter_t l, const word_t &r) const
 
word_t concat (const word_t &l, const word_t &r) const
 
word_t delimit (const word_t &w) const
 Add the special character first and last. More...
 
word_t undelimit (const word_t &w) const
 Remove first and last characters, that must be "special". More...
 
word_t transpose (const word_t &w) const
 
letter_t transpose (letter_t l) const
 
bool equals (const letter_t &l1, const letter_t &l2) const
 
bool equals (const word_t &w1, const word_t &w2) const
 
bool is_letter (const letter_t &) const
 
bool is_letter (const word_t &w) const
 
std::ostream & print (const letter_t &l, std::ostream &o) const
 
std::ostream & print (const word_t &w, std::ostream &o) const
 

Static Public Member Functions

static std::string sname ()
 
static word_t empty_word ()
 
static bool is_empty_word (const word_t &w)
 
static constexpr letter_t one_letter ()
 The reserved letter used to forge the "one" label (the unit, the identity). More...
 
static char get_char (std::istream &i)
 Read a single char, with possible -escape support. More...
 
static letter_t get_letter (std::istream &i)
 Read one letter from i. More...
 
template<typename T = letter_t>
static T special ()
 Special character, used to label transitions from pre() and to post(). More...
 

Static Private Member Functions

static constexpr letter_t special_letter ()
 The reserved letter used to forge the labels for initial and final transitions. More...
 

Detailed Description

Definition at line 13 of file char.hh.

Member Typedef Documentation

Definition at line 16 of file char.hh.

using vcsn::char_letters::word_t = std::string

Definition at line 17 of file char.hh.

Member Function Documentation

word_t vcsn::char_letters::concat ( const letter_t  l,
const letter_t  r 
) const
inline

Definition at line 42 of file char.hh.

References one_letter().

Referenced by delimit().

Here is the call graph for this function:

word_t vcsn::char_letters::concat ( const word_t l,
const letter_t  r 
) const
inline

Definition at line 58 of file char.hh.

References one_letter().

Here is the call graph for this function:

word_t vcsn::char_letters::concat ( const letter_t  l,
const word_t r 
) const
inline

Definition at line 64 of file char.hh.

References one_letter().

Here is the call graph for this function:

word_t vcsn::char_letters::concat ( const word_t l,
const word_t r 
) const
inline

Definition at line 70 of file char.hh.

word_t vcsn::char_letters::delimit ( const word_t w) const
inline

Add the special character first and last.

Definition at line 76 of file char.hh.

References concat(), and special_letter().

Here is the call graph for this function:

static word_t vcsn::char_letters::empty_word ( )
inlinestatic

Definition at line 92 of file char.hh.

bool vcsn::char_letters::equals ( const letter_t l1,
const letter_t l2 
) const
inline

Definition at line 117 of file char.hh.

bool vcsn::char_letters::equals ( const word_t w1,
const word_t w2 
) const
inline

Definition at line 123 of file char.hh.

static char vcsn::char_letters::get_char ( std::istream &  i)
inlinestatic

Read a single char, with possible -escape support.

EOF is an error.

Definition at line 154 of file char.hh.

References vcsn::require().

Referenced by get_letter().

Here is the call graph for this function:

static letter_t vcsn::char_letters::get_letter ( std::istream &  i)
inlinestatic

Read one letter from i.

Either a single char, or a "letter" enclosed in single-quotes.

Definition at line 167 of file char.hh.

References get_char().

Here is the call graph for this function:

static bool vcsn::char_letters::is_empty_word ( const word_t w)
inlinestatic

Definition at line 98 of file char.hh.

bool vcsn::char_letters::is_letter ( const letter_t ) const
inline

Definition at line 129 of file char.hh.

bool vcsn::char_letters::is_letter ( const word_t w) const
inline

Definition at line 135 of file char.hh.

static constexpr letter_t vcsn::char_letters::one_letter ( )
inlinestatic

The reserved letter used to forge the "one" label (the unit, the identity).

Definition at line 142 of file char.hh.

Referenced by concat(), and print().

std::ostream& vcsn::char_letters::print ( const letter_t l,
std::ostream &  o 
) const
inline

Definition at line 173 of file char.hh.

References one_letter(), and special_letter().

Here is the call graph for this function:

std::ostream& vcsn::char_letters::print ( const word_t w,
std::ostream &  o 
) const
inline

Definition at line 181 of file char.hh.

References one_letter(), special_letter(), and vcsn::str_escape().

Here is the call graph for this function:

static std::string vcsn::char_letters::sname ( )
inlinestatic

Definition at line 19 of file char.hh.

Referenced by vname().

template<typename T = letter_t>
static T vcsn::char_letters::special ( )
static

Special character, used to label transitions from pre() and to post().

static constexpr letter_t vcsn::char_letters::special_letter ( )
inlinestaticprivate

The reserved letter used to forge the labels for initial and final transitions.

Use the public special() interface.

Definition at line 149 of file char.hh.

Referenced by delimit(), print(), and undelimit().

word_t vcsn::char_letters::to_word ( const letter_t  l) const
inline

Definition at line 30 of file char.hh.

const word_t& vcsn::char_letters::to_word ( const word_t l) const
inline

Definition at line 36 of file char.hh.

word_t vcsn::char_letters::transpose ( const word_t w) const
inline

Definition at line 104 of file char.hh.

letter_t vcsn::char_letters::transpose ( letter_t  l) const
inline

Definition at line 111 of file char.hh.

word_t vcsn::char_letters::undelimit ( const word_t w) const
inline

Remove first and last characters, that must be "special".

Definition at line 82 of file char.hh.

References special_letter().

Here is the call graph for this function:

virtual std::string vcsn::char_letters::vname ( bool  = true) const
inlinevirtual

Definition at line 24 of file char.hh.

References sname().

Here is the call graph for this function:


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