Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vcsn::nullableset< LabelSet > Class Template Reference

Implementation of labels are nullables (letter or empty). More...

#include <fwd.hh>

Inheritance diagram for vcsn::nullableset< LabelSet >:
Collaboration diagram for vcsn::nullableset< LabelSet >:

Public Types

using labelset_t = LabelSet
 
using labelset_ptr = std::shared_ptr< const labelset_t >
 
using self_type = nullableset
 
using helper_t = detail::nullable_helper< labelset_t >
 
using kind_t = typename helper_t::kind_t
 
using value_t = typename helper_t::value_t
 
using word_t = typename labelset_t::word_t
 

Public Member Functions

 nullableset (const labelset_t &ls)
 
 nullableset (const std::shared_ptr< const labelset_t > &ls)
 
std::string vname (bool full=true) const
 
bool open (bool o) const
 Whether unknown letters should be added, or rejected. More...
 
bool is_valid (value_t v) const
 
value_t conv (self_type, value_t v) const
 
value_t conv (oneset, typename oneset::value_t) const
 
template<typename LabelSet_ >
value_t conv (const LabelSet_ &ls, typename LabelSet_::value_t v) const
 Conversion from another type: first by the wrapped labelset, and then by our wrappers (in case the wrapped labelset does not support "one"). More...
 
const labelset_ptr labelset () const
 
template<typename... Args>
value_t value (Args &&...args) const
 
word_t word (const value_t &l) const
 
size_t size (const value_t &v) const
 
value_t conv (std::istream &i) const
 
std::set< value_tconvs (std::istream &i) const
 
std::ostream & print (value_t l, std::ostream &o, symbol format=symbol{"text"}) const
 
value_t zero () const
 
bool is_zero (const value_t &v) const
 
bool is_letter (const value_t &v) const
 
value_t transpose (const value_t &l) const
 
std::ostream & print_set (std::ostream &o, symbol format=symbol{"text"}) const
 

Static Public Member Functions

static std::string sname ()
 
static nullableset make (std::istream &i)
 Build from the description in is. More...
 
static constexpr bool has_one ()
 
static constexpr bool is_ratexpset ()
 
static constexpr bool is_letterized ()
 
static constexpr bool is_free ()
 
static ATTRIBUTE_PURE
constexpr value_t 
one ()
 
static ATTRIBUTE_PURE bool is_one (value_t l)
 
static bool equals (const value_t &l, const value_t &r)
 Whether l == r. More...
 
static bool less_than (const value_t &l, const value_t &r)
 Whether l < r. More...
 
static value_t special ()
 
static bool is_special (const value_t &v)
 
static size_t hash (const value_t &v)
 
static void make_nullableset_kind (std::istream &is)
 
static labelset_t::value_t get_value (const value_t &v)
 Return the value when it's not one. More...
 

Public Attributes

labelset_ptr ls_
 

Detailed Description

template<typename LabelSet>
class vcsn::nullableset< LabelSet >

Implementation of labels are nullables (letter or empty).

Definition at line 13 of file fwd.hh.

Member Typedef Documentation

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

Definition at line 177 of file nullableset.hh.

template<typename LabelSet>
using vcsn::nullableset< LabelSet >::kind_t = typename helper_t::kind_t

Definition at line 178 of file nullableset.hh.

template<typename LabelSet>
using vcsn::nullableset< LabelSet >::labelset_ptr = std::shared_ptr<const labelset_t>

Definition at line 175 of file nullableset.hh.

template<typename LabelSet>
using vcsn::nullableset< LabelSet >::labelset_t = LabelSet

Definition at line 174 of file nullableset.hh.

template<typename LabelSet>
using vcsn::nullableset< LabelSet >::self_type = nullableset

Definition at line 176 of file nullableset.hh.

template<typename LabelSet>
using vcsn::nullableset< LabelSet >::value_t = typename helper_t::value_t

Definition at line 180 of file nullableset.hh.

template<typename LabelSet>
using vcsn::nullableset< LabelSet >::word_t = typename labelset_t::word_t

Definition at line 181 of file nullableset.hh.

Constructor & Destructor Documentation

template<typename LabelSet>
vcsn::nullableset< LabelSet >::nullableset ( const labelset_t ls)
inline

Definition at line 183 of file nullableset.hh.

template<typename LabelSet>
vcsn::nullableset< LabelSet >::nullableset ( const std::shared_ptr< const labelset_t > &  ls)
inline

Definition at line 187 of file nullableset.hh.

Member Function Documentation

template<typename LabelSet>
value_t vcsn::nullableset< LabelSet >::conv ( self_type  ,
value_t  v 
) const
inline

Definition at line 259 of file nullableset.hh.

