gwnavruntime/visualdebug/messages/textualcommandblob.h Source File

textualcommandblob.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 
8 #pragma once
9 
10 
15 
16 namespace Kaim
17 {
18 
19 class TextualCommandBlob
20 {
21  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_VisualDebug)
22  KY_ROOT_BLOB_CLASS(VisualDebugMessage, TextualCommandBlob, 0)
23 
24 public:
25  Kaim::BlobArray<char> m_command;
26 };
27 
28 inline void SwapEndianness(Kaim::Endianness::Target e, TextualCommandBlob& self)
29 {
30  SwapEndianness(e, self.m_command);
31 }
32 
33 
34 class TextualCommandBlobBuilder : public Kaim::BaseBlobBuilder<TextualCommandBlob>
35 {
36  KY_CLASS_WITHOUT_COPY(TextualCommandBlobBuilder)
37 public:
38  TextualCommandBlobBuilder(const Kaim::String& command) : m_command(command) {}
39 
40  virtual void DoBuild()
41  {
42  BLOB_STRING(m_blob->m_command, m_command.ToCStr());
43  }
44 
45 private:
46  const Kaim::String m_command;
47 };
48 
49 
50 }
51 
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:196
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
#define BLOB_STRING(str, src)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:166
BaseBlobBuilder is an abstract base class that builds a blob within a contiguous block of memory...
Definition: baseblobbuilder.h:27