gwnavruntime/visualdebug/messages/loadedfilesblob.h Source File

loadedfilesblob.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 LabEngine_LoadedFilesBlob_H
8 #define LabEngine_LoadedFilesBlob_H
9 
10 
16 
17 namespace Kaim
18 {
19 
20 class LoadedFilesBlob
21 {
22  KY_ROOT_BLOB_CLASS(VisualDebugMessage, LoadedFilesBlob, 1)
23 
24 public:
25  LoadedFilesBlob() {}
26 
27  BlobArray<BlobArray<char> > m_fileNames;
28 };
29 
30 inline void SwapEndianness(Endianness::Target e, LoadedFilesBlob& self)
31 {
32  SwapEndianness(e, self.m_fileNames);
33 }
34 
35 class LoadedFilesBlobBuilder : public BaseBlobBuilder<LoadedFilesBlob>
36 {
37  KY_CLASS_WITHOUT_COPY(LoadedFilesBlobBuilder)
38 public:
39  LoadedFilesBlobBuilder(const KyArray<String>& fileNames) : m_fileNames(fileNames)
40  {}
41 
42  ~LoadedFilesBlobBuilder() {}
43 
44  virtual void DoBuild()
45  {
46  KyUInt32 filenamesCount = m_fileNames.GetCount();
47  BlobArray<char>* filenames = BLOB_ARRAY(m_blob->m_fileNames, filenamesCount);
48  for (KyUInt32 filenameIdx = 0; filenameIdx < filenamesCount; ++filenameIdx)
49  {
50  BLOB_STRING(filenames[filenameIdx], m_fileNames[filenameIdx].ToCStr());
51  }
52  }
53 
54  const KyArray<String> m_fileNames;
55 };
56 
57 }
58 
59 #endif
#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
LoadedFilesBlob * 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
#define BLOB_ARRAY(blobArray, count)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:147
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36