LMMS
Loading...
Searching...
No Matches
WDL_PtrList< PTRTYPE > Class Template Reference

#include <ptrlist.h>

Inheritance diagram for WDL_PtrList< PTRTYPE >:
WDL_PtrList_DeleteOnDestroy< PTRTYPE >

Public Member Functions

 WDL_PtrList (int defgran=4096)
 ~WDL_PtrList ()
PTRTYPE ** GetList () const
PTRTYPE * Get (INT_PTR index) const
int GetSize (void) const
int Find (const PTRTYPE *p) const
int FindR (const PTRTYPE *p) const
PTRTYPE * Add (PTRTYPE *item)
PTRTYPE * Set (int index, PTRTYPE *item)
PTRTYPE * Insert (int index, PTRTYPE *item)
int FindSorted (const PTRTYPE *p, int(*compar)(const PTRTYPE **a, const PTRTYPE **b)) const
PTRTYPE * InsertSorted (PTRTYPE *item, int(*compar)(const PTRTYPE **a, const PTRTYPE **b))
void Delete (int index)
void Delete (int index, bool wantDelete, void(*delfunc)(void *)=NULL)
void Delete (int index, void(*delfunc)(PTRTYPE *))
void DeletePtr (const PTRTYPE *p)
void DeletePtr (const PTRTYPE *p, bool wantDelete, void(*delfunc)(void *)=NULL)
void DeletePtr (const PTRTYPE *p, void(*delfunc)(PTRTYPE *))
void Empty ()
void Empty (bool wantDelete, void(*delfunc)(void *)=NULL)
void Empty (void(*delfunc)(PTRTYPE *))
void EmptySafe (bool wantDelete=false, void(*delfunc)(void *)=NULL)
int LowerBound (const PTRTYPE *key, bool *ismatch, int(*compar)(const PTRTYPE **a, const PTRTYPE **b)) const
void Compact ()
int DeleteBatch (bool(*proc)(PTRTYPE *p, void *ctx), void *ctx=NULL)

Private Attributes

WDL_HeapBuf m_hb

Constructor & Destructor Documentation

◆ WDL_PtrList()

template<class PTRTYPE>
WDL_PtrList< PTRTYPE >::WDL_PtrList ( int defgran = 4096)
inlineexplicit

◆ ~WDL_PtrList()

template<class PTRTYPE>
WDL_PtrList< PTRTYPE >::~WDL_PtrList ( )
inline

Member Function Documentation

◆ Add()

template<class PTRTYPE>
PTRTYPE * WDL_PtrList< PTRTYPE >::Add ( PTRTYPE * item)
inline

◆ Compact()

template<class PTRTYPE>
void WDL_PtrList< PTRTYPE >::Compact ( )
inline

◆ Delete() [1/3]

template<class PTRTYPE>
void WDL_PtrList< PTRTYPE >::Delete ( int index)
inline

◆ Delete() [2/3]

template<class PTRTYPE>
void WDL_PtrList< PTRTYPE >::Delete ( int index,
bool wantDelete,
void(* delfunc )(void *) = NULL )
inline

◆ Delete() [3/3]

template<class PTRTYPE>
void WDL_PtrList< PTRTYPE >::Delete ( int index,
void(* delfunc )(PTRTYPE *) )
inline

◆ DeleteBatch()

template<class PTRTYPE>
int WDL_PtrList< PTRTYPE >::DeleteBatch ( bool(* proc )(PTRTYPE *p, void *ctx),
void * ctx = NULL )
inline

◆ DeletePtr() [1/3]

template<class PTRTYPE>
void WDL_PtrList< PTRTYPE >::DeletePtr ( const PTRTYPE * p)
inline

◆ DeletePtr() [2/3]

template<class PTRTYPE>
void WDL_PtrList< PTRTYPE >::DeletePtr ( const PTRTYPE * p,
bool wantDelete,
void(* delfunc )(void *) = NULL )
inline

◆ DeletePtr() [3/3]

template<class PTRTYPE>
void WDL_PtrList< PTRTYPE >::DeletePtr ( const PTRTYPE * p,
void(* delfunc )(PTRTYPE *) )
inline

◆ Empty() [1/3]

template<class PTRTYPE>
void WDL_PtrList< PTRTYPE >::Empty ( )
inline

◆ Empty() [2/3]

template<class PTRTYPE>
void WDL_PtrList< PTRTYPE >::Empty ( bool wantDelete,
void(* delfunc )(void *) = NULL )
inline

◆ Empty() [3/3]

template<class PTRTYPE>
void WDL_PtrList< PTRTYPE >::Empty ( void(* delfunc )(PTRTYPE *))
inline

◆ EmptySafe()

template<class PTRTYPE>
void WDL_PtrList< PTRTYPE >::EmptySafe ( bool wantDelete = false,
void(* delfunc )(void *) = NULL )
inline

◆ Find()

template<class PTRTYPE>
int WDL_PtrList< PTRTYPE >::Find ( const PTRTYPE * p) const
inline

◆ FindR()

template<class PTRTYPE>
int WDL_PtrList< PTRTYPE >::FindR ( const PTRTYPE * p) const
inline

◆ FindSorted()

template<class PTRTYPE>
int WDL_PtrList< PTRTYPE >::FindSorted ( const PTRTYPE * p,
int(* compar )(const PTRTYPE **a, const PTRTYPE **b) ) const
inline

◆ Get()

template<class PTRTYPE>
PTRTYPE * WDL_PtrList< PTRTYPE >::Get ( INT_PTR index) const
inline

◆ GetList()

template<class PTRTYPE>
PTRTYPE ** WDL_PtrList< PTRTYPE >::GetList ( ) const
inline

◆ GetSize()

template<class PTRTYPE>
int WDL_PtrList< PTRTYPE >::GetSize ( void ) const
inline

◆ Insert()

template<class PTRTYPE>
PTRTYPE * WDL_PtrList< PTRTYPE >::Insert ( int index,
PTRTYPE * item )
inline

◆ InsertSorted()

template<class PTRTYPE>
PTRTYPE * WDL_PtrList< PTRTYPE >::InsertSorted ( PTRTYPE * item,
int(* compar )(const PTRTYPE **a, const PTRTYPE **b) )
inline

◆ LowerBound()

template<class PTRTYPE>
int WDL_PtrList< PTRTYPE >::LowerBound ( const PTRTYPE * key,
bool * ismatch,
int(* compar )(const PTRTYPE **a, const PTRTYPE **b) ) const
inline

◆ Set()

template<class PTRTYPE>
PTRTYPE * WDL_PtrList< PTRTYPE >::Set ( int index,
PTRTYPE * item )
inline

Member Data Documentation

◆ m_hb

template<class PTRTYPE>
WDL_HeapBuf WDL_PtrList< PTRTYPE >::m_hb
private

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