gwnavruntime/database/idatabasechangebroadcaster.h Source File

idatabasechangebroadcaster.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 
14 
15 namespace Kaim
16 {
17 
18 class Database;
19 class NavData;
20 class DatabaseChange;
21 
22 
23 class IDatabaseChangeBroadcaster : public RefCountBase<IDatabaseChangeBroadcaster, Stat_Default_Mem>
24 {
25  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_WorldFwk)
26  KY_CLASS_WITHOUT_COPY(IDatabaseChangeBroadcaster)
27 public:
28  IDatabaseChangeBroadcaster(Database* database = nullptr) : m_database(database) {}
29  void SetDatabase(Database* database) { m_database = database; }
30  virtual void BroadCastChangeInDatabase(const DatabaseChange& databaseChange) = 0;
31 public:
32  Database* m_database;
33 };
34 
35 
36 
37 class DefaultDatabaseChangeBroadcaster : public IDatabaseChangeBroadcaster
38 {
39 public:
40  DefaultDatabaseChangeBroadcaster(Database* database) : IDatabaseChangeBroadcaster(database) {}
41  virtual void BroadCastChangeInDatabase(const DatabaseChange& databaseChange);
42 
43 protected:
44  bool HasSomeNavGraphEdge(const KyArray<Ptr<NavData> >& navDatas);
45 };
46 
47 
48 } // namespace Kaim
49 
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:196
#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