4 #ifndef UTILMM_TYPES_BASIC_SYMBOL_HEADER 5 # define UTILMM_TYPES_BASIC_SYMBOL_HEADER 25 template<
class CharT,
class Traits,
class Alloc>
29 typedef std::basic_string<CharT, Traits, Alloc>
str_type;
50 :name(create(str_type(str))) {}
79 return size_t(
empty()?0:name->size());
93 return name==other.name;
109 return other.operator< (*this);
168 str_type
const &
str()
const {
175 static ref_type create(str_type
const &
str);
177 template<
typename Ty>
181 template<
class CharT,
class Traits,
class Alloc>
183 :
public std::unary_function< basic_symbol<CharT, Traits, Alloc>,
190 # define IN_UTILMM_TYPES_BASIC_SYMBOL_HEADER 191 #include "utilmm/types/bits/basic_symbol.tcc" 192 # undef IN_UTILMM_TYPES_BASIC_SYMBOL_HEADER 193 #endif // UTILMM_TYPES_BASIC_SYMBOL_HEADER basic_symbol operator+(basic_symbol const &other) const
Append operation.
bool operator>(basic_symbol const &other) const
Ordering operator.
Definition: basic_symbol.hh:108
bool operator==(basic_symbol const &other) const
Equality test.
Definition: basic_symbol.hh:92
hash functor
Definition: hash.hh:30
basic_symbol & operator=(basic_symbol const &other)
Assignment operator.
Definition: basic_symbol.hh:59
size_t length() const
length of symbol
Definition: basic_symbol.hh:78
basic_symbol & operator+=(basic_symbol const &other)
Append operator.
Definition: basic_symbol.hh:147
~basic_symbol()
Destructor.
Definition: basic_symbol.hh:56
Definition of a reference counting smart pointer.
std::basic_string< CharT, Traits, Alloc > str_type
equivalent string type
Definition: basic_symbol.hh:29
bool operator!=(basic_symbol const &other) const
Difference test.
Definition: basic_symbol.hh:101
Generic smart pointer.
Definition: pointer.hh:52
Generic string using unique instance memory.
Definition: basic_symbol.hh:26
bool null() const
Check if null.
bool starts_with(basic_symbol const &sub) const
Check for beginning.
bool empty() const
Check if empty.
Definition: basic_symbol.hh:71
Definition: auto_flag.hh:6
bool operator<(basic_symbol const &other) const
Ordering operator.
basic_symbol(CharT const *str)
Constructor.
Definition: basic_symbol.hh:49
basic_symbol & append(basic_symbol const &other)
Append function.
bool operator<=(basic_symbol const &other) const
Ordering operator.
Definition: basic_symbol.hh:112
bool operator>=(basic_symbol const &other) const
Ordering operator.
Definition: basic_symbol.hh:116
Forward declaration of utilmm::basic_symbol.
basic_symbol(str_type const &str=str_type())
Constructor.
Definition: basic_symbol.hh:41
str_type const & str() const
Name of the symbol.
Definition: basic_symbol.hh:168
definition of the basic hashing functor
basic_symbol(basic_symbol const &other)
Copy constructor.
Definition: basic_symbol.hh:52