#include <basic_identifier.hpp>
Public Member Functions | |
| basic_identifier & | operator= (const basic_identifier &)=default |
| Default copy assignment constructor. | |
| basic_identifier & | operator= (basic_identifier &&)=default |
| Default move assignment constructor. | |
| basic_identifier (const basic_identifier &)=default | |
| Default copy constructor. | |
| basic_identifier (basic_identifier &&)=default | |
| Default move constructor. | |
| bool | operator== (const basic_identifier &x) const |
| bool | operator!= (const basic_identifier &x) const |
| bool | operator< (const basic_identifier &x) const |
| virtual bool | less (const basic_identifier &x) const =0 |
| virtual bool | equal_to (const basic_identifier &x) const =0 |
| virtual void | serialize (const char *id, serializer &s)=0 |
| virtual size_t | hash () const =0 |
| virtual bool | is_same_type (const basic_identifier &x) const =0 |
| virtual basic_identifier * | clone () const =0 |
| virtual std::ostream & | print (std::ostream &out) const =0 |
| virtual bool | is_valid () const =0 |
| bool | as_value () const |
| void | as_value (bool asvalue) |
Protected Member Functions | |
| virtual const std::type_index & | type_index () const =0 |
Friends | |
| class | basic_identifier_serializer |
| template<typename T , class Enable > | |
| class | identifier |
| OOS_UTILS_API std::ostream & | operator<< (std::ostream &os, const basic_identifier &x) |
This is the base class for any identifier class It supports interfaces for comparing, sharing and cloning It also implements the output operator to streams and a generic method to retrieve the value of the concrete identifier.
| bool matador::basic_identifier::as_value | ( | ) | const |
Returns true if identifier should be treated as plain value (default)
| void matador::basic_identifier::as_value | ( | bool | asvalue | ) |
Sets flag indicating that identifier id treated as plain value (default)
| asvalue | True if identifier should be treated as plain value. |
|
pure virtual |
Clone this identifier
|
pure virtual |
Interface for the equal to operator
| x | The identifier to compare to |
|
pure virtual |
Returns a unique hash number
|
pure virtual |
Returns true if the given identifier is of the same type as this identifier
| x | Identifier to compare the type with |
|
pure virtual |
Returns true if the identifier has a valid value.
|
pure virtual |
Interface for the less than operator
| x | The identifier to compare to |
| bool matador::basic_identifier::operator!= | ( | const basic_identifier & | x | ) | const |
Checks if two identifiers are not equal
| x | The identifier to compare with |
| bool matador::basic_identifier::operator< | ( | const basic_identifier & | x | ) | const |
Checks if this identifier is less than another identifier.
| x | The identifier to compare with |
|
default |
Default move assignment constructor.
|
default |
Default copy assignment constructor.
| bool matador::basic_identifier::operator== | ( | const basic_identifier & | x | ) | const |
Checks if two identifiers are equal
| x | The identifier to compare with |
|
pure virtual |
Prints the identifier to the given stream.
| out | The stream to write to |
|
pure virtual |
Serializes the underlying identifier value
| id | The id of the identifier value |
| s | The serializer to be used |
|
protectedpure virtual |
The returns the type_index of a specific type
|
friend |
Writes the given identifier to the given ostream.
| os | The ostream to write to. |
| x | The identifier to write. |