1 // AttributeIndexImpl.h 2 3 #ifndef ATTRIBUTE_INDEX_IMPL_H 4 #define ATTRIBUTE_INDEX_IMPL_H 5 6 #include "AttributeIndex.h" 7 8 // AttributeIndexImpl 9 class AttributeIndexImpl : public AttributeIndex { 10 public: 11 AttributeIndexImpl(Volume *volume, const char *name, uint32 type, 12 size_t keyLength); 13 virtual ~AttributeIndexImpl(); 14 15 virtual int32 CountEntries() const; 16 17 virtual status_t Changed(Attribute *attribute, 18 const uint8 *oldKey, size_t oldLength); 19 20 private: 21 virtual status_t Added(Attribute *attribute); 22 virtual bool Removed(Attribute *attribute); 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 AttributeTree; 33 34 class PrimaryKey; 35 class GetPrimaryKey; 36 class PrimaryKeyCompare; 37 38 friend class Iterator; 39 40 private: 41 void _AddIterator(Iterator *iterator); 42 void _RemoveIterator(Iterator *iterator); 43 44 private: 45 AttributeTree *fAttributes; 46 IteratorList *fIterators; 47 }; 48 49 #endif // ATTRIBUTE_INDEX_IMPL_H 50