HoverRace  2.0
StyleEnv.h
Go to the documentation of this file.
1 
2 // StyleEnv.h
3 //
4 // Copyright (c) 2014-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 "RuntimeEnv.h"
25 
26 namespace HoverRace {
27  namespace Client {
28  class Rulebook;
29  }
30  namespace Display {
31  class Display;
32  }
33  namespace Script {
34  class Core;
35  }
36 }
37 
38 namespace HoverRace {
39 namespace Client {
40 namespace HoverScript {
41 
46 class StyleEnv : protected RuntimeEnv {
47  using SUPER = RuntimeEnv;
48 
49 public:
50  StyleEnv(Script::Core &scripting, Display::Display &display,
51  const Util::OS::path_t &basePath);
52  virtual ~StyleEnv() { }
53 
54 public:
55  static void Register(Script::Core &scripting);
56 
57 protected:
58  virtual void InitEnv();
59 
60 public:
61  bool RunStylesheet();
62 
63 private:
66 };
67 
68 } // namespace HoverScript
69 } // namespace Client
70 } // namespace HoverRace
Util::OS::path_t basePath
Definition: StyleEnv.h:65
Limited environment for stylesheets.
Definition: StyleEnv.h:46
boost::filesystem::path path_t
Definition: OS.h:57
Basic restricted environment for potentially untrusted code.
Definition: RuntimeEnv.h:40
A script environment.
Definition: Env.h:54
Base class for display managers.
Definition: Display.h:73
virtual ~StyleEnv()
Definition: StyleEnv.h:52
Display::Display & display
Definition: StyleEnv.h:64
Definition: Announcement.h:24
A script environment.
Definition: Core.h:66