#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 | 12954 | anis_sg |
Populate -o //guest/perforce_software/p4connect/... //guest/anis_sg/perforce_software/p4connect/.... |
||
//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 |