Xrtti::Type Class Reference

#include <Xrtti.h>

Inheritance diagram for Xrtti::Type:

Xrtti::TypeEnumeration Xrtti::TypeFunction Xrtti::TypeStructure

List of all members.

Public Types

enum  BaseType {
  BaseType_Void = 0, BaseType_Bool = 1, BaseType_Char = 2, BaseType_Unsigned_Char = 3,
  BaseType_WChar = 4, BaseType_Short = 5, BaseType_Unsigned_Short = 6, BaseType_Int = 7,
  BaseType_Unsigned_Int = 8, BaseType_Long = 9, BaseType_Unsigned_Long = 10, BaseType_Long_Long = 11,
  BaseType_Unsigned_Long_Long = 12, BaseType_Float = 13, BaseType_Double = 14, BaseType_Long_Double = 15,
  BaseType_Enumeration = 16, BaseType_Function = 17, BaseType_Structure = 18
}

Public Member Functions

virtual ~Type ()
bool operator== (const Type &other) const
bool operator!= (const Type &other) const
virtual BaseType GetBaseType () const =0
virtual bool IsConst () const =0
virtual bool IsVolatile () const =0
virtual bool IsReference () const =0
virtual u32 GetArrayOrPointerCount () const =0
virtual const ArrayOrPointerGetArrayOrPointer (u32 index) const =0


Detailed Description

************************************************************************** Type represents a C++ type. Each Type may have a number of Pointers, each of which describes the properties of one level of pointer indirection of the Type, and a number of Arrays, each of which describes the properties of one array dimension. For example, the C++ type:

const * volatile * int[5][];

... would have two Pointers (the first one volatile, the second const), and two Arrays (the first one with element count 5, the second with element count unbounded).


Member Enumeration Documentation

********************************************************************** These are the C++ types which may be represented by a Type object.

If the Type of this Type is BaseType_Enumeration, then this Type is actually a TypeEnumeration object.

If the Type of this Type is BaseType_Function, then this Type is actually a TypeFunction object.

If the Type of this Type is BaseType_Structure, then this Type is actually a TypeStructure object.

Otherwise, the Type object is not subclassed.


Constructor & Destructor Documentation

virtual Xrtti::Type::~Type (  )  [inline, virtual]


Member Function Documentation

bool Xrtti::Type::operator== ( const Type other  )  const

Equality operator - returns true if this object is "functionally equivalent" to [other]. The two objects don't have to be exactly identical, but do have to be identical in every meaningful way. Note also that this doesn't test for equality of any base class members; it is a test only at this level of the inheritence hierarcy. To test if an object is completely equals, including for all of its subclasses defined in the Xrtti hierarchy, you must cast this class to its most derived class and call that method.

Parameters:
other is the other object to compare against
Returns:
true if this object is functionally equal to the other, false if not

bool Xrtti::Type::operator!= ( const Type other  )  const [inline]

Inequality operator - returns false when the == operator would return true, and vice versa.

Parameters:
other is the other object to compare against
Returns:
false when the == operator would return true, and vice versa.

virtual BaseType Xrtti::Type::GetBaseType (  )  const [pure virtual]

Returns the C++ type of this Type.

Returns:
the C++ type of this Type.

virtual bool Xrtti::Type::IsConst (  )  const [pure virtual]

If this returns true, then the C++ type represented by this Type is const. If this returns false, then it is not.

Returns:
true if C++ type represented by this Type is const

virtual bool Xrtti::Type::IsVolatile (  )  const [pure virtual]

If this returns true, then the C++ type represented by this Type is volatile. If this returns false, then it is not.

Returns:
true if C++ type represented by this Type is volatile

virtual bool Xrtti::Type::IsReference (  )  const [pure virtual]

If this returns true, then the C++ type represented by this Type is a C++ reference. If this returns false, then it is not.

Returns:
true if C++ type represented by this Type is a C++ reference

virtual u32 Xrtti::Type::GetArrayOrPointerCount (  )  const [pure virtual]

This class has an ordered list of ArrayOrPointer objects each of which describes how the heck to explain this???

Returns:
the number of ArrayOrPointer objects for this Type.

virtual const ArrayOrPointer& Xrtti::Type::GetArrayOrPointer ( u32  index  )  const [pure virtual]

Returns the ArrayOrPointer object at the given index.

Parameters:
index is the index of the ArrayOrPointer object to return.
Returns:
the ArrayOrPointer object at the given index.


The documentation for this class was generated from the following file:

Generated on Sat Feb 14 22:48:49 2009 by  doxygen 1.5.7.1