Leviathan  0.8.0.0
Leviathan game engine
PongMasterServer.h
Go to the documentation of this file.
1 #pragma once
2 // ------------------------------------ //
3 #include "Define.h"
4 // ------------------------------------ //
6 #include "PongMasterNetworking.h"
7 
8 namespace Pong {
9 
11 public:
14 
15  void Tick(float elapsed) override;
16 
17  void CustomizeEnginePostLoad() override;
18  void EnginePreShutdown() override;
19 
20  static std::string GenerateWindowTitle();
21 
22  // customized callbacks //
23  bool InitLoadCustomScriptTypes(asIScriptEngine* engine) override;
24 
25  // Game configuration checkers //
26  static void CheckGameConfigurationVariables(Lock& guard, GameConfiguration* configobj);
27  static void CheckGameKeyConfigVariables(Lock& guard, KeyConfiguration* keyconfigobj);
28 
29 protected:
31  void _ShutdownApplicationPacketHandler() override;
32 
33 protected:
34  std::unique_ptr<PongMasterNetworking> MasterInterface;
35 };
36 
37 } // namespace Pong
void EnginePreShutdown() override
Leviathan::NetworkInterface * _GetApplicationPacketHandler() override
Called in Initialize to get the derived packet handler type.
Definition: PongGame.h:14
bool InitLoadCustomScriptTypes(asIScriptEngine *engine) override
static void CheckGameConfigurationVariables(Lock &guard, GameConfiguration *configobj)
void _ShutdownApplicationPacketHandler() override
static std::string GenerateWindowTitle()
std::unique_ptr< PongMasterNetworking > MasterInterface
void CustomizeEnginePostLoad() override
void Tick(float elapsed) override
static void CheckGameKeyConfigVariables(Lock &guard, KeyConfiguration *keyconfigobj)
Class that encapsulates common networking functionality that is required by all networked programs.
std::unique_lock< std::mutex > Lock
Definition: ThreadSafe.h:18