gwnavruntime/blob/blobtypes.h Source File
Go to the documentation of this file.
9 #ifndef Navigation_BlobTypes_H
10 #define Navigation_BlobTypes_H
31 enum NavigationCategories
34 Blob_Navigation_NavData = 0,
35 Blob_Navigation_Runtime = 1,
36 Blob_Navigation_VisualDebug = 2,
37 Blob_Navigation_VisualDebugMessage = 3,
38 Blob_Navigation_Generator = 4,
39 Blob_Navigation_Aggregate = 5,
40 Blob_Navigation_Query = 6,
41 Blob_Navigation_CollisionData = 7,
50 static KyUInt32 GetMask() {
return 0xFF; }
51 static KyUInt32 GetCategoryBitShift() {
return 8; }
52 static KyUInt32 GetNameSpaceBitShift() {
return 16; }
55 static KyUInt32 GetBlobEnum(
KyUInt32 blobTypeId) {
return blobTypeId & GetMask(); }
56 static KyUInt32 GetCategoryEnum(
KyUInt32 blobTypeId) {
return (blobTypeId >> GetCategoryBitShift() ) & GetMask(); }
57 static KyUInt32 GetNameSpaceEnum(
KyUInt32 blobTypeId) {
return (blobTypeId >> GetNameSpaceBitShift()) & GetMask(); }
62 return (nameSpaceEnum << GetNameSpaceBitShift()) | (categoryEnum << GetCategoryBitShift()) | blobEnum;
67 return BuildBlobTypeId(nameSpaceEnum, categoryEnum, 0);
72 return BuildBlobTypeId(nameSpaceEnum, 0, 0);
75 static KyUInt32 GetCategoryId(
KyUInt32 blobTypeId) {
return blobTypeId & 0x00FFFF00; }
76 static KyUInt32 GetNameSpaceId(
KyUInt32 blobTypeId) {
return blobTypeId & 0x00FF0000; }
79 #define KY_NAMESPACE_ROOT_BLOB_CLASS(blob_namespace, blob_category, blob_class_name, blob_version) \
81 static KyUInt32 GetBlobTypeId() \
83 return Kaim::BlobTypeIdUtils::BuildBlobTypeId( \
84 Kaim::Blob_##blob_namespace, \
85 Blob_##blob_namespace##_##blob_category, \
86 Blob_##blob_namespace##_##blob_category##_##blob_class_name); \
88 static const char* GetBlobTypeName() { return #blob_class_name; } \
89 static KyUInt32 GetBlobTypeVersion() { return blob_version; } \
93 #define KY_ROOT_BLOB_CLASS(blob_category, blob_class_name, blob_version) \
94 KY_NAMESPACE_ROOT_BLOB_CLASS(Navigation, blob_category, blob_class_name, blob_version)
Definition: gamekitcrowddispersion.h:20
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36