/*++ Copyright (c) 1998 Microsoft Corporation All rights reserved. Module Name: dlistlck.inl Abstract: Double linked list with lock template class. Author: Weihai Chen (WeihaiC) 04/15/98 Revision History: --*/ #ifndef _DLISTLCK_H #define _DLISTLCK_H #include "dlist.hxx" template class TDoubleListLock { public: TDoubleListLock( void ); virtual ~TDoubleListLock( void ); BOOL InsertItem ( T); BOOL AppendItem ( T); BOOL DeleteItem ( T); BOOL InsertNode (TDoubleNode *); BOOL AppendNode (TDoubleNode *); BOOL DeleteNode (TDoubleNode *); TDoubleNode* GetHead (void); BOOL GetTotalNode (PDWORD pdwCount); operator TCriticalSection & () {return m_CritSec;} BOOL bValid() {return m_bValid;}; protected: BOOL m_bValid; TDoubleList *m_pList; TCriticalSection m_CritSec; }; template class TSrchDoubleListLock : public TSrchDoubleList { public: TSrchDoubleListLock( void ) {}; virtual ~TSrchDoubleListLock( void ) {}; virtual T FindItemFromItem (T ); virtual T FindItemFromKey (KEYTYPE ); TDoubleNode * FindNodeFromItem (T item); TDoubleNode * FindNodeFromKey (KEYTYPE key); }; #include "dlistlck.inl" #endif