1/*
2 * Copyright 2009-2011, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef PACKAGE_NODE_ATTRIBUTE_H
6#define PACKAGE_NODE_ATTRIBUTE_H
7
8
9#include <util/DoublyLinkedList.h>
10
11#include "PackageData.h"
12
13#include "String.h"
14
15
16class PackageNode;
17
18
19class PackageNodeAttribute
20	: public DoublyLinkedListLinkImpl<PackageNodeAttribute> {
21public:
22	static	void*				operator new(size_t size);
23	static	void				operator delete(void* block);
24
25								PackageNodeAttribute(uint32 type,
26									const PackageData& data);
27								~PackageNodeAttribute();
28
29			const String&		Name() const	{ return fName; }
30			uint32				Type() const	{ return fType; }
31			const PackageData&	Data() const	{ return fData; }
32
33			void				Init(const String& name);
34
35			void				SetIndexCookie(void* cookie)
36									{ fIndexCookie = cookie; }
37			void*				IndexCookie() const
38									{ return fIndexCookie; }
39
40protected:
41			PackageData			fData;
42			String				fName;
43			void*				fIndexCookie;
44			uint32				fType;
45};
46
47
48typedef DoublyLinkedList<PackageNodeAttribute> PackageNodeAttributeList;
49
50
51#endif	// PACKAGE_NODE_ATTRIBUTE_H
52