17 #ifndef _ListFunc_h_incl_ 18 #define _ListFunc_h_incl_ 37 #ifndef _NTDEF_ // NtDef.h declares LIST_ENTRY in kernel mode. 38 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) // 3 id's I've seen 40 #else // Non-Windows compilation 42 typedef struct _LIST_ENTRY
49 typedef struct _SINGLE_LIST_ENTRY
51 struct _SINGLE_LIST_ENTRY *
Next;
59 #elif !defined( __bool_defined ) 61 typedef unsigned char bool;
62 #define true (1==1) // note: constant folding applies. 63 #define false (1==0) // -"- 64 #define __bool_defined 68 #ifndef INOUT // Supplements to classic annotations 74 #ifdef ListFunc_Internal 88 #define InitializeListEntry(E) (E)->Flink = (E)->Blink = (E) 89 #define _InitializeListEntry(E) _InitializeListHead( (PLIST_ENTRY)(E) ) 95 #define UnlinkListEntry(E) InitializeListEntry( E ) 120 bool (__stdcall *Action)(
PLIST_ENTRY Entry,
void* UserData ),
354 void _qsortPartition(
357 void _qsortRecursion(
434 #endif //ndef _ListFunc_h_incl_ PLIST_ENTRY FirstThat(PDListFunc Match, void *UserData=NULL)
UINT ExportToListHead(PLIST_ENTRY ListHead)
void AttachHeadlessList(OUT PLIST_ENTRY Head, IN PLIST_ENTRY Circular)
bool(__stdcall * PSListFunc)(PSINGLE_LIST_ENTRY Entry, void *UserData)
UINT ImportFromListHead(IN PLIST_ENTRY ListHead, OPTOUT PLIST_ENTRY *ppFirst)
PLIST_ENTRY LastThat(PDListFunc Match, void *UserData=NULL)
PLIST_ENTRY operator [](size_t Index)
void _InitializeEntryList(PSINGLE_LIST_ENTRY EntryOrHead)
UINT ImportHeadlessList(IN PLIST_ENTRY Circular, OPTOUT PLIST_ENTRY *ppFirst)
PLIST_ENTRY operator+=(PLIST_ENTRY Entry)
bool Exist(PLIST_ENTRY Entry)
bool ForEach(PDListFunc Action, void *UserData=NULL)
UINT AppendList(IN PLIST_ENTRY ListToAppend, OPTOUT PLIST_ENTRY *ppFirst)
void _InsertHeadList(PLIST_ENTRY ListHead, PLIST_ENTRY Entry)
PSINGLE_LIST_ENTRY operator -=(PSINGLE_LIST_ENTRY Entry)
struct _LIST_ENTRY * PLIST_ENTRY
bool(__stdcall * PDListFunc)(PLIST_ENTRY Entry, void *UserData)
DLinkList(bool Safe=true)
PLIST_ENTRY GetNext(PLIST_ENTRY Current)
void _PushEntryList(PSINGLE_LIST_ENTRY ListHead, PSINGLE_LIST_ENTRY Entry)
PDLinkList operator=(PLIST_ENTRY ListHead)
bool ForEach(PSListFunc Action, void *UserData=NULL)
PLIST_ENTRY Prepend(PLIST_ENTRY Entry)
void RemoveAll(PSListFunc ItemAction, void *UserData=NULL)
PLIST_ENTRY Append(PLIST_ENTRY Entry)
int(__stdcall * PDListComp)(PLIST_ENTRY X, PLIST_ENTRY Y, void *UserData)
PLIST_ENTRY _RemoveTailList(PLIST_ENTRY ListHead)
void _InitializeListHead(PLIST_ENTRY ListHead)
class SLinkList * PSLinkList
void _RemoveEntryList(PLIST_ENTRY Entry)
void QuickSort(PDListComp Compare, void *UserData=NULL)
PLIST_ENTRY _RemoveHeadList(PLIST_ENTRY ListHead)
struct _LIST_ENTRY * Blink
bool ListForEach(PLIST_ENTRY ListHead, bool(__stdcall *Action)(PLIST_ENTRY Entry, void *UserData), void *UserData)
PSINGLE_LIST_ENTRY FirstThat(PSListFunc Match, void *UserData=NULL)
bool __forceinline IsEmpty()
struct _SINGLE_LIST_ENTRY * PSINGLE_LIST_ENTRY
PSINGLE_LIST_ENTRY Remove(PSINGLE_LIST_ENTRY Entry)
void RemoveAll(PDListFunc ItemAction, void *UserData=NULL)
UINT GetListEntryCount(PLIST_ENTRY ListHead)
class DLinkList * PDLinkList
PSINGLE_LIST_ENTRY operator+=(PSINGLE_LIST_ENTRY Entry)
bool _IsListEmpty(PLIST_ENTRY ListHead)
void _InsertTailList(PLIST_ENTRY ListHead, PLIST_ENTRY Entry)
PSINGLE_LIST_ENTRY GetFirst()
PSINGLE_LIST_ENTRY PopEntry()
PSINGLE_LIST_ENTRY _PopEntryList(PSINGLE_LIST_ENTRY ListHead)
PLIST_ENTRY operator -=(PLIST_ENTRY Entry)
PSINGLE_LIST_ENTRY operator [](size_t Index)
UINT ExportToHeadlessList(PLIST_ENTRY *Circular)
PLIST_ENTRY RemoveFirst()
PSINGLE_LIST_ENTRY Append(PSINGLE_LIST_ENTRY Entry)
struct _SINGLE_LIST_ENTRY * Next
struct _LIST_ENTRY * Flink
PLIST_ENTRY RemoveEntry(PLIST_ENTRY Entry)
PLIST_ENTRY Push(PLIST_ENTRY Entry)
PSINGLE_LIST_ENTRY PushEntry(PSINGLE_LIST_ENTRY Entry)
PLIST_ENTRY GetPrev(PLIST_ENTRY Current)