OpenSceneGraph 2.8.3
|
This class is a wrapper for std::type_info that also records whether a type is a reference or const reference. More...
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. |
This class is a wrapper for std::type_info that also records whether a type is a reference or const reference.
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] |
const std::type_info& osgIntrospection::ExtendedTypeInfo::getStdTypeInfo | ( | ) | const [inline] |
Gets the std::type_info object for this type.
Referenced by osgIntrospection::Type::getStdTypeInfo().
bool osgIntrospection::ExtendedTypeInfo::isConstReference | ( | ) | const [inline] |
Returns true if this type is a const reference.
bool osgIntrospection::ExtendedTypeInfo::isReference | ( | ) | const [inline] |
Returns true if this type is a reference or const reference.
std::string osgIntrospection::ExtendedTypeInfo::name | ( | ) | const [inline] |
Returns the name of this type, based on the std::type_info name.
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.
![]() | Generated at Tue Mar 22 2011 13:20:26 for the OpenSceneGraph by doxygen 1.7.3. |