gwnavruntime/queries/blobs/timeslicedqueryinfoblob.h Source File

timeslicedqueryinfoblob.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 
13 
14 namespace Kaim
15 {
16 
17 class TimeSlicedQueryInfoBlob
18 {
19  KY_DEFINE_NEW_DELETE_OPERATORS(Stat_Default_Mem)
20 public:
21  TimeSlicedQueryInfoBlob() :
22  m_advanceCount(0),
23  m_lastAdvanceFrameIdx(0)
24  {}
25 
26  KyUInt32 m_advanceCount;
27  KyUInt32 m_lastAdvanceFrameIdx;
28 };
29 inline void SwapEndianness(Endianness::Target e, TimeSlicedQueryInfoBlob& self)
30 {
31  SwapEndianness(e, self.m_advanceCount );
32  SwapEndianness(e, self.m_lastAdvanceFrameIdx );
33 }
34 
35 class TimeSlicedQueryBlobBuilder : public BaseBlobBuilder<TimeSlicedQueryInfoBlob>
36 {
37 public:
38  TimeSlicedQueryBlobBuilder(ITimeSlicedQuery* query) { m_query = query; }
39  virtual void DoBuild()
40  {
41  BLOB_SET(m_blob->m_advanceCount , m_query->m_advanceCount );
42  BLOB_SET(m_blob->m_lastAdvanceFrameIdx , m_query->m_lastAdvanceFrameIdx );
43  }
44 
45 private:
46  ITimeSlicedQuery* m_query;
47 };
48 }
49 
#define BLOB_SET(blob, value)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:130
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:27
TimeSlicedQueryInfoBlob * 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