gwnavruntime/visualdebug/messages/textualcommandblob.h Source File

textualcommandblob.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 #ifndef LabEngine_TextualCommandBlob_H
9 #define LabEngine_TextualCommandBlob_H
10 
11 
16 
17 namespace Kaim
18 {
19 
20 class TextualCommandBlob
21 {
22  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_VisualDebug)
23  KY_ROOT_BLOB_CLASS(VisualDebugMessage, TextualCommandBlob, 0)
24 
25 public:
26  TextualCommandBlob()
27  : m_command()
28  {}
29 
30  ~TextualCommandBlob() {}
31 
32 public:
33  Kaim::BlobArray<char> m_command;
34 };
35 
36 inline void SwapEndianness(Kaim::Endianness::Target e, TextualCommandBlob& self)
37 {
38  SwapEndianness(e, self.m_command);
39 }
40 
41 
42 class TextualCommandBlobBuilder : public Kaim::BaseBlobBuilder<TextualCommandBlob>
43 {
44  KY_CLASS_WITHOUT_COPY(TextualCommandBlobBuilder)
45 public:
46  TextualCommandBlobBuilder(Kaim::String& command) : m_command(command)
47  {}
48 
49  ~TextualCommandBlobBuilder() {}
50 
51  virtual void DoBuild()
52  {
53  BLOB_STRING(m_blob->m_command, m_command.ToCStr());
54  }
55 
56  const Kaim::String m_command;
57 };
58 
59 
60 }
61 
62 #endif // LabEngine_TextualCommandBlob_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
TextualCommandBlob * 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 KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
#define BLOB_STRING(str, src)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:179
BaseBlobBuilder is an abstract base class that builds a blob within a contiguous block of memory...
Definition: baseblobbuilder.h:30