module defining Object, the root class of all D objects, interfaces, ClassInfo and TypeInfo
it is implicitly included by the compiler in all D files
- alias typeof(int.sizeof) size_t ¶#
-
unsigned integer type of the size of a pointer
- alias typeof(cast(void*)0 - cast(void*)0) ptrdiff_t ¶#
-
signed integer type of the size of a pointer
- alias size_t hash_t ¶#
-
type of hashes used in associative arrays
- alias int equals_t ¶#
-
type returned by equality comparisons
- class Object ¶#
-
root class for all objects in D
- char[] toString() ¶#
-
returns a string representation of the object (for debugging purposes)
- hash_t toHash() ¶#
-
returns a hash
- int opCmp(Object o) ¶#
-
compares two objects, returns a number ret, such (a op b) is rewritten as (a.opCmp(b) op 0)
thus if a>b a.opCmp(b)>0
- equals_t opEquals(Object o) ¶#
-
returns 0 if this==o
- struct Interface ¶#
-
interface, if COM objects (IUnknown) they might not be casted to Object
- ClassInfo classinfo ¶#
-
class info of the interface
- ptrdiff_t offset ¶#
-
offset to Interface 'this' from Object 'this'
- class ClassInfo : Object ¶#
-
class information
- char[] name ¶#
-
class name
- Interface[] interfaces ¶#
-
implemented interfaces
- ClassInfo base ¶#
-
base class
- void* destructor ¶#
-
compiler dependent storage of destructor function pointer
- void* classInvariant ¶#
-
compiler dependent storage of classInvariant function pointer
- uint flags ¶#
-
flags
1: IUnknown
2: has no possible pointers into GC memory
4: has offTi[] member
8: has constructors
- OffsetTypeInfo[] offTi ¶#
-
offsets of its members (not supported by all compilers)
- void* defaultConstructor ¶#
-
compiler dependent storage of constructor function pointer
- TypeInfo typeinfo ¶#
-
TypeInfo information about this class
- ClassInfo find(char[] classname) [static] ¶#
-
finds the classinfo of the class with the given name
- Object create() ¶#
-
creates an instance of this class (works only if there is a constructor without arguments)
- struct OffsetTypeInfo ¶#
-
offset of the different fields (at the moment works only with ldc)
- class TypeInfo ¶#
-
information on a type
- hash_t getHash(void * p) ¶#
-
returns the hash of the type of this TypeInfo at p
- equals_t equals(void * p1, void * p2) ¶#
-
returns 0 if the types of this TypeInfo stored at p1 and p2 are different
- int compare(void * p1, void * p2) ¶#
-
compares the types of this TypeInfo stored at p1 and p2
- size_t tsize() ¶#
-
returns the size of a type with the current TypeInfo
- void swap(void * p1, void * p2) ¶#
-
swaps the two types stored at p1 and p2
- TypeInfo next() ¶#
-
"next" TypeInfo (for an array its elements, for a pointer what it is pointed to,...)
- uint flags() ¶#
-
flags, 1: has possible pointers into GC memory
- OffsetTypeInfo[] offTi() ¶#
-
offsets of the various elements
- class ModuleInfo ¶#
-
information about a module (can be used for example to get its unittests)
- char[] name ¶#
-
name of the module
- ModuleInfo[] importedModules ¶#
- ClassInfo[] localClasses ¶#
- void function() unitTest ¶#
-
unit tests of the module
- int opApply(int delegate( ref ModuleInfo )) [static] ¶#
-
loops on all the modules loaded
- class Exception : Object ¶#
-
base class for all exceptions/errors
it is a good practice to pass line and file to the exception, which can be obtained with
__FILE__ and __LINE__, and then passed to the exception constructor
- struct FrameInfo ¶#
-
Information about a frame in the stack
- long line ¶#
-
line number in the source of the most likely start adress (0 if not available)
- ptrdiff_t iframe ¶#
-
number of the stack frame (starting at 0 for the top frame)
- ptrdiff_t offsetSymb ¶#
-
offset from baseSymb: within the function, or from the closest symbol
- size_t baseSymb ¶#
-
adress of the symbol in this execution
- ptrdiff_t offsetImg ¶#
-
offset within the image (from this you can use better methods to get line number
a posteriory)
- size_t baseImg ¶#
-
base adress of the image (will be dependent on randomization schemes)
- size_t address ¶#
-
adress of the function, or at which the ipc will return
(which most likely is the one after the adress where it started)
this is the raw adress returned by the backtracing function
- char[] file ¶#
-
file (image) of the current adress
- char[] func ¶#
-
name of the function, if possible demangled
- char[] extra ¶#
-
extra information (for example calling arguments)
- bool exactAddress ¶#
-
if the address is exact or it is the return address
- bool internalFunction ¶#
-
if this function is an internal functions (for example the backtracing function itself)
if true by default the frame is not printed
- FramePrintHandler defaultFramePrintingFunction [static] ¶#
-
the default printing function
- void writeOut(void delegate(char[]) sink) ¶#
-
writes out the current frame info
- void clear() ¶#
-
clears the frame information stored
- interface TraceInfo ¶#
-
trace information has the following interface
- char[] msg ¶#
-
message of the exception
- char[] file ¶#
-
file name
- size_t line ¶#
-
line number
- TraceInfo info ¶#
-
trace of where the exception was raised
- Exception next ¶#
-
next exception (if an exception made an other exception raise)
- this(char[] msg, char[] file, long line, Exception next, TraceInfo info) ¶#
-
designated constructor (breakpoint this if you want to catch all explict Exception creations,
special exception just allocate and init the structure directly)
- char[] toString() ¶#
-
returns the message of the exception, should not be used (because it should not allocate,
and thus only a small message is returned)
- void writeOutMsg(void delegate(char[]) sink) ¶#
-
writes out the message of the exception, by default writes toString
override this is you have a better message for the exception
- void writeOut(void delegate(char[]) sink) ¶#
-
writes out the exception message, file, line number, stacktrace (if available) and any
subexceptions