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/SinglyLinkedList.h> 10 11 #include "PackageData.h" 12 13 #include "String.h" 14 15 16 class PackageNode; 17 18 19 class PackageNodeAttribute final 20 : public SinglyLinkedListLinkImpl<PackageNodeAttribute> { 21 public: 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 40 protected: 41 String fName; 42 void* fIndexCookie; 43 PackageData fData; 44 uint32 fType; 45 }; 46 47 48 typedef SinglyLinkedList<PackageNodeAttribute> PackageNodeAttributeList; 49 50 51 #endif // PACKAGE_NODE_ATTRIBUTE_H 52