osgIntrospection::ExtendedTypeInfo Class Reference

This class is a wrapper for std::type_info that also records whether a type is a reference or const reference. More...

List of all members.

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.


Detailed Description

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().


Constructor & Destructor Documentation

osgIntrospection::ExtendedTypeInfo::ExtendedTypeInfo ( const std::type_info &  ti,
bool  isReference,
bool  isConstReference 
) [inline]


Member Function Documentation

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.


The documentation for this class was generated from the following file:
Generated at Sun Oct 14 02:12:26 2007 for the OpenSceneGraph by doxygen 1.5.3.