LMMS
Loading...
Searching...
No Matches
WDL_AssocArray< KEY, VAL > Class Template Reference

#include <assocarray.h>

Inheritance diagram for WDL_AssocArray< KEY, VAL >:
WDL_AssocArrayImpl< KEY, VAL >

Public Member Functions

 WDL_AssocArray (int(*keycmp)(KEY *k1, KEY *k2), KEY(*keydup)(KEY)=0, void(*keydispose)(KEY)=0, void(*valdispose)(VAL)=0)
VAL Get (KEY key, VAL notfound=0) const
VAL Enumerate (int i, KEY *key=0, VAL notfound=0) const
KEY ReverseLookup (VAL val, KEY notfound=0) const
Public Member Functions inherited from WDL_AssocArrayImpl< KEY, VAL >
 WDL_AssocArrayImpl (int(*keycmp)(KEY *k1, KEY *k2), KEY(*keydup)(KEY)=0, void(*keydispose)(KEY)=0, void(*valdispose)(VAL)=0)
 ~WDL_AssocArrayImpl ()
VAL * GetPtr (KEY key, KEY *keyPtrOut=NULL) const
bool Exists (KEY key) const
int Insert (KEY key, VAL val)
void Delete (KEY key)
void DeleteByIndex (int idx)
void DeleteAll (bool resizedown=false)
int GetSize () const
VAL * EnumeratePtr (int i, KEY *key=0) const
KEY * ReverseLookupPtr (VAL val) const
void ChangeKey (KEY oldkey, KEY newkey)
void ChangeKeyByIndex (int idx, KEY newkey, bool needsort)
void AddUnsorted (KEY key, VAL val)
void Resort (int(*new_keycmp)(KEY *k1, KEY *k2)=NULL)
void ResortStable ()
int LowerBound (KEY key, bool *ismatch) const
int GetIdx (KEY key) const
void SetGranul (int gran)
void CopyContents (const WDL_AssocArrayImpl &cp)
void CopyContentsAsReference (const WDL_AssocArrayImpl &cp)

Additional Inherited Members

Public Attributes inherited from WDL_AssocArrayImpl< KEY, VAL >
WDL_TypedBuf< KeyValm_data
Protected Attributes inherited from WDL_AssocArrayImpl< KEY, VAL >
int(* m_keycmp )(KEY *k1, KEY *k2)
KEY(* m_keydup )(KEY)
void(* m_keydispose )(KEY)
void(* m_valdispose )(VAL)

Constructor & Destructor Documentation

◆ WDL_AssocArray()

template<class KEY, class VAL>
WDL_AssocArray< KEY, VAL >::WDL_AssocArray ( int(* keycmp )(KEY *k1, KEY *k2),
KEY(* keydup )(KEY) = 0,
void(* keydispose )(KEY) = 0,
void(* valdispose )(VAL) = 0 )
inlineexplicit

Member Function Documentation

◆ Enumerate()

template<class KEY, class VAL>
VAL WDL_AssocArray< KEY, VAL >::Enumerate ( int i,
KEY * key = 0,
VAL notfound = 0 ) const
inline

◆ Get()

template<class KEY, class VAL>
VAL WDL_AssocArray< KEY, VAL >::Get ( KEY key,
VAL notfound = 0 ) const
inline

◆ ReverseLookup()

template<class KEY, class VAL>
KEY WDL_AssocArray< KEY, VAL >::ReverseLookup ( VAL val,
KEY notfound = 0 ) const
inline

The documentation for this class was generated from the following file: