11e7416d9SIngo Weinhold /* 21e7416d9SIngo Weinhold * Copyright 2011, Ingo Weinhold, ingo_weinhold@gmx.de. 31e7416d9SIngo Weinhold * Distributed under the terms of the MIT License. 41e7416d9SIngo Weinhold */ 51e7416d9SIngo Weinhold #ifndef ATTRIBUTE_INDEXER_H 61e7416d9SIngo Weinhold #define ATTRIBUTE_INDEXER_H 71e7416d9SIngo Weinhold 81e7416d9SIngo Weinhold 91e7416d9SIngo Weinhold #include <SupportDefs.h> 101e7416d9SIngo Weinhold 11d07c930cSIngo Weinhold #include "String.h" 12d07c930cSIngo Weinhold 131e7416d9SIngo Weinhold 141e7416d9SIngo Weinhold class AttributeIndex; 15*7c234361SAugustin Cavalier struct AttributeIndexTreeValue; 161e7416d9SIngo Weinhold class IndexedAttributeOwner; 171e7416d9SIngo Weinhold 181e7416d9SIngo Weinhold 191e7416d9SIngo Weinhold class AttributeIndexer { 201e7416d9SIngo Weinhold public: 211e7416d9SIngo Weinhold AttributeIndexer(AttributeIndex* index); 221e7416d9SIngo Weinhold ~AttributeIndexer(); 231e7416d9SIngo Weinhold 241e7416d9SIngo Weinhold status_t CreateCookie(IndexedAttributeOwner* owner, 251e7416d9SIngo Weinhold void* attributeCookie, uint32 attributeType, 261e7416d9SIngo Weinhold size_t attributeSize, void*& _data, 271e7416d9SIngo Weinhold size_t& _toRead); 281e7416d9SIngo Weinhold void DeleteCookie(); 291e7416d9SIngo Weinhold Cookie()301e7416d9SIngo Weinhold AttributeIndexTreeValue* Cookie() const 311e7416d9SIngo Weinhold { return fCookie; } 321e7416d9SIngo Weinhold IndexName()33d07c930cSIngo Weinhold const String& IndexName() const 341e7416d9SIngo Weinhold { return fIndexName; } 351e7416d9SIngo Weinhold 361e7416d9SIngo Weinhold private: 371e7416d9SIngo Weinhold AttributeIndex* fIndex; 38d07c930cSIngo Weinhold const String& fIndexName; 391e7416d9SIngo Weinhold uint32 fIndexType; 401e7416d9SIngo Weinhold AttributeIndexTreeValue* fCookie; 411e7416d9SIngo Weinhold }; 421e7416d9SIngo Weinhold 431e7416d9SIngo Weinhold 441e7416d9SIngo Weinhold #endif // ATTRIBUTE_INDEX_H 45