gwnavruntime/blob/iblobtypedescriptor.h Source File

iblobtypedescriptor.h
Go to the documentation of this file.
1 /*
2 * Copyright 2016 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 #pragma once
9 
10 
14 
15 
16 namespace Kaim
17 {
18 
19 class BaseBlobHandler;
20 
21 class IBlobTypeDescriptor : public RefCountBaseNTS<IBlobTypeDescriptor, Stat_Default_Mem>
22 {
23  KY_CLASS_WITHOUT_COPY(IBlobTypeDescriptor)
24 
25 public:
26  IBlobTypeDescriptor() {}
27  virtual ~IBlobTypeDescriptor() {}
28  virtual KyUInt32 GetBlobTypeId() const = 0;
29  virtual const char* GetBlobTypeName() const = 0;
30  virtual KyUInt32 GetBlobTypeVersion() const = 0;
31  virtual void DoSwapEndianness(Endianness::Target e, void* blob) const = 0;
32  virtual IBlobTypeDescriptor* CreateBlobTypeDescriptor(int memStat = Stat_Default_Mem) const = 0;
33  virtual BaseBlobHandler* CreateBlobHandler(int memStat = Stat_Default_Mem) const = 0;
34 };
35 
36 
37 template <class T>
38 bool BlobIsa(const IBlobTypeDescriptor& descriptor)
39 {
40  return descriptor.GetBlobTypeId() == T::GetBlobTypeId();
41 }
42 
43 
44 }
45 
46 
47 
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:196
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:27
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17