Xrtti::Structure Class Reference

#include <Xrtti.h>

Inheritance diagram for Xrtti::Structure:

Xrtti::Context Xrtti::Struct Xrtti::Union Xrtti::Class List of all members.

Public Member Functions

AccessType GetAccessType () const
const std::type_info * GetTypeInfo () const
U32 GetBaseCount () const
const BaseGetBase (U32 index) const
U32 GetFieldCount () const
const FieldGetField (U32 index) const
bool IsAnonymous () const
U32 GetConstructorCount () const
const ConstructorGetConstructor (U32 index) const
bool HasDestructor () const
const DestructorGetDestructor () const
void * Create () const
void * CreateArray (U32 count) const
void Delete (void *pInstance) const
void DeleteArray (void **pInstanceArray) const

Friends

class Struct
class Union

Detailed Description

************************************************************************** Structure is the base class for Class, Struct, and Union. It defines the members that are shared by these three context types.


Member Function Documentation

AccessType Xrtti::Structure::GetAccessType  )  const [inline]
 

Returns the access type of the Struct within the context in which it is defined.

Returns:
the access type of the Struct within the context in which it is defined.

const std::type_info* Xrtti::Structure::GetTypeInfo  )  const [inline]
 

If the -r option was specified to the xrttigen program, then C++ RTTI type_info objects will be associated with each Structure. This method will then return the type_info object associated with the C++ class/struct/union described by this Structure.

If -r was not used with xrttigen, then C++ RTTI is not supported, and this method will return NULL.

Returns:
the C++ RTTI type_info object associated with the C++ class/ struct/union described by this Structure, or NULL if RTTI options were not enabled for xrttigen when it produced the Generated object resulting in this Structure.

U32 Xrtti::Structure::GetBaseCount  )  const [inline]
 

This is the number of base structures of this Structure. Base structures are, in essential, base classes, although they are not necessarily classes; they may be structs or unions as well. The Base class identifies both the base Structure, and the offset from this structure to the base class.

Returns:
the number of base structures of this Structure

const Base& Xrtti::Structure::GetBase U32  index  )  const
 

Returns a base structure of this Structure.

Parameters:
index is the number of the base Structure to return
Returns:
a base structure of this Structure.

U32 Xrtti::Structure::GetFieldCount  )  const [inline]
 

Returns the number of Fields in this Context.

Returns:
the number of Fields in this Context.

const Field& Xrtti::Structure::GetField U32  index  )  const
 

Returns a Field of this Context. These are in the same order as in defined in the C++ class described by this Context. The number of Fields in this Context is given by the return value of GetFieldCount().

Parameters:
index is the number of the Field to return
Returns:
a Field of this Context.

bool Xrtti::Structure::IsAnonymous  )  const [inline]
 

Returns true if the Structure is anonymous. Anonymous structures have no type name and thus cannot be instantiated. Therefore, the Constructors will not be invokeable; and the Create and CreateArray methods will return NULL.

Returns:
true if the Structure is anonymous; false if not.

U32 Xrtti::Structure::GetConstructorCount  )  const [inline]
 

This is the number of constructors of this Structure.

Returns:
the number of constructors of this Structure

const Constructor& Xrtti::Structure::GetConstructor U32  index  )  const
 

Returns a constructor of this Structure.

Parameters:
index is the number of the Constructor to return
Returns:
a constructor of this Structure.

bool Xrtti::Structure::HasDestructor  )  const [inline]
 

Returns true if this Structure has a destructor, false if not.

Returns:
true if this Structure has a destructor, false if not.

const Destructor& Xrtti::Structure::GetDestructor  )  const
 

Returns true if this Structure has a destructor.

Returns:
true if this Structure has a destructor.

void* Xrtti::Structure::Create  )  const [inline]
 

Returns a newly-constructed object of this Structure type; the default constructor is used. The returned object must be deleted using the Delete() method. If the Structure is abstract or anonymous, returns NULL.

Returns:
a newly-constructed object of this Structure type; the default constructor is used.

void* Xrtti::Structure::CreateArray U32  count  )  const [inline]
 

Returns a newly-constructed array of objects of this Structure type; the default array constructor is used. The returned array must be deleted using the DeleteArray() method. If the Structure is abstract, or anonymous, returns NULL.

Parameters:
count is the number of elements in the array to be created
Returns:
a newly-created array of objects of this Structure type; the default constructor is used.

void Xrtti::Structure::Delete void *  pInstance  )  const [inline]
 

Deletes an object created by the Create() method.

Parameters:
pInstance is the object to be deleted.

void Xrtti::Structure::DeleteArray void **  pInstanceArray  )  const [inline]
 

Deletes an array of objects created by the CreateArray() method.

Parameters:
pInstanceArray is the array of objects to be deleted.


The documentation for this class was generated from the following file:
Generated on Sun Apr 29 22:26:04 2007 by  doxygen 1.4.6