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_Bitfield = 16, BaseType_Enumeration = 17, BaseType_Function = 18, BaseType_Structure = 19
}

Public Member Functions

BaseType GetBaseType () const
bool IsConst () const
bool IsVolatile () const
bool IsReference () const
U32 GetBitfieldBitCount () const
U32 GetPointerCount () const
const PointerGetPointer (U32 depth) const
U32 GetArrayCount () const
const ArrayGetArray (U32 dimension) const

Friends

class TypeEnumeration
class TypeFunction
class TypeStructure

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

enum Xrtti::Type::BaseType
 

********************************************************************** 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.


Member Function Documentation

BaseType Xrtti::Type::GetBaseType  )  const [inline]
 

Returns the C++ type of this Type.

Returns:
the C++ type of this Type.

bool Xrtti::Type::IsConst  )  const [inline]
 

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

bool Xrtti::Type::IsVolatile  )  const [inline]
 

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

bool Xrtti::Type::IsReference  )  const [inline]
 

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

U32 Xrtti::Type::GetBitfieldBitCount  )  const [inline]
 

If the type is Type_Bitfield, then this will return the number of bits in the bitfield.

Returns:
the number of bits in the bitfield if the type is Type_Bitfield

U32 Xrtti::Type::GetPointerCount  )  const [inline]
 

Returns the pointer "depth" of this Type, which is the number of times that this type must be dereferenced to get to a value of the basic C++ type of this Type.

Returns:
the pointer "depth" of this Type

const Pointer& Xrtti::Type::GetPointer U32  depth  )  const
 

Returns a description of the dereference characteristics of the given pointer depth for this Type.

Parameters:
depth is the pointer depth to get the dereference characteristics of
Returns:
a description of the dereference characteristics of the given pointer depth for this Type.

U32 Xrtti::Type::GetArrayCount  )  const [inline]
 

Returns the number of array dimensions of this Type.

Returns:
the number of array dimensions of this Type.

const Array& Xrtti::Type::GetArray U32  dimension  )  const
 

Returns a description of the number of elements of the given array dimension of this Type.

Parameters:
dimension is the array dimension of this Type to get the number of elements of
Returns:
the number of elements of the given array dimension of this Type


The documentation for this class was generated from the following file:
Generated on Fri May 4 11:55:14 2007 by  doxygen 1.4.6