![]() |
nomlib
|
Run-time type information (RTTI) container class. More...
#include <ObjectTypeInfo.hpp>
Public Types | |
| typedef ObjectTypeInfo | self_type |
| typedef std::type_index | value_type |
Public Member Functions | |
| ObjectTypeInfo (void) | |
| Default constructor; initializes the object's type info as itself (this should be regarded as an invalid object state). | |
| ~ObjectTypeInfo (void) | |
| Destructor. | |
| ObjectTypeInfo (const self_type ©) | |
| Copy constructor. | |
| self_type & | operator= (const self_type &other) |
| Copy assignment operator. | |
| ObjectTypeInfo (const value_type &object) | |
| Constructor for a complete object initialization. | |
| const std::string | name (void) const |
| Get the object type's name. | |
| size_t | hash_code (void) const |
| Get the object's type hash code. | |
| void | set_type (const ObjectTypeInfo::value_type &object) |
| Setter for the object's type. | |
| bool | operator== (const self_type &rhs) const |
| Equality comparison operator. | |
| bool | operator!= (const self_type &rhs) const |
| In-equality comparison operator. | |
Private Member Functions | |
| const value_type & | type (void) const |
| Getter for the internal container type used. | |
Private Attributes | |
| value_type | type_ |
| Type information container. | |
Run-time type information (RTTI) container class.
This utility class implementation is done primarily to help encapsulate implementation details that are subject to availability – not all platforms support RTTI (typeid, std::type_index), nor are the supported platforms implemented the same (i.e.: name strings).
See also: nom::IObject.
References (class design & ideas):
http://stackoverflow.com/questions/5330835/why-is-stdtype-info-noncopyable-am-i-allowed-to-store-it-somewhere http://docs.wxwidgets.org/trunk/classwx_class_info.html
Definition at line 40 of file ObjectTypeInfo.hpp.
| typedef ObjectTypeInfo nom::ObjectTypeInfo::self_type |
Definition at line 43 of file ObjectTypeInfo.hpp.
| typedef std::type_index nom::ObjectTypeInfo::value_type |
Definition at line 44 of file ObjectTypeInfo.hpp.
| nom::ObjectTypeInfo::ObjectTypeInfo | ( | const value_type & | object | ) |
Constructor for a complete object initialization.
| std::type_info | object; pass through the typeid method. |
| size_t nom::ObjectTypeInfo::hash_code | ( | void | ) | const |
Get the object's type hash code.
| const std::string nom::ObjectTypeInfo::name | ( | void | ) | const |
Get the object type's name.
| bool nom::ObjectTypeInfo::operator== | ( | const self_type & | rhs | ) | const |
Equality comparison operator.
|
private |
Type information container.
Definition at line 104 of file ObjectTypeInfo.hpp.