ScummVM API documentation
config-params.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 TESTBED_CONFIG_PARAMS_H
23#define TESTBED_CONFIG_PARAMS_H
24
25#include "common/singleton.h"
26#include "common/stream.h"
27#include "graphics/fontman.h"
28
29class TestbedConfigManager;
30
31namespace Testbed {
32
33class ConfigParams : public Common::Singleton<ConfigParams> {
34private:
35 friend class Common::Singleton<SingletonBaseType>;
37
41 Common::Path _logDirectory;
42 Common::String _logFilename;
44
48 Graphics::FontManager::FontUsage _displayFont;
49
54 bool _isInteractive;
55 bool _isGameDataFound;
56#ifdef USE_CLOUD
57 bool _isCloudTestCallbackCalled;
58 bool _isCloudTestErrorCallbackCalled;
59#endif
60 bool _rerunTests;
61 TestbedConfigManager *_testbedConfMan;
62
63public:
64
65 bool isRerunRequired();
66 void setRerunFlag(bool flag) { _rerunTests = flag; }
67
68 bool isSessionInteractive() { return _isInteractive; }
69 void setSessionAsInteractive(bool status) { _isInteractive = status; }
70
71 bool isGameDataFound() { return _isGameDataFound; }
72 void setGameDataFound(bool status) { _isGameDataFound = status; }
73
74#ifdef USE_CLOUD
75 bool isCloudTestCallbackCalled() const { return _isCloudTestCallbackCalled; }
76 void setCloudTestCallbackCalled(bool status) { _isCloudTestCallbackCalled = status; }
77
78 bool isCloudTestErrorCallbackCalled() const { return _isCloudTestErrorCallbackCalled; }
79 void setCloudTestErrorCallbackCalled(bool status) { _isCloudTestErrorCallbackCalled = status; }
80#endif
81
82 TestbedConfigManager *getTestbedConfigManager() { return _testbedConfMan; }
83 void setTestbedConfigManager(TestbedConfigManager* confMan) { _testbedConfMan = confMan; }
84
85 Common::Path &getLogDirectory() { return _logDirectory; }
86 void setLogDirectory(const Common::Path &dirname) { _logDirectory = dirname; }
87 Common::String &getLogFilename() { return _logFilename; }
88 void setLogFilename(const Common::String &filename) { _logFilename = filename; }
89
90 Common::WriteStream *getLogWriteStream() { return _ws; }
91 Graphics::FontManager::FontUsage getCurrentFontUsageType() { return _displayFont; }
92 void setCurrentFontUsageType(Graphics::FontManager::FontUsage f) { _displayFont = f; }
93
97 void initLogging(const Common::Path &dirname, const char *filename, bool enable = true);
98 void initLogging(bool enable = true);
99
100 void deleteWriteStream();
101};
102
104#define ConfParams ConfigParams::instance()
105
106} // End of Namespace Testbed
107
108#endif
Definition: path.h:52
Definition: singleton.h:42
Definition: str.h:59
Definition: stream.h:77
Definition: config-params.h:33
void initLogging(const Common::Path &dirname, const char *filename, bool enable=true)
Definition: config.h:47