#include <utilmm/types/bits/basic_symbol.hh>
Public Types | |
| typedef std::basic_string < CharT, Traits, Alloc > | str_type |
| equivalent string type | |
Public Member Functions | |
| basic_symbol (str_type const &str=str_type()) | |
| Constructor. | |
| basic_symbol (CharT const *str) | |
| Constructor. | |
| basic_symbol (basic_symbol const &other) | |
| Copy constructor. | |
| ~basic_symbol () | |
| Destructor. | |
| basic_symbol & | operator= (basic_symbol const &other) |
| Assignment operator. | |
| bool | empty () const |
| Check if empty. | |
| size_t | length () const |
| length of symbol | |
| bool | operator== (basic_symbol const &other) const |
| Equality test. | |
| bool | operator!= (basic_symbol const &other) const |
| Difference test. | |
| bool | operator< (basic_symbol const &other) const |
| Ordering operator. | |
| bool | operator> (basic_symbol const &other) const |
| Ordering operator. | |
| bool | operator<= (basic_symbol const &other) const |
| Ordering operator. | |
| bool | operator>= (basic_symbol const &other) const |
| Ordering operator. | |
| bool | starts_with (basic_symbol const &sub) const |
| Check for beginning. | |
| basic_symbol & | append (basic_symbol const &other) |
| Append function. | |
| basic_symbol & | operator+= (basic_symbol const &other) |
| Append operator. | |
| basic_symbol | operator+ (basic_symbol const &other) const |
| Append operation. | |
| str_type const & | str () const |
| Name of the symbol. | |
Friends | |
| struct | hash |
Related Functions | |
| (Note that these are not member functions.) | |
| template<class CharT, class Traits, class Alloc> | |
| std::ostream & | operator<< (std::ostream &out, basic_symbol< CharT, Traits, Alloc > const &s) |
| printing function | |
This class implements constant string named symbols based on utilmm::smart::uniq_pointer
| CharT | The char type for the string | |
| Traits | The character traits for CharT | |
| Alloc | allocator for the string |
| typedef std::basic_string<CharT, Traits, Alloc> utilmm::basic_symbol< CharT, Traits, Alloc >::str_type |
equivalent string type
| utilmm::basic_symbol< CharT, Traits, Alloc >::basic_symbol | ( | str_type const & | str = str_type() |
) | [inline] |
Constructor.
| str | name of the symbol |
| utilmm::basic_symbol< CharT, Traits, Alloc >::basic_symbol | ( | CharT const * | str | ) | [inline] |
Constructor.
| str | name of the symbol |
| utilmm::basic_symbol< CharT, Traits, Alloc >::basic_symbol | ( | basic_symbol< CharT, Traits, Alloc > const & | other | ) | [inline] |
Copy constructor.
| utilmm::basic_symbol< CharT, Traits, Alloc >::~basic_symbol | ( | ) | [inline] |
Destructor.
| basic_symbol& utilmm::basic_symbol< CharT, Traits, Alloc >::operator= | ( | basic_symbol< CharT, Traits, Alloc > const & | other | ) | [inline] |
Assignment operator.
| bool utilmm::basic_symbol< CharT, Traits, Alloc >::empty | ( | ) | const [inline] |
Check if empty.
This function test if this symbol is an empty one (ie it has no name)
| true | if symbol is empty | |
| false | else |
| size_t utilmm::basic_symbol< CharT, Traits, Alloc >::length | ( | ) | const [inline] |
length of symbol
| bool utilmm::basic_symbol< CharT, Traits, Alloc >::operator== | ( | basic_symbol< CharT, Traits, Alloc > const & | other | ) | const [inline] |
Equality test.
| other | a symbol |
| true | if current symbol has the same name as other | |
| false | else |
basic_symbol is based on utilmm::smart::uniq_pointer this test is made in constant time | bool utilmm::basic_symbol< CharT, Traits, Alloc >::operator!= | ( | basic_symbol< CharT, Traits, Alloc > const & | other | ) | const [inline] |
Difference test.
| other | a symbol |
!operator==(other) | bool utilmm::basic_symbol< CharT, Traits, Alloc >::operator< | ( | basic_symbol< CharT, Traits, Alloc > const & | other | ) | const |
Ordering operator.
| bool utilmm::basic_symbol< CharT, Traits, Alloc >::operator> | ( | basic_symbol< CharT, Traits, Alloc > const & | other | ) | const [inline] |
Ordering operator.
| bool utilmm::basic_symbol< CharT, Traits, Alloc >::operator<= | ( | basic_symbol< CharT, Traits, Alloc > const & | other | ) | const [inline] |
Ordering operator.
| bool utilmm::basic_symbol< CharT, Traits, Alloc >::operator>= | ( | basic_symbol< CharT, Traits, Alloc > const & | other | ) | const [inline] |
Ordering operator.
| bool utilmm::basic_symbol< CharT, Traits, Alloc >::starts_with | ( | basic_symbol< CharT, Traits, Alloc > const & | sub | ) | const |
Check for beginning.
| sub | a symbol |
| true | if the name of current insatnce starts with the name of sub | |
| false | else |
| basic_symbol& utilmm::basic_symbol< CharT, Traits, Alloc >::append | ( | basic_symbol< CharT, Traits, Alloc > const & | other | ) |
Append function.
| other | A symbol |
operator+(basic_symbol const&)
| basic_symbol& utilmm::basic_symbol< CharT, Traits, Alloc >::operator+= | ( | basic_symbol< CharT, Traits, Alloc > const & | other | ) | [inline] |
Append operator.
This is an alias for append
| basic_symbol utilmm::basic_symbol< CharT, Traits, Alloc >::operator+ | ( | basic_symbol< CharT, Traits, Alloc > const & | other | ) | const |
Append operation.
| other | a symbol |
| str_type const& utilmm::basic_symbol< CharT, Traits, Alloc >::str | ( | ) | const [inline] |
Name of the symbol.
| utilmm::smart::null_access | The name of the symbol is empty |
friend struct hash [friend] |
| std::ostream & operator<< | ( | std::ostream & | out, | |
| basic_symbol< CharT, Traits, Alloc > const & | s | |||
| ) | [related] |
printing function
| out | An output stream | |
| s | A symbol |
1.5.3