Public Member Functions | |
ExtendedTypeInfo (const std::type_info &ti, bool isReference, bool isConstReference) | |
bool | operator< (const ExtendedTypeInfo &other) const |
Orders ExtendedTypeInfo based first on std::type_info, then on reference, then on const reference. | |
bool | operator== (const ExtendedTypeInfo &other) const |
Returns true if *this and other are the same type. | |
const std::type_info & | getStdTypeInfo () const |
Gets the std::type_info object for this type. | |
bool | isReference () const |
Returns true if this type is a reference or const reference. | |
bool | isConstReference () const |
Returns true if this type is a const reference. | |
std::string | name () const |
Returns the name of this type, based on the std::type_info name. |
It permits osgIntrospection to make use of reference information that is ignored by typeid(), and to generate reference types based on it. The ExtendedTypeInfo for a class can be produced via the extended_typeid() functions, analogous to typeid().
osgIntrospection::ExtendedTypeInfo::ExtendedTypeInfo | ( | const std::type_info & | ti, | |
bool | isReference, | |||
bool | isConstReference | |||
) | [inline] |
bool osgIntrospection::ExtendedTypeInfo::operator< | ( | const ExtendedTypeInfo & | other | ) | const [inline] |
Orders ExtendedTypeInfo based first on std::type_info, then on reference, then on const reference.
Note that we can't rely on default pointer comparison for std::type_info because it is not guaranteed that &typeid(T) always returns the same pointer for a given T (thanks Andrew Koenig).
bool osgIntrospection::ExtendedTypeInfo::operator== | ( | const ExtendedTypeInfo & | other | ) | const [inline] |
Returns true if *this and other are the same type.
const std::type_info& osgIntrospection::ExtendedTypeInfo::getStdTypeInfo | ( | ) | const [inline] |
Gets the std::type_info object for this type.
bool osgIntrospection::ExtendedTypeInfo::isReference | ( | ) | const [inline] |
Returns true if this type is a reference or const reference.
bool osgIntrospection::ExtendedTypeInfo::isConstReference | ( | ) | const [inline] |
Returns true if this type is a const reference.
std::string osgIntrospection::ExtendedTypeInfo::name | ( | ) | const [inline] |
Returns the name of this type, based on the std::type_info name.