#pragma once //forward references class DoublyLinkedList; class ILockable; class DoublyLinkedListItem { friend class DoublyLinkedList; public: DoublyLinkedListItem(void){}; DoublyLinkedListItem(DoublyLinkedList *list); DoublyLinkedListItem(DoublyLinkedList *list, int id); virtual ~DoublyLinkedListItem(void); // Id int Id; DoublyLinkedListItem* Next() { return pNextItem;} DoublyLinkedListItem* Prev() { return pPrevItem;} protected: // doubly linked list of objects of a given type DoublyLinkedListItem* pNextItem; DoublyLinkedListItem* pPrevItem; DoublyLinkedList *pList; }; class DoublyLinkedList { private: DoublyLinkedList(void){}; public: DoublyLinkedList(ILockable* locker); virtual ~DoublyLinkedList(void); void Add(DoublyLinkedListItem* object); void Remove(DoublyLinkedListItem* object, int deleteObj = 1); void Remove(int Id); DoublyLinkedListItem* Find(int Id); const DoublyLinkedListItem* First() const { return pFirstItem;} const DoublyLinkedListItem* Last() const { return pLastItem;} int Count() { return itemCount; } //CRITICAL_SECTION CriticalSection; protected: // Maintain a list of items DoublyLinkedListItem* pFirstItem; DoublyLinkedListItem* pLastItem; int disposed; int itemCount; ILockable* Locker; };
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 21852 | cswiedler | Branch //guest/cswiedler/p4connect | ||
//guest/perforce_software/p4connect/dev/shelves/src/P4Bridge/p4bridge/DoublyLinkedList.h | |||||
#1 | 17331 | Norman Morse | Dev branch for Shelves | ||
//guest/perforce_software/p4connect/main/src/P4Bridge/p4bridge/DoublyLinkedList.h | |||||
#1 | 16209 | Norman Morse | Move entire source tree into "main" branch so workshop code will act correctly. | ||
//guest/perforce_software/p4connect/src/P4Bridge/p4bridge/DoublyLinkedList.h | |||||
#2 | 12135 | Norman Morse |
Integrate dev branch changes into main. This code is the basiis of the 2.7 BETA release which provides Unity 5 compatibility |
||
#1 | 10940 | Norman Morse |
Inital Workshop release of P4Connect. Released under BSD-2 license |