ModErn Text Analysis
META Enumerates Textual Applications
|
CRTP base template that denotes an identifier. More...
#include <identifiers.h>
Public Member Functions | |
identifier (const T &t) | |
identifiers must be explicitly constructed from their base type—they cannot be implicitly converted from them! More... | |
identifier ()=default | |
identifier has a default constructor. | |
identifier (const identifier &)=default | |
identifiers may be copy constructed. | |
identifier (identifier &&)=default | |
identifiers may be move constructed. | |
identifier & | operator= (const identifier &)=default |
identifiers may be copy assigned. | |
identifier & | operator= (identifier &&)=default |
identifiers may be move assigned. | |
identifier & | operator= (const T &t) |
identifiers may be assigned into from their base type, provided they have already been constructed. More... | |
operator const T & () const | |
identifiers may be converted into their base type. More... | |
operator T & () | |
identifiers may be converted into their base type. More... | |
Public Attributes | |
T | id_ |
The underlying id for the identifier. | |
Friends | |
bool | operator< (const identifier &lhs, const identifier &rhs) |
identifiers are comparable by their base types. More... | |
std::ostream & | operator<< (std::ostream &stream, const identifier &ident) |
identifiers may be printed to output streams. More... | |
std::istream & | operator>> (std::istream &stream, identifier &ident) |
identifiers may be read from input streams. More... | |
CRTP base template that denotes an identifier.
identifiers are comparable through normal relational operators defined on the underlying type T.
|
inlineexplicit |
identifiers must be explicitly constructed from their base type—they cannot be implicitly converted from them!
t | the underlying type to convert into an identifier |
|
inline |
identifiers may be assigned into from their base type, provided they have already been constructed.
Example:
t | The base type to assign into the identifier |
|
inline |
identifiers may be converted into their base type.
This is the const version.
|
inline |
identifiers may be converted into their base type.
This is the non-const version.
|
friend |
identifiers are comparable by their base types.
This allows for storage in comparison-based containers like std::map or std::set.
lhs | |
rhs |
|
friend |
identifiers may be printed to output streams.
stream | The stream to write to |
ident | The identifier to write to the stream |
stream
|
friend |
identifiers may be read from input streams.
stream | The stream to read from |
ident | The identifier to read into |
stream