ScummVM API documentation
side_effect.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 PINK_SIDE_EFFECT_H
23 #define PINK_SIDE_EFFECT_H
24 
25 #include "pink/utils.h"
26 #include "pink/objects/object.h"
27 
28 namespace Pink {
29 
30 class Actor;
31 
32 class SideEffect : public Object {
33 public:
34  void deserialize(Archive &archive) override = 0;
35  virtual void execute(Actor *actor) = 0;
36 };
37 
38 class SideEffectExit : public SideEffect {
39 public:
40  void deserialize(Archive &archive) override;
41  void toConsole() const override;
42  void execute(Actor *actor) override;
43 
44 private:
45  Common::String _nextModule;
46  Common::String _nextPage;
47 };
48 
50 public:
51  void deserialize(Archive &archive) override;
52  void execute(Actor *actor) override;
53  void toConsole() const override;
54 
55 private:
56  Common::String _location;
57 };
58 
60 public:
61  void deserialize(Archive &archive) override;
62  void execute(Actor *actor) override;
63  void toConsole() const override;
64 
65 private:
66  Common::String _item;
67  Common::String _owner;
68 };
69 
71 public:
72  void deserialize(Archive &archive) override;
73  void execute(Actor *actor) override = 0;
74 
75 protected:
76  Common::String _name;
77  Common::String _value;
78 };
79 
81 public:
82  void toConsole() const override;
83  void execute(Actor *actor) override;
84 };
85 
87 public:
88  void toConsole() const override;
89  void execute(Actor *actor) override;
90 };
91 
93 public:
94  void toConsole() const override;
95  void execute(Actor *actor) override;
96 };
97 
99 public:
100  void deserialize(Archive &archive) override;
101  void toConsole() const override;
102  void execute(Actor *actor) override;
103 
104 private:
105  Common::String _name;
106  StringArray _values;
107 };
108 
109 } // End of namespace Pink
110 
111 #endif
Definition: side_effect.h:80
Definition: archive.h:39
Definition: str.h:59
Definition: side_effect.h:70
Definition: side_effect.h:98
Definition: side_effect.h:32
Definition: side_effect.h:86
Definition: object.h:31
Definition: archive.h:35
Definition: side_effect.h:49
Definition: side_effect.h:38
Definition: actor.h:39
Definition: side_effect.h:59
Definition: side_effect.h:92
Definition: utils.h:41