gwnavruntime/visualdebug/messages/framedumpblob.h Source File

framedumpblob.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 
8 // primary contact: BRGR - secondary contact: NOBODY
9 #ifndef Navigation_FrameDumpBlob_H
10 #define Navigation_FrameDumpBlob_H
11 
14 
15 namespace Kaim
16 {
17 
18 class FrameDumpBlob
19 {
20  KY_ROOT_BLOB_CLASS(VisualDebugMessage, FrameDumpBlob, 0)
21 public:
22  FrameDumpBlob() : m_text() {}
23  BlobArray<char> m_text;
24 };
25 
26 inline void SwapEndianness(Endianness::Target e, FrameDumpBlob& self)
27 {
28  SwapEndianness(e, self.m_text);
29 }
30 
31 class FrameDumpBlobBuilder : public BaseBlobBuilder<FrameDumpBlob>
32 {
33  KY_CLASS_WITHOUT_COPY(FrameDumpBlobBuilder)
34 public:
35  FrameDumpBlobBuilder(const char* text, KyUInt32 textSize)
36  : m_text(text)
37  , m_textSize(textSize)
38  {}
39 
40 private:
41  virtual void DoBuild()
42  {
43  BLOB_STRING(m_blob->m_text, m_text);
44  }
45 
46  const char* m_text;
47  KyUInt32 m_textSize;
48 };
49 
50 } // namespace Kaim
51 
52 #endif // Navigation_FrameDumpBlob_H
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:387
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:35
FrameDumpBlob * m_blob
The blob maintained by this builder. Only modify using the macros listed under DoBuild().
Definition: baseblobbuilder.h:117
Definition: gamekitcrowddispersion.h:20
#define BLOB_STRING(str, src)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:179
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36