gwnavruntime/blob/blobregistry.h Source File

blobregistry.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 
8 // primary contact: GUAL - secondary contact: NOBODY
9 #ifndef Navigation_BlobRegistry_H
10 #define Navigation_BlobRegistry_H
11 
12 
16 
17 
18 namespace Kaim
19 {
20 
21 
22 class IBlobCategoryBuilder;
23 class BlobCategory;
24 class IBlobTypeDescriptor;
25 
26 
27 class BlobNameSpace
28 {
29  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_BaseSystem)
30 
31 public:
32  BlobNameSpace(KyUInt32 nameSpaceEnum, KyUInt32 categoryCount);
33  ~BlobNameSpace();
34 
35  void AddCategory(IBlobCategoryBuilder* categoryBuilder);
36 
37  BlobCategory* GetCategory(KyUInt32 categoryEnum) { return m_categories[categoryEnum]; }
38 
39  IBlobTypeDescriptor* GetDescriptor(KyUInt32 blobTypeId, bool warnIfUnknown = true);
40 
41 public:
42  KyUInt32 m_nameSpaceEnum;
43  KyArray<BlobCategory*, MemStat_BaseSystem> m_categories;
44 };
45 
46 
47 class BlobRegistry
48 {
49  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_BaseSystem)
50 
51 public:
52  static void Init();
53  static void Destroy();
54 
55  static void AddCategory(IBlobCategoryBuilder* categoryBuilder);
56  static IBlobTypeDescriptor* GetDescriptor(KyUInt32 blobTypeId, bool warnIfUnknown = true);
57 
58 public:
59  static BlobNameSpace* GetNameSpace(KyUInt32 nameSpaceEnum);
60  static BlobNameSpace* GetOrCreateNameSpace(KyUInt32 nameSpaceEnum, KyUInt32 categoryCount);
61  static BlobRegistry* s_instance;
62 
63  ~BlobRegistry();
64 
65  KyArray<BlobNameSpace*, MemStat_BaseSystem> m_nameSpaces;
66 };
67 
68 
69 }
70 
71 
72 #endif
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36