object

Forms the symbols available to all D programs. Includes Object, which is the root of the class object hierarchy. This module is implicitly imported.

Members

Aliases

AssociativeArray
alias AssociativeArray(Key, Value) = Value[Key]
Undocumented in source.
ClassInfo
alias ClassInfo = TypeInfo_Class
Undocumented in source.
__va_list
alias __va_list = ldc.internal.vararg.std.__va_list
Undocumented in source.
__va_list
alias __va_list = ldc.internal.vararg.std.__va_list
Undocumented in source.
dstring
alias dstring = immutable(dchar)[]
Undocumented in source.
equals_t
alias equals_t = bool
Undocumented in source.
hash_t
alias hash_t = size_t
Undocumented in source.
noreturn
alias noreturn = typeof(*null)
Undocumented in source.
ptrdiff_t
alias ptrdiff_t = long
Undocumented in source.
ptrdiff_t
alias ptrdiff_t = int
Undocumented in source.
size_t
alias size_t = ulong
Undocumented in source.
size_t
alias size_t = uint
Undocumented in source.
sizediff_t
alias sizediff_t = ptrdiff_t
Undocumented in source.
string
alias string = immutable(char)[]
Undocumented in source.
time_t
alias time_t = ulong
Undocumented in source.
wstring
alias wstring = immutable(wchar)[]
Undocumented in source.

Classes

Error
class Error

The base class of all unrecoverable runtime errors.

Exception
class Exception

The base class of all errors that are safe to catch and handle.

Object
class Object

All D class objects inherit from Object.

Throwable
class Throwable

The base class of all thrown objects.

TypeInfo
class TypeInfo

Runtime type information about a type. Can be retrieved for any type using a $(GLINK2 expression,TypeidExpression, TypeidExpression).

TypeInfo_Array
class TypeInfo_Array
Undocumented in source.
TypeInfo_AssociativeArray
class TypeInfo_AssociativeArray
Undocumented in source.
TypeInfo_Class
class TypeInfo_Class

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

TypeInfo_Const
class TypeInfo_Const
Undocumented in source.
TypeInfo_Delegate
class TypeInfo_Delegate
Undocumented in source.
TypeInfo_Enum
class TypeInfo_Enum
Undocumented in source.
TypeInfo_Function
class TypeInfo_Function
Undocumented in source.
TypeInfo_Inout
class TypeInfo_Inout
Undocumented in source.
TypeInfo_Interface
class TypeInfo_Interface
Undocumented in source.
TypeInfo_Invariant
class TypeInfo_Invariant
Undocumented in source.
TypeInfo_Pointer
class TypeInfo_Pointer
Undocumented in source.
TypeInfo_Shared
class TypeInfo_Shared
Undocumented in source.
TypeInfo_StaticArray
class TypeInfo_StaticArray
Undocumented in source.
TypeInfo_Struct
class TypeInfo_Struct
Undocumented in source.
TypeInfo_Tuple
class TypeInfo_Tuple
Undocumented in source.
TypeInfo_Vector
class TypeInfo_Vector
Undocumented in source.
__cpp_type_info_ptr
class __cpp_type_info_ptr
Undocumented in source.

Enums

MIctorstart
anonymousenum MIctorstart
Undocumented in source.

Functions

_D9invariant12_d_invariantFC6ObjectZv
void _D9invariant12_d_invariantFC6ObjectZv(Object o)
Undocumented in source. Be warned that the author may not have intended to support it.
__ArrayCast
TTo[] __ArrayCast(TFrom[] from)

The compiler lowers expressions of cast(TTo[])TFrom[] to this implementation.

__ArrayDtor
void __ArrayDtor(T[] a)
Undocumented in source. Be warned that the author may not have intended to support it.
__ArrayEq
bool __ArrayEq(T1[] a, T2[] b)
Undocumented in source. Be warned that the author may not have intended to support it.
__ArrayPostblit
void __ArrayPostblit(T[] a)
Undocumented in source. Be warned that the author may not have intended to support it.
__cmp
int __cmp(T[] lhs, T[] rhs)
Undocumented in source. Be warned that the author may not have intended to support it.
__cmp
int __cmp(T1[] s1, T2[] s2)
Undocumented in source. Be warned that the author may not have intended to support it.
__ctfeWrite
void __ctfeWrite(const(char)[] s)
Undocumented in source. Be warned that the author may not have intended to support it.
__ctfeWrite (from core.builtins)
void __ctfeWrite(const(char)[] s) via public import core.builtins : __ctfeWrite;

Writes s to stderr during CTFE (does nothing at runtime).

__equals (from core.internal.array.equality)
bool __equals(T1[] lhs, T2[] rhs) via public import core.internal.array.equality : __equals;
Undocumented in source.
__switch
int __switch(T[] condition)
Undocumented in source. Be warned that the author may not have intended to support it.
__switch_error
void __switch_error(string file, size_t line)
Undocumented in source. Be warned that the author may not have intended to support it.
_aaClear
void _aaClear(AA aa)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_aaEqual
int _aaEqual(TypeInfo tiRaw, AA aa1, AA aa2)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_aaGetHash
hash_t _aaGetHash(AA* aa, TypeInfo tiRaw)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_aaKeys
inout(void[]) _aaKeys(AA aa, size_t keysz, TypeInfo tiKeyArray)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_aaRange
AARange _aaRange(AA aa)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_aaRangeEmpty
bool _aaRangeEmpty(AARange r)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_aaRangeFrontKey
void* _aaRangeFrontKey(AARange r)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_aaRangeFrontValue
void* _aaRangeFrontValue(AARange r)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_aaRangePopFront
void _aaRangePopFront(AARange r)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_aaRehash
void* _aaRehash(AA* paa, TypeInfo keyti)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_aaValues
inout(void[]) _aaValues(AA aa, size_t keysz, size_t valsz, TypeInfo tiValueArray)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_d_arrayappendT (from core.internal.array.appending)
Tarr _d_arrayappendT(Tarr x, Tarr y) via public import core.internal.array.appending : _d_arrayappendT;

Implementation of _d_arrayappendT

_d_arrayappendcTX (from core.internal.array.appending)
Tarr _d_arrayappendcTX(Tarr px, size_t n) via public import core.internal.array.appending : _d_arrayappendcTX;

Extend an array px by n elements. Caller must initialize those elements.

_d_arrayassign_l (from core.internal.array.arrayassign)
Tarr _d_arrayassign_l(Tarr to, Tarr from) via public import core.internal.array.arrayassign : _d_arrayassign_l;

Does array assignment (not construction) from another array of the same element type. Handles overlapping copies. Assumes the right hand side is an lvalue,

_d_arrayassign_r (from core.internal.array.arrayassign)
Tarr _d_arrayassign_r(Tarr to, Tarr from) via public import core.internal.array.arrayassign : _d_arrayassign_r;

Does array assignment (not construction) from another array of the same element type. Does not support overlapping copies. Assumes the right hand side is an rvalue,

_d_arraycatnTX (from core.internal.array.concatenation)
Tret _d_arraycatnTX(Tarr froms) via public import core.internal.array.concatenation : _d_arraycatnTX;

Concatenate the arrays inside of froms. _d_arraycatnTX(a, b, c) means a ~ b ~ c.

_d_arrayctor (from core.internal.array.construction)
Tarr _d_arrayctor(Tarr to, Tarr from, char* makeWeaklyPure) via public import core.internal.array.construction : _d_arrayctor;

Does array initialization (not assignment) from another array of the same element type.

_d_arraysetassign (from core.internal.array.arrayassign)
Tarr _d_arraysetassign(Tarr to, T value) via public import core.internal.array.arrayassign : _d_arraysetassign;

Sets all elements of an array to a single value. Takes into account postblits, copy constructors and destructors. For Plain Old Data elements,rt/memset.d is used.

_d_arraysetctor (from core.internal.array.construction)
void _d_arraysetctor(Tarr p, T value) via public import core.internal.array.construction : _d_arraysetctor;

Do construction of an array. ticount p = value;

_d_assocarrayliteralTX
void* _d_assocarrayliteralTX(TypeInfo_AssociativeArray ti, void[] keys, void[] values)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_d_delThrowable
void _d_delThrowable(Throwable )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_d_newThrowable (from core.lifetime)
T _d_newThrowable() via public import core.lifetime : _d_newThrowable;

Allocate an exception of type T from the exception pool. T must be Throwable or derived from it and cannot be a COM or C++ class.

_d_newarrayT (from core.internal.array.construction)
T[] _d_newarrayT(size_t length, bool isShared) via public import core.internal.array.construction : _d_newarrayT;

Allocate an array with the garbage collector. Also initalize elements if their type has an initializer. Otherwise, not zero-initialize the array.

_d_newclassT (from core.lifetime)
T _d_newclassT() via public import core.lifetime : _d_newclassT;

Create a new class instance. Allocates memory and sets fields to their initial value, but does not call a constructor.

_d_newclassTTrace (from core.lifetime)
T _d_newclassTTrace(string file, int line, string funcname) via public import core.lifetime : _d_newclassTTrace;

TraceGC wrapper around core.lifetime._d_newclassT.

_d_newitemT (from core.lifetime)
T* _d_newitemT() via public import core.lifetime : _d_newitemT;

Allocate an initialized non-array item.

