rt.aaA

Implementation of associative arrays.

Members

Functions

_aaApply
int _aaApply(AA aa, size_t keysz, dg_t dg)

foreach opApply over all values

_aaApply2
int _aaApply2(AA aa, size_t keysz, dg2_t dg)

foreach opApply over all key/value pairs

_aaClear
void _aaClear(AA aa)

Remove all elements from AA.

_aaDelX
bool _aaDelX(AA aa, TypeInfo keyti, void* pkey)

Delete entry scope const AA, return true if it was present

_aaEqual
int _aaEqual(TypeInfo tiRaw, AA aa1, AA aa2)

compares 2 AAs for equality

_aaGetHash
hash_t _aaGetHash(AA* paa, TypeInfo tiRaw)

compute a hash

_aaGetRvalueX
inout(void)* _aaGetRvalueX(AA aa, TypeInfo keyti, size_t valsz, void* pkey)

Lookup *pkey in aa. Called only from implementation of (aakey) expressions when value is not mutable.

_aaGetX
void* _aaGetX(AA* paa, TypeInfo_AssociativeArray ti, size_t valsz, void* pkey, bool found)

Lookup *pkey in aa. Called only from implementation of require

_aaGetY
void* _aaGetY(AA* paa, TypeInfo_AssociativeArray ti, size_t valsz, void* pkey)

Lookup *pkey in aa. Called only from implementation of (aakey) expressions when value is mutable.

_aaInX
inout(void)* _aaInX(AA aa, TypeInfo keyti, void* pkey)

Lookup *pkey in aa. Called only from implementation of (key in aa) expressions.

_aaKeys
inout(void[]) _aaKeys(AA aa, size_t keysz, TypeInfo tiKeyArray)

Return a GC allocated array of all keys

_aaLen
size_t _aaLen(AA aa)

Determine number of entries in associative array.

_aaNew
Impl* _aaNew(TypeInfo_AssociativeArray ti)

Allocate associative array data. Called for new SomeAA expression.

_aaRehash
void* _aaRehash(AA* paa, TypeInfo keyti)

Rehash AA

_aaValues
inout(void[]) _aaValues(AA aa, size_t keysz, size_t valsz, TypeInfo tiValueArray)

Return a GC allocated array of all values

_d_assocarrayliteralTX
Impl* _d_assocarrayliteralTX(TypeInfo_AssociativeArray ti, void[] keys, void[] vals)

Construct an associative array of type ti from corresponding keys and values. Called for an AA literal [k1:v1, k2:v2].

Structs

AA
struct AA

Opaque AA wrapper

Range
struct Range

_aaRange implements a ForwardRange

Variables

_aaVersion
int _aaVersion;

AA version for debuggers, bump whenever changing the layout

Meta

Authors

Martin Nowak