2017-11-05 17:49:28 +00:00
|
|
|
//
|
|
|
|
// MachineForTarget.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 04/11/2017.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2017 Thomas Harte. All rights reserved.
|
2017-11-05 17:49:28 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef MachineForTarget_hpp
|
|
|
|
#define MachineForTarget_hpp
|
|
|
|
|
2018-01-25 02:48:44 +00:00
|
|
|
#include "../../Analyser/Static/StaticAnalyser.hpp"
|
2017-11-05 17:49:28 +00:00
|
|
|
|
2018-01-30 02:49:49 +00:00
|
|
|
#include "../DynamicMachine.hpp"
|
2017-11-05 17:49:28 +00:00
|
|
|
|
2017-11-21 02:55:32 +00:00
|
|
|
#include <map>
|
2017-11-06 01:12:01 +00:00
|
|
|
#include <string>
|
2018-01-24 03:18:16 +00:00
|
|
|
#include <vector>
|
2017-11-06 01:12:01 +00:00
|
|
|
|
2017-11-05 17:49:28 +00:00
|
|
|
namespace Machine {
|
|
|
|
|
2018-01-25 23:28:19 +00:00
|
|
|
enum class Error {
|
|
|
|
None,
|
2018-07-11 00:00:46 +00:00
|
|
|
UnknownError,
|
2018-01-25 23:28:19 +00:00
|
|
|
UnknownMachine,
|
2018-01-29 03:22:21 +00:00
|
|
|
MissingROM,
|
|
|
|
NoTargets
|
2018-01-25 23:28:19 +00:00
|
|
|
};
|
|
|
|
|
2017-11-05 17:49:28 +00:00
|
|
|
/*!
|
|
|
|
Allocates an instance of DynamicMachine holding a machine that can
|
2018-01-24 03:18:16 +00:00
|
|
|
receive the supplied static analyser result. The machine has been allocated
|
|
|
|
on the heap. It is the caller's responsibility to delete the class when finished.
|
2017-11-05 17:49:28 +00:00
|
|
|
*/
|
2018-04-14 23:46:38 +00:00
|
|
|
DynamicMachine *MachineForTargets(const Analyser::Static::TargetList &targets, const ::ROMMachine::ROMFetcher &rom_fetcher, Error &error);
|
2017-11-05 17:49:28 +00:00
|
|
|
|
2017-11-06 01:12:01 +00:00
|
|
|
/*!
|
|
|
|
Returns a short string name for the machine identified by the target,
|
|
|
|
which is guaranteed not to have any spaces or other potentially
|
|
|
|
filesystem-bothering contents.
|
|
|
|
*/
|
2018-01-25 02:48:44 +00:00
|
|
|
std::string ShortNameForTargetMachine(const Analyser::Machine target);
|
2017-11-21 02:55:32 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
Returns a long string name for the machine identified by the target,
|
|
|
|
usable for presentation to a human.
|
|
|
|
*/
|
2018-01-25 02:48:44 +00:00
|
|
|
std::string LongNameForTargetMachine(const Analyser::Machine target);
|
2017-11-21 02:55:32 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
Returns a map from machine name to the list of options that machine
|
|
|
|
exposes, for all machines.
|
|
|
|
*/
|
|
|
|
std::map<std::string, std::vector<std::unique_ptr<Configurable::Option>>> AllOptionsByMachineName();
|
2017-11-06 01:12:01 +00:00
|
|
|
|
2017-11-05 17:49:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* MachineForTarget_hpp */
|