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

#include <assocarray.h>

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

Classes

struct  KeyVal

Public Member Functions

 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)

Public Attributes

WDL_TypedBuf< KeyValm_data

Protected Attributes

int(* m_keycmp )(KEY *k1, KEY *k2)
KEY(* m_keydup )(KEY)
void(* m_keydispose )(KEY)
void(* m_valdispose )(VAL)

Private Member Functions

 WDL_AssocArrayImpl (const WDL_AssocArrayImpl &cp)
WDL_AssocArrayImploperator= (const WDL_AssocArrayImpl &cp)
void RemoveDuplicateKeys ()

Constructor & Destructor Documentation

◆ WDL_AssocArrayImpl() [1/2]

template<class KEY, class VAL>
WDL_AssocArrayImpl< KEY, VAL >::WDL_AssocArrayImpl ( const WDL_AssocArrayImpl< KEY, VAL > & cp)
inlineprivate

◆ WDL_AssocArrayImpl() [2/2]

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

◆ ~WDL_AssocArrayImpl()

template<class KEY, class VAL>
WDL_AssocArrayImpl< KEY, VAL >::~WDL_AssocArrayImpl ( )
inline

Member Function Documentation

◆ AddUnsorted()

template<class KEY, class VAL>
void WDL_AssocArrayImpl< KEY, VAL >::AddUnsorted ( KEY key,
VAL val )
inline

◆ ChangeKey()

template<class KEY, class VAL>
void WDL_AssocArrayImpl< KEY, VAL >::ChangeKey ( KEY oldkey,
KEY newkey )
inline

◆ ChangeKeyByIndex()

template<class KEY, class VAL>
void WDL_AssocArrayImpl< KEY, VAL >::ChangeKeyByIndex ( int idx,
KEY newkey,
bool needsort )
inline

◆ CopyContents()

template<class KEY, class VAL>
void WDL_AssocArrayImpl< KEY, VAL >::CopyContents ( const WDL_AssocArrayImpl< KEY, VAL > & cp)
inline

◆ CopyContentsAsReference()

template<class KEY, class VAL>
void WDL_AssocArrayImpl< KEY, VAL >::CopyContentsAsReference ( const WDL_AssocArrayImpl< KEY, VAL > & cp)
inline

◆ Delete()

template<class KEY, class VAL>
void WDL_AssocArrayImpl< KEY, VAL >::Delete ( KEY key)
inline

◆ DeleteAll()

template<class KEY, class VAL>
void WDL_AssocArrayImpl< KEY, VAL >::DeleteAll ( bool resizedown = false)
inline

◆ DeleteByIndex()

template<class KEY, class VAL>
void WDL_AssocArrayImpl< KEY, VAL >::DeleteByIndex ( int idx)
inline

◆ EnumeratePtr()

template<class KEY, class VAL>
VAL * WDL_AssocArrayImpl< KEY, VAL >::EnumeratePtr ( int i,
KEY * key = 0 ) const
inline

◆ Exists()

template<class KEY, class VAL>
bool WDL_AssocArrayImpl< KEY, VAL >::Exists ( KEY key) const
inline

◆ GetIdx()

template<class KEY, class VAL>
int WDL_AssocArrayImpl< KEY, VAL >::GetIdx ( KEY key) const
inline

◆ GetPtr()

template<class KEY, class VAL>
VAL * WDL_AssocArrayImpl< KEY, VAL >::GetPtr ( KEY key,
KEY * keyPtrOut = NULL ) const
inline

◆ GetSize()

template<class KEY, class VAL>
int WDL_AssocArrayImpl< KEY, VAL >::GetSize ( ) const
inline

◆ Insert()

template<class KEY, class VAL>
int WDL_AssocArrayImpl< KEY, VAL >::Insert ( KEY key,
VAL val )
inline

◆ LowerBound()

template<class KEY, class VAL>
int WDL_AssocArrayImpl< KEY, VAL >::LowerBound ( KEY key,
bool * ismatch ) const
inline

◆ operator=()

template<class KEY, class VAL>
WDL_AssocArrayImpl & WDL_AssocArrayImpl< KEY, VAL >::operator= ( const WDL_AssocArrayImpl< KEY, VAL > & cp)
inlineprivate

◆ RemoveDuplicateKeys()

template<class KEY, class VAL>
void WDL_AssocArrayImpl< KEY, VAL >::RemoveDuplicateKeys ( )
inlineprivate

◆ Resort()

template<class KEY, class VAL>
void WDL_AssocArrayImpl< KEY, VAL >::Resort ( int(* new_keycmp )(KEY *k1, KEY *k2) = NULL)
inline

◆ ResortStable()

template<class KEY, class VAL>
void WDL_AssocArrayImpl< KEY, VAL >::ResortStable ( )
inline

◆ ReverseLookupPtr()

template<class KEY, class VAL>
KEY * WDL_AssocArrayImpl< KEY, VAL >::ReverseLookupPtr ( VAL val) const
inline

◆ SetGranul()

template<class KEY, class VAL>
void WDL_AssocArrayImpl< KEY, VAL >::SetGranul ( int gran)
inline

Member Data Documentation

◆ m_data

template<class KEY, class VAL>
WDL_TypedBuf<KeyVal> WDL_AssocArrayImpl< KEY, VAL >::m_data

◆ m_keycmp

template<class KEY, class VAL>
int(* WDL_AssocArrayImpl< KEY, VAL >::m_keycmp) (KEY *k1, KEY *k2)
protected

◆ m_keydispose

template<class KEY, class VAL>
void(* WDL_AssocArrayImpl< KEY, VAL >::m_keydispose) (KEY)
protected

◆ m_keydup

template<class KEY, class VAL>
KEY(* WDL_AssocArrayImpl< KEY, VAL >::m_keydup) (KEY)
protected

◆ m_valdispose

template<class KEY, class VAL>
void(* WDL_AssocArrayImpl< KEY, VAL >::m_valdispose) (VAL)
protected

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