Referenced by vcsn::nullableset< LabelSet >::conv().

template<typename LabelSet>
value_t vcsn::nullableset< LabelSet >::conv ( oneset  ,
typename oneset::value_t   
) const
inline

Definition at line 265 of file nullableset.hh.

References vcsn::nullableset< LabelSet >::one().

Here is the call graph for this function:

template<typename LabelSet>
template<typename LabelSet_ >
value_t vcsn::nullableset< LabelSet >::conv ( const LabelSet_ &  ls,
typename LabelSet_::value_t  v 
) const
inline

Conversion from another type: first by the wrapped labelset, and then by our wrappers (in case the wrapped labelset does not support "one").

Definition at line 275 of file nullableset.hh.

References vcsn::nullableset< LabelSet >::conv(), vcsn::nullableset< LabelSet >::labelset(), and vcsn::nullableset< LabelSet >::value().

Here is the call graph for this function:

template<typename LabelSet>
value_t vcsn::nullableset< LabelSet >::conv ( std::istream &  i) const
inline

Definition at line 345 of file nullableset.hh.

References vcsn::nullableset< LabelSet >::ls_, vcsn::nullableset< LabelSet >::one(), vcsn::require(), vcsn::str_escape(), and vcsn::nullableset< LabelSet >::value().

Here is the call graph for this function:

template<typename LabelSet>
std::set<value_t> vcsn::nullableset< LabelSet >::convs ( std::istream &  i) const
inline

Definition at line 362 of file nullableset.hh.

References vcsn::nullableset< LabelSet >::ls_, and vcsn::nullableset< LabelSet >::value().

Here is the call graph for this function:

template<typename LabelSet>
static bool vcsn::nullableset< LabelSet >::equals ( const value_t l,
const value_t r 
)
inlinestatic

Whether l == r.

Definition at line 300 of file nullableset.hh.

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

Here is the call graph for this function:

template<typename LabelSet>
static labelset_t::value_t vcsn::nullableset< LabelSet >::get_value ( const value_t v)
inlinestatic
template<typename LabelSet>
static constexpr bool vcsn::nullableset< LabelSet >::has_one ( )
inlinestatic

Definition at line 216 of file nullableset.hh.

template<typename LabelSet>
static size_t vcsn::nullableset< LabelSet >::hash ( const value_t v)
inlinestatic

Definition at line 336 of file nullableset.hh.

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

Here is the call graph for this function:

template<typename LabelSet>
static constexpr bool vcsn::nullableset< LabelSet >::is_free ( )
inlinestatic

Definition at line 233 of file nullableset.hh.

template<typename LabelSet>
bool vcsn::nullableset< LabelSet >::is_letter ( const value_t v) const
inline

Definition at line 401 of file nullableset.hh.

References vcsn::nullableset< LabelSet >::get_value(), and vcsn::nullableset< LabelSet >::labelset().

Here is the call graph for this function:

template<typename LabelSet>
static constexpr bool vcsn::nullableset< LabelSet >::is_letterized ( )
inlinestatic

Definition at line 228 of file nullableset.hh.

template<typename LabelSet>
static ATTRIBUTE_PURE bool vcsn::nullableset< LabelSet >::is_one ( value_t  l)
inlinestatic

Definition at line 247 of file nullableset.hh.

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

Referenced by vcsn::nullableset< LabelSet >::equals(), vcsn::nullableset< LabelSet >::is_special(), vcsn::nullableset< LabelSet >::is_valid(), vcsn::nullableset< LabelSet >::less_than(), vcsn::nullableset< LabelSet >::size(), and vcsn::nullableset< LabelSet >::transpose().

Here is the call graph for this function:

template<typename LabelSet>
static constexpr bool vcsn::nullableset< LabelSet >::is_ratexpset ( )
inlinestatic

Definition at line 222 of file nullableset.hh.

template<typename LabelSet>
static bool vcsn::nullableset< LabelSet >::is_special ( const value_t v)
inlinestatic

Definition at line 325 of file nullableset.hh.

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

Here is the call graph for this function:

template<typename LabelSet>
bool vcsn::nullableset< LabelSet >::is_valid ( value_t  v) const
inline

Definition at line 253 of file nullableset.hh.

References vcsn::nullableset< LabelSet >::get_value(), vcsn::nullableset< LabelSet >::is_one(), and vcsn::nullableset< LabelSet >::labelset().

Here is the call graph for this function:

template<typename LabelSet>
bool vcsn::nullableset< LabelSet >::is_zero ( const value_t v) const
inline

Definition at line 395 of file nullableset.hh.

References vcsn::nullableset< LabelSet >::get_value(), and vcsn::nullableset< LabelSet >::labelset().

