#include <Xrtti.h>
Inheritance diagram for Xrtti::Structure:
Public Member Functions | |
virtual | ~Structure () |
bool | operator== (const Structure &other) const |
bool | operator!= (const Structure &other) const |
virtual bool | IsIncomplete () const =0 |
virtual bool | HasStructureName () const =0 |
virtual AccessType | GetAccessType () const =0 |
virtual const std::type_info * | GetTypeInfo () const =0 |
virtual U32 | GetBaseCount () const =0 |
virtual const Base & | GetBase (U32 index) const =0 |
virtual U32 | GetFriendCount () const =0 |
virtual const Structure & | GetFriend (U32 index) const =0 |
virtual U32 | GetFieldCount () const =0 |
virtual const Field & | GetField (U32 index) const =0 |
virtual bool | IsAnonymous () const =0 |
virtual U32 | GetConstructorCount () const =0 |
virtual const Constructor & | GetConstructor (U32 index) const =0 |
virtual bool | HasDestructor () const =0 |
virtual const Destructor & | GetDestructor () const =0 |
virtual bool | IsCreatable () const =0 |
virtual void * | Create () const =0 |
virtual void * | CreateArray (U32 count) const =0 |
virtual bool | IsDeletable () const =0 |
virtual void | Delete (void *pInstance) const =0 |
virtual void | DeleteArray (void *pInstanceArray) const =0 |
|
|
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.
|
|
Inequality operator - returns false when the == operator would return true, and vice versa.
|
|
If the Structure is Incomplete, its definition is not present in the Xrtti system. None of the remaining methods of the class will return anything meaningful; only the methods of Context will return any valid information.
|
|
Each Structure type (class, struct, union) can be defined in three possible ways in C++, as illustrated by this example: struct a { }; typedef struct b { } b; typedef struct { } c; (a) and (b) are essentially equivalent in C++; for (a), an implicit typedef of "a" to "struct a" will be in effect, *unless* there is another symbol defined as "a" (for example, a function name). (c) is different in that there is no "struct c" construct, there is only a typedef of "c" defining an unnamed structured type. In Xrtti, a Structure object will be created for all of (a), (b), and (c), and they will be indistinguishable, except that HasStructureName() will return true for (a) and (b), and false for (c). If HasStructureName returns true, then it is safe (and sometimes necessary) to refer to the structure as "struct a" (or "class a" or "union a" depending on the actual type of the Structure). If HasStructureName returns false, then the Structure can only be referred to by name, never by "struct a", "class b", or "union c".
|
|
Returns the access type of the Struct within the context in which it is defined.
|
|
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.
|
|
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 a base structure of this Structure.
|
|
Returns the number of friends of this Structure.
|
|
Returns a Structure which was declared to be a friend of this Structure.
|
|
Returns the number of Fields in this Context.
|
|
Returns a Field of this Structure. These are in the same order as in defined in the C++ class described by this Structure. The number of Fields in this Structure is given by the return value of GetFieldCount().
|
|
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.
|
|
This is the number of constructors of this Structure.
|
|
Returns a constructor of this Structure.
|
|
Returns true if this Structure has a destructor, false if not.
|
|
Returns the destructor of this Structure, if one exists; this method should only by called if HasDestructor returns true.
|
|
Returns true if the Structure can be created. Only if this method returns true may the Create() method or CreateArray() methods be called.
|
|
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 not creatable, this method must not be called.
|
|
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 not creatable, this method must not be called.
|
|
Returns true if the Structure can be deleted. Only if this method returns true may the Delete() method or DeleteArray() methods be called.
|
|
Deletes an object created by the Create() method.
|
|
Deletes an array of objects created by the CreateArray() method.
|