gwnavruntime/queries/blobs/timeslicedqueryinfoblob.h Source File

timeslicedqueryinfoblob.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 Navigation_TimeSlicedQueryInfoBlob_H
9 #define Navigation_TimeSlicedQueryInfoBlob_H
10 
14 
15 namespace Kaim
16 {
17 
18 class TimeSlicedQueryInfoBlob
19 {
20  KY_DEFINE_NEW_DELETE_OPERATORS(Stat_Default_Mem)
21 public:
22  TimeSlicedQueryInfoBlob() :
23  m_advanceCount(0),
24  m_lastAdvanceFrameIdx(0)
25  {}
26 
27  KyUInt32 m_advanceCount;
28  KyUInt32 m_lastAdvanceFrameIdx;
29 };
30 inline void SwapEndianness(Endianness::Target e, TimeSlicedQueryInfoBlob& self)
31 {
32  SwapEndianness(e, self.m_advanceCount );
33  SwapEndianness(e, self.m_lastAdvanceFrameIdx );
34 }
35 
36 class TimeSlicedQueryBlobBuilder : public BaseBlobBuilder<TimeSlicedQueryInfoBlob>
37 {
38 public:
39  TimeSlicedQueryBlobBuilder(ITimeSlicedQuery* query) { m_query = query; }
40  virtual void DoBuild()
41  {
42  BLOB_SET(m_blob->m_advanceCount , m_query->m_advanceCount );
43  BLOB_SET(m_blob->m_lastAdvanceFrameIdx , m_query->m_lastAdvanceFrameIdx );
44  }
45 
46 private:
47  ITimeSlicedQuery* m_query;
48 };
49 }
50 
51 #endif // Navigation_TimeSlicedQueryInfoBlob_H
#define BLOB_SET(blob, value)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:136
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:35
TimeSlicedQueryInfoBlob * 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
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36