Leviathan  0.8.0.0
Leviathan game engine
AutoUpdateable.h
Go to the documentation of this file.
1 #pragma once
2 // ------------------------------------ //
3 #include "Define.h"
4 // ------------------------------------ //
7 
8 namespace Leviathan{
9 
10 #define AUTOUPDATEABLEOBJECT_SCRIPTPROXIES DLLEXPORT ScriptSafeVariableBlock* GetAndPopFirstUpdatedProxy(){ \
11  return GetAndPopFirstUpdated(); };
12 
14  public:
17 
18  DLLEXPORT virtual void StartMonitoring(
19  const std::vector<VariableBlock*> &IndexesAndNamesToListen);
20 
21  DLLEXPORT virtual void StopMonitoring(
22  std::vector<std::shared_ptr<VariableBlock>> &unregisterindexandnames, bool all = false);
23 
24  DLLEXPORT virtual bool OnUpdate(const std::shared_ptr<NamedVariableList> &updated);
25 
26 
27 
28  protected:
29 
30  DLLEXPORT void _PopUdated();
31 
32  // -------------------------- //
33  std::vector<std::shared_ptr<VariableBlock>> MonitoredValues;
34 
35 
37  std::vector<std::shared_ptr<NamedVariableList>> UpdatedValues;
38  };
39 
40 }
41 
virtual DLLEXPORT ~AutoUpdateableObject()
virtual DLLEXPORT bool OnUpdate(const std::shared_ptr< NamedVariableList > &updated)
std::vector< std::shared_ptr< VariableBlock > > MonitoredValues
virtual DLLEXPORT void StopMonitoring(std::vector< std::shared_ptr< VariableBlock >> &unregisterindexandnames, bool all=false)
std::vector< std::shared_ptr< NamedVariableList > > UpdatedValues
virtual DLLEXPORT void StartMonitoring(const std::vector< VariableBlock * > &IndexesAndNamesToListen)
#define DLLEXPORT
Definition: Include.h:84
The access mask controls which registered functions and classes a script sees.
Definition: GameModule.h:12