gwnavruntime/abstractgraph/identifiers/loadedabstractgraphnodeidx.h Source File

loadedabstractgraphnodeidx.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 Navigation_LoadedAbstractGraphNodeIdx_H
8 #define Navigation_LoadedAbstractGraphNodeIdx_H
9 
11 
12 namespace Kaim
13 {
14 
15 
16 class LoadedAbstractGraphNodeIdx
17 {
18  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_NavData)
19 public:
20  LoadedAbstractGraphNodeIdx() { Invalidate(); }
21  LoadedAbstractGraphNodeIdx(AbstractGraphIdx abstractGraphInGridIdx, AbstractGraphNodeIdx nodeIdx) { Set(abstractGraphInGridIdx, nodeIdx); }
22 
23  bool IsValid() const { return m_abstractGraphInGridIdx < AbstractGraphIdx_Invalid && m_nodeIdx < AbstractGraphNodeIdx_Invalid; }
24  void Invalidate()
25  {
26  m_abstractGraphInGridIdx = AbstractGraphIdx_Invalid;
27  m_nodeIdx = AbstractGraphNodeIdx_Invalid;
28  }
29 
30  void Set(AbstractGraphIdx abstractGraphInGridIdx, AbstractGraphNodeIdx nodeIdx)
31  {
32  m_abstractGraphInGridIdx = abstractGraphInGridIdx;
33  m_nodeIdx = nodeIdx;
34  }
35 
36 public:
37  AbstractGraphIdx m_abstractGraphInGridIdx;
38  AbstractGraphNodeIdx m_nodeIdx;
39 };
40 
41 }
42 
43 #endif
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137