ScummVM API documentation
condition.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_CONDITION_H
23
#define PINK_CONDITION_H
24
25
#include "pink/objects/object.h"
26
27
namespace
Pink
{
28
29
class
Actor;
30
31
class
Condition
:
public
Object
{
32
public
:
33
void
deserialize(
Archive
&archive)
override
= 0;
34
virtual
bool
evaluate(
const
Actor
*actor)
const
= 0;
35
};
36
37
class
ConditionVariable
:
public
Condition
{
38
public
:
39
40
void
deserialize(
Archive
&archive)
override
;
41
bool
evaluate(
const
Actor
*actor)
const override
= 0;
42
43
protected
:
44
Common::String
_name;
45
Common::String
_value;
46
};
47
48
class
ConditionGameVariable
:
public
ConditionVariable
{
49
public
:
50
void
toConsole()
const override
;
51
bool
evaluate(
const
Actor
*actor)
const override
;
52
};
53
54
/*
55
* It is not used in games and has evaluate method with infinity recursion
56
class ConditionNotGameVariable : public ConditionGameVariable {
57
virtual bool evaluate(LeadActor *leadActor);
58
};
59
*/
60
61
class
ConditionModuleVariable
:
public
ConditionVariable
{
62
public
:
63
void
toConsole()
const override
;
64
bool
evaluate(
const
Actor
*actor)
const override
;
65
};
66
67
class
ConditionNotModuleVariable
:
public
ConditionModuleVariable
{
68
public
:
69
void
toConsole()
const override
;
70
bool
evaluate(
const
Actor
*actor)
const override
;
71
};
72
73
class
ConditionPageVariable
:
public
ConditionVariable
{
74
public
:
75
void
toConsole()
const override
;
76
bool
evaluate(
const
Actor
*actor)
const override
;
77
};
78
79
class
ConditionNotPageVariable
:
public
ConditionPageVariable
{
80
public
:
81
void
toConsole()
const override
;
82
bool
evaluate(
const
Actor
*actor)
const override
;
83
};
84
85
class
ConditionInventoryItemOwner
:
public
Condition
{
86
public
:
87
void
toConsole()
const override
;
88
void
deserialize(
Archive
&archive)
override
;
89
bool
evaluate(
const
Actor
*actor)
const override
;
90
91
protected
:
92
Common::String
_item;
93
Common::String
_owner;
94
};
95
96
class
ConditionNotInventoryItemOwner
:
public
ConditionInventoryItemOwner
{
97
public
:
98
void
toConsole()
const override
;
99
bool
evaluate(
const
Actor
*actor)
const override
;
100
};
101
102
}
// End of namespace Pink
103
104
#endif
Pink::Archive
Definition:
archive.h:39
Common::String
Definition:
str.h:59
Pink::ConditionGameVariable
Definition:
condition.h:48
Pink::ConditionInventoryItemOwner
Definition:
condition.h:85
Pink::Object
Definition:
object.h:31
Pink
Definition:
archive.h:35
Pink::ConditionVariable
Definition:
condition.h:37
Pink::Condition
Definition:
condition.h:31
Pink::ConditionNotPageVariable
Definition:
condition.h:79
Pink::ConditionModuleVariable
Definition:
condition.h:61
Pink::ConditionNotModuleVariable
Definition:
condition.h:67
Pink::ConditionPageVariable
Definition:
condition.h:73
Pink::Actor
Definition:
actor.h:39
Pink::ConditionNotInventoryItemOwner
Definition:
condition.h:96
engines
pink
objects
condition.h
Generated on Fri Nov 22 2024 09:23:01 for ScummVM API documentation by
1.8.13