2017-11-18 04:02:00 +00:00
|
|
|
//
|
|
|
|
// Configurable.h
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 17/11/2017.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2017 Thomas Harte. All rights reserved.
|
2017-11-18 04:02:00 +00:00
|
|
|
//
|
|
|
|
|
2024-01-17 04:34:46 +00:00
|
|
|
#pragma once
|
2017-11-18 04:02:00 +00:00
|
|
|
|
2020-03-20 03:24:06 +00:00
|
|
|
#include "../Reflection/Struct.hpp"
|
2017-11-18 04:02:00 +00:00
|
|
|
|
2020-03-16 03:52:24 +00:00
|
|
|
#include <memory>
|
|
|
|
|
2017-11-18 04:02:00 +00:00
|
|
|
namespace Configurable {
|
|
|
|
|
|
|
|
/*!
|
2020-03-16 03:48:53 +00:00
|
|
|
A Configurable::Device provides a reflective struct listing the available runtime options for this machine.
|
2020-03-17 03:25:05 +00:00
|
|
|
You can ordinarily either get or set a machine's current options, or else construct a new instance of
|
|
|
|
its options with one of the OptionsTypes defined below.
|
|
|
|
*/
|
|
|
|
struct Device {
|
|
|
|
/// Sets the current options. The caller must ensure that the object passed in is either an instance of the machine's
|
|
|
|
/// Options struct, or else was previously returned by get_options.
|
|
|
|
virtual void set_options(const std::unique_ptr<Reflection::Struct> &options) = 0;
|
|
|
|
|
|
|
|
/// @returns An options object
|
|
|
|
virtual std::unique_ptr<Reflection::Struct> get_options() = 0;
|
|
|
|
};
|
2017-11-18 04:02:00 +00:00
|
|
|
|
2020-03-17 03:25:05 +00:00
|
|
|
/*!
|
2020-03-16 03:48:53 +00:00
|
|
|
'Accurate' options should correspond to the way that this device was usually used during its lifespan.
|
|
|
|
E.g. a ColecoVision might accurately be given composite output.
|
2018-02-09 21:31:05 +00:00
|
|
|
|
2020-03-16 03:48:53 +00:00
|
|
|
'User-friendly' options should be more like those that a user today might most expect from an emulator.
|
|
|
|
E.g. the ColecoVision might bump itself up to S-Video output.
|
2017-11-18 04:02:00 +00:00
|
|
|
*/
|
2020-03-17 03:25:05 +00:00
|
|
|
enum class OptionsType {
|
|
|
|
Accurate,
|
|
|
|
UserFriendly
|
2017-11-18 04:02:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|