_enforce
T _enforce(T value, const(char)[] msg)
Undocumented in source. Be warned that the author may not have intended to support it.
_enforce
T _enforce(T value, void delegate() dg)
Undocumented in source. Be warned that the author may not have intended to support it.
_enforce
T _enforce(T value, Exception ex)
Undocumented in source. Be warned that the author may not have intended to support it.
_postblitRecurse
void _postblitRecurse(S s)
Undocumented in source. Be warned that the author may not have intended to support it.
_postblitRecurse
void _postblitRecurse(E[n] arr)
Undocumented in source. Be warned that the author may not have intended to support it.
_xopCmp
bool _xopCmp(void* , void* )
Undocumented in source. Be warned that the author may not have intended to support it.
_xopEquals
bool _xopEquals(void* , void* )
Undocumented in source. Be warned that the author may not have intended to support it.
aaLiteral
void* aaLiteral(Key[] keys, Value[] values)
Undocumented in source. Be warned that the author may not have intended to support it.
assumeSafeAppend
inout(T[]) assumeSafeAppend(inout(T[]) arr)

Assume that it is safe to append to this array. Appends made to this array after calling this function may append in place, even if the array was a slice of a larger array to begin with.

clear
void clear(T aa)

Removes all remaining keys and values from an associative array.

clear
void clear(T* aa)
Undocumented in source. Be warned that the author may not have intended to support it.
destroy
void destroy(T obj)

Destroys the given object and optionally resets to initial state. It's used to destroy an object, calling its destructor or finalizer so it no longer references any other objects. It does not initiate a GC cycle or free any GC memory. If initialize is supplied false, the object is considered invalid after destruction, and should not be referenced.

dup
V[K] dup(T aa)

Create a new associative array of the same size and copy the contents of the associative array into it.

dup
V[K] dup(T* aa)
Undocumented in source. Be warned that the author may not have intended to support it.
hashOf (from core.internal.hash)
size_t hashOf(T aa, size_t seed) via public import core.internal.hash : hashOf;
Undocumented in source.
opEquals
bool opEquals(LHS lhs, RHS rhs)

Implementation for class opEquals override. Calls the class-defined methods after a null check. Please note this is not nogc right now, even if your implementation is, because of the typeinfo name string compare. This is because of dmd's dll implementation. However, it can infer to @safe if your class' opEquals is.

rehash
T rehash(T aa)

Reorganizes the associative array in place so that lookups are more efficient.

rehash
T rehash(T* aa)
Undocumented in source. Be warned that the author may not have intended to support it.
rehash
T rehash(T aa)
Undocumented in source. Be warned that the author may not have intended to support it.
rehash
T rehash(T* aa)
Undocumented in source. Be warned that the author may not have intended to support it.
reserve
size_t reserve(T[] arr, size_t newcapacity)

Reserves capacity for a slice. The capacity is the size that the slice can grow to before the underlying array must be reallocated or extended.

Properties

capacity
size_t capacity [@property getter]

(Property) Gets the current capacity of a slice. The capacity is the size that the slice can grow to before the underlying array must be reallocated or extended.

dup
auto dup [@property getter]
T[] dup [@property getter]

Provide the .dup array property.

idup
immutable(T)[] idup [@property getter]

Provide the .idup array property.

Structs

Interface
struct Interface

Information about an interface. When an object is accessed via an interface, an Interface* appears as the first entry in its vtbl.

ModuleInfo
struct ModuleInfo

An instance of ModuleInfo is generated into the object file for each compiled module.

OffsetTypeInfo
struct OffsetTypeInfo

Array of pairs giving the offset and type information for each member in an aggregate.

__va_list_tag
struct __va_list_tag
Undocumented in source.
selector (from core.attribute)
struct selector via public import core.attribute : selector;

Use this attribute to attach an Objective-C selector to a method.

Templates

NoPointersBitmapPayload
template NoPointersBitmapPayload(size_t N)
Undocumented in source.
RTInfo
template RTInfo(T)
Undocumented in source.
RTInfoImpl
template RTInfoImpl(size_t[] pointerBitmap)

Create RTInfo for type T

_arrayOp
template _arrayOp(Args...)
Undocumented in source.
_arrayOp
template _arrayOp(Args...)
Undocumented in source.
_d_arraysetlengthTImpl (from core.internal.array.capacity)
template _d_arraysetlengthTImpl(Tarr : T[], T) via public import core.internal.array.capacity : _d_arraysetlengthTImpl;

Implementation of _d_arraysetlengthT and _d_arraysetlengthTTrace

_d_delstructImpl (from core.lifetime)
template _d_delstructImpl(T) via public import core.lifetime : _d_delstructImpl;

Implementation of _d_delstruct and _d_delstructTrace

_isStaticArray
template _isStaticArray(T : U[N], U, size_t N)
Undocumented in source.
_isStaticArray
template _isStaticArray(T)
Undocumented in source.
imported
template imported(string moduleName)

Provides an "inline import", i.e. an import that is only available for a limited lookup. For example:

Variables

rtinfoHasPointers
enum immutable(void)* rtinfoHasPointers;
Undocumented in source.
rtinfoNoPointers
enum immutable(void)* rtinfoNoPointers;

shortcuts for the precise GC, also generated by the compiler used instead of the actual pointer bitmap

Meta

Authors

Walter Bright, Sean Kelly