gwnavruntime/blob/blobref.h Source File
Go to the documentation of this file.
10 #ifndef Navigation_BlobRef_H
11 #define Navigation_BlobRef_H
28 KY_INLINE BlobRefImpl() : m_shallowBlobSize(0), m_offset(0) {}
30 KY_INLINE
void* Ptr()
const
32 if (m_shallowBlobSize == 0)
35 return (
void*)((
char*)&m_offset + m_offset);
43 BlobRefImpl& operator=(
const BlobRefImpl& other);
44 BlobRefImpl(
const BlobRefImpl& other);
60 KY_INLINE T* Ptr()
const {
return (T*)m_impl.Ptr(); }
62 KY_INLINE
KyUInt32 ShallowBlobSize()
const {
return m_impl.m_shallowBlobSize; }
67 BlobRef& operator=(
const BlobRef& blobRef);
68 BlobRef(
const BlobRef& blobRef);
80 SwapEndianness(e,
self.m_impl.m_shallowBlobSize);
81 SwapEndianness(e,
self.m_impl.m_offset);
83 if (
self.m_impl.m_shallowBlobSize != 0)
84 SwapEndianness(e, *
self.Ptr());
89 KyUInt32 shallowBlobSize =
self.m_impl.m_shallowBlobSize;
90 T* value =
self.Ptr();
92 SwapEndianness(e,
self.m_impl.m_shallowBlobSize);
93 SwapEndianness(e,
self.m_impl.m_offset);
95 if (shallowBlobSize != 0)
96 SwapEndianness(e, *value);
The same endianness type as the current platform.
Definition: endianness.h:37
int KyInt32
Type used internally to represent a 32-bit integer.
Definition: types.h:35
#define KY_NULL
Null value.
Definition: types.h:247
A BlobRef is a type of reference that is compatible with the blob serialization framework.
Definition: blobref.h:58
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:35
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