gwnavruntime/abstractgraph/identifiers/loadedabstractgraphnodeidx.h Source File

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