ScummVM API documentation
pierian.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef MTROPOLIS_PLUGIN_PIERIAN_H
23 #define MTROPOLIS_PLUGIN_PIERIAN_H
24 
25 #include "mtropolis/modifiers.h"
26 #include "mtropolis/modifier_factory.h"
27 #include "mtropolis/runtime.h"
28 #include "mtropolis/plugin/pierian_data.h"
29 
30 namespace MTropolis {
31 
32 namespace Pierian {
33 
34 class FlattenModifier : public Modifier {
35 public:
37  ~FlattenModifier();
38 
39  bool load(const PlugInModifierLoaderContext &context, const Data::Pierian::FlattenModifier &data);
40 
41  bool respondsToEvent(const Event &evt) const override;
42  VThreadState consumeMessage(Runtime *runtime, const Common::SharedPtr<MessageProperties> &msg) override;
43 
44  void disable(Runtime *runtime) override;
45 
46 #ifdef MTROPOLIS_DEBUG_ENABLE
47  const char *debugGetTypeName() const override { return "Flatten Modifier"; }
48  void debugInspect(IDebugInspectionReport *report) const override;
49 #endif
50 
51 private:
52  Common::SharedPtr<Modifier> shallowClone() const override;
53  const char *getDefaultName() const override;
54 };
55 
56 class SaveFileModifier : public Modifier {
57 public:
60 
61  bool load(const PlugInModifierLoaderContext &context, const Data::Pierian::SaveFileModifier &data);
62 
63  bool respondsToEvent(const Event &evt) const override;
64  VThreadState consumeMessage(Runtime *runtime, const Common::SharedPtr<MessageProperties> &msg) override;
65 
66  void disable(Runtime *runtime) override;
67 
68 #ifdef MTROPOLIS_DEBUG_ENABLE
69  const char *debugGetTypeName() const override { return "SaveFile Modifier"; }
70  void debugInspect(IDebugInspectionReport *report) const override;
71 #endif
72 
73 private:
74  Common::SharedPtr<Modifier> shallowClone() const override;
75  const char *getDefaultName() const override;
76 };
77 
78 class WasteModifier : public Modifier {
79 public:
80  WasteModifier();
81  ~WasteModifier();
82 
83  bool load(const PlugInModifierLoaderContext &context, const Data::Pierian::WasteModifier &data);
84 
85  bool respondsToEvent(const Event &evt) const override;
86  VThreadState consumeMessage(Runtime *runtime, const Common::SharedPtr<MessageProperties> &msg) override;
87 
88  void disable(Runtime *runtime) override;
89 
90 #ifdef MTROPOLIS_DEBUG_ENABLE
91  const char *debugGetTypeName() const override { return "Waste Modifier"; }
92  void debugInspect(IDebugInspectionReport *report) const override;
93 #endif
94 
95 private:
96  Common::SharedPtr<Modifier> shallowClone() const override;
97  const char *getDefaultName() const override;
98 };
99 
101 public:
102  PierianPlugIn();
103  ~PierianPlugIn();
104 
105  void registerModifiers(IPlugInModifierRegistrar *registrar) const override;
106 
107 private:
111 };
112 
113 } // End of namespace Pierian
114 
115 } // End of namespace MTropolis
116 
117 #endif
Definition: pierian.h:34
Definition: pierian.h:78
Definition: pierian.h:100
Definition: runtime.h:1575
Definition: runtime.h:1185
Definition: runtime.h:3035
Definition: modifier_factory.h:57
Definition: modifier_factory.h:48
Definition: runtime.h:369
Definition: pierian_data.h:46
Definition: runtime.h:1180
Definition: debug.h:59
Definition: pierian_data.h:40
Definition: actions.h:25
Definition: ptr.h:159
Definition: pierian.h:56
Definition: pierian_data.h:52