ScummVM API documentation
variables.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 PHOENIXVR_VARIABLES_H
23
#define PHOENIXVR_VARIABLES_H
24
25
#include "common/hash-str.h"
26
#include "common/hashmap.h"
27
#include "common/list.h"
28
29
namespace
PhoenixVR
{
30
31
class
Variables
{
32
Common::Array<Common::String>
_variableTxt;
33
Common::Array<int>
_variableSnapshot;
34
Common::List<int>
_variableValues;
35
Common::HashMap<Common::String, int *, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo>
_variableIndex;
36
37
public
:
38
void
loadVariableTxt();
39
void
save();
40
void
load();
41
42
Common::List<int>
&values() {
return
_variableValues; }
43
const
Common::List<int>
&values()
const
{
return
_variableValues; }
44
45
int
get
(
const
Common::String
&name)
const
;
46
void
set
(
const
Common::String
&name,
int
value);
47
void
declare(
const
Common::String
&name);
48
bool
declared(
const
Common::String
&name)
const
{
49
return
_variableIndex.
contains
(name);
50
}
51
void
clear();
52
};
53
54
}
// namespace PhoenixVR
55
56
#endif
Common::String
Definition:
str.h:59
Common::Array< Common::String >
Common::List< int >
PhoenixVR
Definition:
angle.h:33
Common::HashMap< Common::String, int *, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo >
Common::HashMap::contains
bool contains(const Key &key) const
Definition:
hashmap.h:598
PhoenixVR::Variables
Definition:
variables.h:31
engines
phoenixvr
variables.h
Generated on Sat Jul 25 2026 09:11:22 for ScummVM API documentation by
1.8.13