Here is the call graph for this function:

template<typename LabelSet>
static bool vcsn::nullableset< LabelSet >::less_than ( const value_t l,
const value_t r 
)
inlinestatic

Whether l < r.

Definition at line 308 of file nullableset.hh.

References vcsn::nullableset< LabelSet >::get_value(), vcsn::nullableset< LabelSet >::is_one(), and vcsn::less_than().

Here is the call graph for this function:

template<typename LabelSet>
static nullableset vcsn::nullableset< LabelSet >::make ( std::istream &  i)
inlinestatic

Build from the description in is.

Definition at line 202 of file nullableset.hh.

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

Here is the call graph for this function:

template<typename LabelSet>
static void vcsn::nullableset< LabelSet >::make_nullableset_kind ( std::istream &  is)
inlinestatic

Definition at line 383 of file nullableset.hh.

References vcsn::eat().

Referenced by vcsn::detail::nullable_helper< LabelSet >::make(), and vcsn::detail::nullable_helper< letterset< GenSet > >::make().

Here is the call graph for this function:

template<typename LabelSet>
static ATTRIBUTE_PURE constexpr value_t vcsn::nullableset< LabelSet >::one ( )
inlinestatic

Definition at line 240 of file nullableset.hh.

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

Referenced by vcsn::nullableset< LabelSet >::conv(), and vcsn::random_label().

Here is the call graph for this function:

template<typename LabelSet>
bool vcsn::nullableset< LabelSet >::open ( bool  o) const
inline

Whether unknown letters should be added, or rejected.

Parameters
owhether to accept unknown letters
Returns
the previous status.

Definition at line 210 of file nullableset.hh.

References vcsn::nullableset< LabelSet >::labelset().

Here is the call graph for this function:

template<typename LabelSet>
std::ostream& vcsn::nullableset< LabelSet >::print ( value_t  l,
std::ostream &  o,
symbol  format = symbol{"text"} 
) const
inline

Definition at line 372 of file nullableset.hh.

template<typename LabelSet>
std::ostream& vcsn::nullableset< LabelSet >::print_set ( std::ostream &  o,
symbol  format = symbol{"text"} 
) const
inline

Definition at line 415 of file nullableset.hh.

template<typename LabelSet>
size_t vcsn::nullableset< LabelSet >::size ( const value_t v) const
inline

Definition at line 330 of file nullableset.hh.

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

Here is the call graph for this function:

template<typename LabelSet>
static std::string vcsn::nullableset< LabelSet >::sname ( )
inlinestatic

Definition at line 191 of file nullableset.hh.

References vcsn::sname().

Here is the call graph for this function:

template<typename LabelSet>
static value_t vcsn::nullableset< LabelSet >::special ( )
inlinestatic

Definition at line 319 of file nullableset.hh.

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

Here is the call graph for this function:

template<typename LabelSet>
value_t vcsn::nullableset< LabelSet >::transpose ( const value_t l) const
inline

Definition at line 407 of file nullableset.hh.

References vcsn::nullableset< LabelSet >::get_value(), vcsn::nullableset< LabelSet >::is_one(), vcsn::nullableset< LabelSet >::ls_, and vcsn::nullableset< LabelSet >::value().

Here is the call graph for this function:

template<typename LabelSet>
template<typename... Args>
value_t vcsn::nullableset< LabelSet >::value ( Args &&...  args) const
inline

Definition at line 287 of file nullableset.hh.

References vcsn::nullableset< LabelSet >::ls_, and vcsn::detail::nullable_helper< LabelSet >::value().

Referenced by vcsn::nullableset< LabelSet >::conv(), vcsn::nullableset< LabelSet >::convs(), vcsn::random_label(), vcsn::nullableset< LabelSet >::transpose(), and vcsn::nullableset< LabelSet >::zero().

Here is the call graph for this function:

template<typename LabelSet>
std::string vcsn::nullableset< LabelSet >::vname ( bool  full = true) const
inline

Definition at line 196 of file nullableset.hh.

References vcsn::nullableset< LabelSet >::labelset().

Here is the call graph for this function:

template<typename LabelSet>
word_t vcsn::nullableset< LabelSet >::word ( const value_t l) const
inline

Definition at line 293 of file nullableset.hh.

References vcsn::nullableset< LabelSet >::get_value(), and vcsn::nullableset< LabelSet >::labelset().

Here is the call graph for this function:

template<typename LabelSet>
value_t vcsn::nullableset< LabelSet >::zero ( ) const
inline

Definition at line 389 of file nullableset.hh.

References vcsn::nullableset< LabelSet >::labelset(), and vcsn::nullableset< LabelSet >::value().

Here is the call graph for this function:

Member Data Documentation


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