/*++ Copyright (c) 1998 Microsoft Corporation All rights reserved. Module Name: dlist.inl Abstract: Double linked list template class. Author: Weihai Chen (WeihaiC) 04/15/98 Revision History: Weihai Chen (WeihaiC) 03/08/00 Rename to T* --*/ #ifndef _DLIST_H #define _DLIST_H #include "dnode.hxx" template class TDoubleList { public: TDoubleList( void ); virtual ~TDoubleList( void ); BOOL InsertItem ( T); BOOL AppendItem ( T); BOOL DeleteItem ( T); BOOL InsertNode (TDoubleNode *); BOOL AppendNode (TDoubleNode *); BOOL DeleteNode (TDoubleNode *); TDoubleNode* GetHead (void); virtual T GetItemFromIndex (DWORD dwIndex); TDoubleNode * GetNodeFromIndex (DWORD dwIndex); BOOL GetTotalNode (PDWORD pdwCount); BOOL bValid() {return m_bValid;} protected: TDoubleNode *m_pHead; TDoubleNode *m_pTail; DWORD m_dwNumNode; BOOL m_bValid; }; template class TSrchDoubleList: public TDoubleList { public: TSrchDoubleList( void ) {}; virtual ~TSrchDoubleList( void ) {}; virtual T FindItemFromItem (T ); virtual T FindItemFromKey (KEYTYPE ); TDoubleNode * FindNodeFromItem (T item); TDoubleNode * FindNodeFromKey (KEYTYPE key); }; #include "dlist.inl" #endif