1//============================================================================
2//
3// SSSS tt lll lll
4// SS SS tt ll ll
5// SS tttttt eeee ll ll aaaa
6// SSSS tt ee ee ll ll aa
7// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
8// SS SS tt ee ll ll aa aa
9// SSSS ttt eeeee llll llll aaaaa
10//
11// Copyright (c) 1995-2019 by Bradford W. Mott, Stephen Anthony
12// and the Stella Team
13//
14// See the file "License.txt" for information on usage and redistribution of
15// this file, and for a DISCLAIMER OF ALL WARRANTIES.
16//============================================================================
17
18#ifndef PROFILING_RUNNER
19#define PROFILING_RUNNER
20
21class Control;
22class Switches;
23
24#include "bspf.hxx"
25#include "Settings.hxx"
26#include "ConsoleIO.hxx"
27#include "Props.hxx"
28
29class ProfilingRunner {
30 public:
31
32 ProfilingRunner(int argc, char* argv[]);
33
34 bool run();
35
36 private:
37
38 struct ProfilingRun {
39 string romFile;
40 uInt32 runtime;
41 };
42
43 struct IO: public ConsoleIO {
44 Controller& leftController() const override { return *myLeftControl; }
45 Controller& rightController() const override { return *myRightControl; }
46 Switches& switches() const override { return *mySwitches; }
47
48 unique_ptr<Controller> myLeftControl;
49 unique_ptr<Controller> myRightControl;
50 unique_ptr<Switches> mySwitches;
51 };
52
53 private:
54
55 bool runOne(const ProfilingRun run);
56
57 private:
58
59 vector<ProfilingRun> profilingRuns;
60
61 Settings mySettings;
62
63 Properties myProps;
64};
65
66#endif // PROFILING_RUNNER
67