1/*
2 * Copyright 2011, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef ATTRIBUTE_INDEXER_H
6#define ATTRIBUTE_INDEXER_H
7
8
9#include <SupportDefs.h>
10
11#include "String.h"
12
13
14class AttributeIndex;
15struct AttributeIndexTreeValue;
16class IndexedAttributeOwner;
17
18
19class AttributeIndexer {
20public:
21								AttributeIndexer(AttributeIndex* index);
22								~AttributeIndexer();
23
24			status_t			CreateCookie(IndexedAttributeOwner* owner,
25									void* attributeCookie, uint32 attributeType,
26									size_t attributeSize, void*& _data,
27									size_t& _toRead);
28			void				DeleteCookie();
29
30			AttributeIndexTreeValue* Cookie() const
31									{ return fCookie; }
32
33			const String&		IndexName() const
34									{ return fIndexName; }
35
36private:
37			AttributeIndex*		fIndex;
38			const String&		fIndexName;
39			uint32				fIndexType;
40			AttributeIndexTreeValue* fCookie;
41};
42
43
44#endif	// ATTRIBUTE_INDEX_H
45