gwnavruntime/visualdebug/messages/loadedfilesblob.h Source File

loadedfilesblob.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 #pragma once
8 
9 
15 
16 namespace Kaim
17 {
18 
19 class LoadedFilesBlob
20 {
21  KY_ROOT_BLOB_CLASS(VisualDebugMessage, LoadedFilesBlob, 1)
22 
23 public:
24  LoadedFilesBlob() {}
25 
26  BlobArray<BlobArray<char> > m_fileNames;
27 };
28 
29 inline void SwapEndianness(Endianness::Target e, LoadedFilesBlob& self)
30 {
31  SwapEndianness(e, self.m_fileNames);
32 }
33 
34 class LoadedFilesBlobBuilder : public BaseBlobBuilder<LoadedFilesBlob>
35 {
36  KY_CLASS_WITHOUT_COPY(LoadedFilesBlobBuilder)
37 public:
38  LoadedFilesBlobBuilder(const KyArray<String>& fileNames) : m_fileNames(fileNames)
39  {}
40 
41  ~LoadedFilesBlobBuilder() {}
42 
43  virtual void DoBuild()
44  {
45  KyUInt32 filenamesCount = m_fileNames.GetCount();
46  BlobArray<char>* filenames = BLOB_ARRAY(m_blob->m_fileNames, filenamesCount);
47  for (KyUInt32 filenameIdx = 0; filenameIdx < filenamesCount; ++filenameIdx)
48  {
49  BLOB_STRING(filenames[filenameIdx], m_fileNames[filenameIdx].ToCStr());
50  }
51  }
52 
53  const KyArray<String> m_fileNames;
54 };
55 
56 }
57 
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:196
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:27
LoadedFilesBlob * m_blob
The blob maintained by this builder. Only modify using the macros listed under DoBuild().
Definition: baseblobbuilder.h:113
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
#define BLOB_ARRAY(blobArray, count)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:139