Xrtti::Field Class Reference

#include <Xrtti.h>

Inheritance diagram for Xrtti::Field:

Xrtti::Member

List of all members.

Public Member Functions

virtual ~Field ()
bool operator== (const Field &other) const
bool operator!= (const Field &other) const
virtual const TypeGetType () const =0
virtual u32 GetBitfieldBitCount () const =0
virtual bool HasOffset () const =0
virtual u32 GetOffset () const =0
virtual bool IsAccessible () const =0
virtual void * Get (void *pInstance) const =0


Detailed Description

************************************************************************** Field represents a C++ field (i.e. member variable).

Constructor & Destructor Documentation

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


Member Function Documentation

bool Xrtti::Field::operator== ( const Field 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::Field::operator!= ( const Field 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 const Type& Xrtti::Field::GetType (  )  const [pure virtual]

Returns the type of the Field.

Returns:
the type of the Field.

virtual u32 Xrtti::Field::GetBitfieldBitCount (  )  const [pure virtual]

If the field was declared as a bitfield, then this will return the number of bits in the bitfield.

Returns:
the number of bits in the bitfield if the field was declared as a bitfield

virtual bool Xrtti::Field::HasOffset (  )  const [pure virtual]

Returns true if the offset of this field within its containing structure is available, and can be obtained by calling GetOffset().

Returns:
true if the offset of this field within its containing structure is available, and can be obtained by calling GetOffset().

virtual u32 Xrtti::Field::GetOffset (  )  const [pure virtual]

Returns the offset in bytes from the beginning of the containing Structure to this Field. This field's value is undefined for all static Fields, and for all bitfield Fields. NOTE that this method returns 0 for Fields of anonymous Structures.

Returns:
the offset in bytes from the beginning of the containing Structure to this Field, or 0 if the Field is a field of an anonymous Structure

virtual bool Xrtti::Field::IsAccessible (  )  const [pure virtual]

Returns true if this Field is "accessible", meaning that the Get method of this class may be called. If this method returns false, then the Get methods must NOT be called.

Returns:
true if this Field is "accessible", meaning that the Get method of this class may be called

virtual void* Xrtti::Field::Get ( void *  pInstance  )  const [pure virtual]

Returns a pointer to the Field within the given instance object. Returns NULL if the containing object is anonymous. The value of the field can then be obtained by casting this pointer to the appropriate C++ type and dereferencing the pointer. The value of the field can also be changed in this way.

Parameters:
pInstance is an object of the type of the context containing this field. NULL may be passed in if the field is static.
Returns:
a pointer to the field within the instance object. This pointer may be cast to a pointer of the type appropriate for this field and then dereferenced to get the value of the field or assigned to change the value of the field.


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