ScummVM API documentation
testbed.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_TESTBED_H
23 #define TESTBED_TESTBED_H
24 
25 #include "common/array.h"
26 
27 #include "engines/engine.h"
28 
29 #include "testbed/config.h"
30 #include "testbed/testsuite.h"
31 
32 namespace Testbed {
33 
34 class TestbedConfigManager;
35 
36 enum {
37  kTestbedLogOutput = 1 << 0,
38  kTestbedEngineDebug = 1 << 2,
39  kCmdRerunTestbed = 'crtb'
40 };
41 
42 class TestbedEngine : public Engine {
43 public:
44  TestbedEngine(OSystem *syst);
45  ~TestbedEngine() override;
46 
47  Common::Error run() override;
48 
52  static void pushTestsuites(Common::Array<Testsuite *> &testsuiteList);
53 
58 
59  bool hasFeature(EngineFeature f) const override;
60 
61 private:
62  void checkForAllAchievements();
63 
64  Common::Array<Testsuite *> _testsuiteList;
65 };
66 
68 public:
69  TestbedExitDialog(Common::Array<Testsuite *> &testsuiteList) : TestbedInteractionDialog(80, 40, 500, 330),
70  _testsuiteList(testsuiteList) {}
71  ~TestbedExitDialog() override {}
72  void init();
73  void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
74  void run() { runModal(); }
75 private:
76  Common::Array<Testsuite *> &_testsuiteList;
77 };
78 
79 } // End of namespace Testbed
80 
81 #endif // TESTBED_TESTBED_H
Definition: config.h:47
EngineFeature
Definition: engine.h:250
Definition: error.h:84
Definition: array.h:52
Definition: cloud.h:30
Definition: config.h:90
Definition: testbed.h:42
bool hasFeature(EngineFeature f) const override
void invokeTestsuites(TestbedConfigManager &cfMan)
Definition: system.h:167
Common::Error run() override
Definition: engine.h:143
Definition: testbed.h:67
Definition: object.h:40
static void pushTestsuites(Common::Array< Testsuite *> &testsuiteList)