Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
rt.aaA
Implementation of associative arrays.
License:
Authors:
Martin Nowak
- immutable int
_aaVersion; - AA version for debuggers, bump whenever changing the layout
- struct
AA; - Opaque
AAwrapper - pure nothrow @nogc size_t
_aaLen(in AAaa); - Determine number of entries in associative array.
- void*
_aaGetY(AA*aa, const TypeInfo_AssociativeArrayti, in size_tvalsz, in void*pkey); - Lookup *
pkeyinaa. Called only from implementation of (aa[key]) expressions when value is mutable.Parameters:AA* aaassociative array opaque pointer TypeInfo_AssociativeArray tiTypeInfo for the associative array size_t valszignored void* pkeypointer to the key value Returns:if key was in theaa, a mutable pointer to the existing value. If key was not in theaa, a mutable pointer to newly inserted value which is set to all zeros - inout(void)*
_aaGetRvalueX(inout AAaa, in TypeInfokeyti, in size_tvalsz, in void*pkey); - Lookup *
pkeyinaa. Called only from implementation of (aa[key]) expressions when value is not mutable.Parameters:AA aaassociative array opaque pointer TypeInfo keytiTypeInfo for the key size_t valszignored void* pkeypointer to the key value Returns:pointer to value if present,nullotherwise - inout(void)*
_aaInX(inout AAaa, in TypeInfokeyti, in void*pkey); - Lookup *
pkeyinaa. Called only from implementation of (key inaa) expressions.Parameters:AA aaassociative array opaque pointer TypeInfo keytiTypeInfo for the key void* pkeypointer to the key value Returns:pointer to value if present,nullotherwise - bool
_aaDelX(AAaa, in TypeInfokeyti, in void*pkey); - Delete entry in AA, return
trueif it was present - pure nothrow void
_aaClear(AAaa); - Remove all elements from AA.
- pure nothrow void*
_aaRehash(AA*paa, in TypeInfokeyti); - Rehash AA
- pure nothrow inout(void[])
_aaValues(inout AAaa, in size_tkeysz, in size_tvalsz, const TypeInfotiValueArray); - Return a GC allocated array of all values
- pure nothrow inout(void[])
_aaKeys(inout AAaa, in size_tkeysz, const TypeInfotiKeyArray); - Return a GC allocated array of all keys
- int
_aaApply(AAaa, in size_tkeysz, dg_tdg); - foreach opApply over all values
- int
_aaApply2(AAaa, in size_tkeysz, dg2_tdg); - foreach opApply over all key/value pairs
- Impl*
_d_assocarrayliteralTX(const TypeInfo_AssociativeArrayti, void[]keys, void[]vals); - Construct an associative array of type
tifromkeysand value - int
_aaEqual(in TypeInfotiRaw, in AAaa1, in AAaa2); - compares 2 AAs for equality
- nothrow hash_t
_aaGetHash(in AA*aa, in TypeInfotiRaw); - compute a hash
- struct
Range; - aaRange implements a ForwardRange
Copyright © 1999-2018 by the D Language Foundation | Page generated by
Ddoc on Fri Mar 2 18:16:16 2018