TypeInfo_Class

Runtime type information about a class. Can be retrieved from an object instance by using the .classinfo property.

class TypeInfo_Class : TypeInfo {
byte[] m_init;
string name;
void*[] vtbl;
Interface[] interfaces;
TypeInfo_Class base;
void* destructor;
void function(Object) classInvariant;
ClassFlags m_flags;
void* deallocator;
OffsetTypeInfo[] m_offTi;
void function(Object) defaultConstructor;
immutable(void)* m_RTInfo;
}

Members

Functions

create
Object create()

Create instance of Object represented by 'this'.

Static functions

find
const(TypeInfo_Class) find(const scope char[] classname)

Search all modules for TypeInfo_Class corresponding to classname.

Inherited Members

From TypeInfo

getHash
size_t getHash(scope const void* p)

Computes a hash of the instance of a type.

equals
bool equals(in void* p1, in void* p2)

Compares two instances for equality.

compare
int compare(in void* p1, in void* p2)

Compares two instances for <, ==, or >.

tsize
size_t tsize()

Returns size of the type.

swap
void swap(void* p1, void* p2)

Swaps two instances of the type.

next
inout(TypeInfo) next()

Get TypeInfo for 'next' type, as defined by what kind of type this is, null if none.

initializer
const(void)[] initializer()

Return default initializer. If the type should be initialized to all zeros, an array with a null ptr and a length equal to the type size will be returned. For static arrays, this returns the default initializer for a single element of the array, use tsize to get the correct size.

flags
uint flags()

Get flags for type: 1 means GC should scan for pointers, 2 means arg of this type is passed in XMM register

offTi
const(OffsetTypeInfo)[] offTi()

Get type information on the contents of the type; null if not available

destroy
void destroy(void* p)

Run the destructor on the object and all its sub-objects

postblit
void postblit(void* p)

Run the postblit on the object and all its sub-objects

talign
size_t talign()

Return alignment of type

argTypes
int argTypes(out TypeInfo arg1, out TypeInfo arg2)

Return internal info on arguments fitting into 8byte. See X86-64 ABI 3.2.3

rtInfo
immutable(void)* rtInfo()

Return info used by the garbage collector to do precise collection.

Suggestion Box / Bug Report