HoverRace  2.0
SysEnv.h
Go to the documentation of this file.
1 
2 // SysEnv.h
3 //
4 // Copyright (c) 2010, 2013-2016 Michael Imamura.
5 //
6 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // A copy of the license should have been attached to the package from which
10 // you have taken this file. If you can not find the license you can not use
11 // this file.
12 //
13 //
14 // The author makes no representations about the suitability of
15 // this software for any purpose. It is provided "as is" "AS IS",
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17 // implied.
18 //
19 // See the License for the specific language governing permissions
20 // and limitations under the License.
21 
22 #pragma once
23 
24 #include "../../../engine/Script/Env.h"
25 
26 namespace HoverRace {
27  namespace Client {
28  namespace HoverScript {
29  class DebugPeer;
30  class GamePeer;
31  class InputPeer;
32  }
33  }
34  namespace Script {
35  class Core;
36  }
37 }
38 
39 namespace HoverRace {
40 namespace Client {
41 namespace HoverScript {
42 
47 class SysEnv : private Script::Env
48 {
49  using SUPER = Script::Env;
50 
51 public:
52  SysEnv(Script::Core &scripting, DebugPeer &debugPeer,
53  GamePeer &gamePeer, InputPeer &inputPeer);
54  virtual ~SysEnv();
55 
56 protected:
57  void InitEnv() override;
58 
59 protected:
60  virtual void LogInfo(const std::string &s);
61  virtual void LogError(const std::string &s);
62 
63 public:
64  // Expose privately-inherited function.
65  void RunScript(const Util::OS::path_t &filename) { SUPER::RunScript(filename); }
66 
67 private:
72 };
73 
74 } // namespace HoverScript
75 } // namespace Client
76 } // namespace HoverRace
Scripting peer for system-level control of the game.
Definition: GamePeer.h:56
boost::filesystem::path path_t
Definition: OS.h:57
GamePeer & gamePeer
Definition: SysEnv.h:69
outs_t::iterator OutHandle
Definition: Core.h:86
void RunScript(const Util::OS::path_t &filename)
Definition: SysEnv.h:65
A script environment.
Definition: Env.h:54
The global system environment.
Definition: SysEnv.h:47
Provides access to debugging tools.
Definition: DebugPeer.h:50
Scripting peer for input.
Definition: InputPeer.h:45
InputPeer & inputPeer
Definition: SysEnv.h:70
Script::Core::OutHandle outHandle
Definition: SysEnv.h:71
Definition: Announcement.h:24
DebugPeer & debugPeer
Definition: SysEnv.h:68
A script environment.
Definition: Core.h:66