1 // LastModifiedIndex.h 2 3 #ifndef LAST_MODIFIED_INDEX_H 4 #define LAST_MODIFIED_INDEX_H 5 6 #include "Index.h" 7 #include "NodeListener.h" 8 #include "TwoKeyAVLTree.h" 9 10 // LastModifiedIndex 11 class LastModifiedIndex : public Index, private NodeListener { 12 public: 13 LastModifiedIndex(Volume *volume); 14 virtual ~LastModifiedIndex(); 15 16 virtual int32 CountEntries() const; 17 18 virtual status_t Changed(Node *node, time_t oldModified); 19 20 private: 21 virtual void NodeAdded(Node *node); 22 virtual void NodeRemoved(Node *node); 23 24 protected: 25 virtual AbstractIndexEntryIterator *InternalGetIterator(); 26 virtual AbstractIndexEntryIterator *InternalFind(const uint8 *key, 27 size_t length); 28 29 private: 30 class Iterator; 31 class IteratorList; 32 class NodeTree; 33 friend class Iterator; 34 35 private: 36 void _AddIterator(Iterator *iterator); 37 void _RemoveIterator(Iterator *iterator); 38 39 private: 40 NodeTree *fNodes; 41 IteratorList *fIterators; 42 }; 43 44 #endif // LAST_MODIFIED_INDEX_H 45