gwnavruntime/containers/bitfieldblob.h Source File

bitfieldblob.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 #pragma once
8 
13 
14 namespace Kaim
15 {
16 
17 class BitFieldBlob
18 {
19 public:
20  BitFieldBlob() {}
21 
22  KY_INLINE KyUInt32 GetBitCount() const { return m_bitsCount; }
23  KY_INLINE bool IsBitSet(KyUInt32 bitIndex) const { return BitFieldUtils::IsBitSet(m_words.GetValues() , bitIndex); }
24 public:
25  KyUInt32 m_bitsCount;
26  BlobArray<KyUInt32> m_words;
27 };
28 
29 inline void SwapEndianness(Endianness::Target e, BitFieldBlob& self)
30 {
31  SwapEndianness(e, self.m_bitsCount);
32  SwapEndianness(e, self.m_words);
33 }
34 
35 class BitFieldBase;
36 class BitFieldBlobBuilder : public BaseBlobBuilder<BitFieldBlob>
37 {
38 public:
39  BitFieldBlobBuilder(BitFieldBase* bitField) : m_bitField(bitField) {}
40 
41  virtual void DoBuild();
42 
43 public:
44  BitFieldBase* m_bitField;
45 };
46 
47 } // Kaim
48 
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:27
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17