gwnavruntime/containers/bitfieldblob.h Source File

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