1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-01-11 08:30:55 +00:00

Withdraws ability to select an integer size for ReflectableEnums.

It isn't that useful, and this'll help if/when I get to serialisation.
This commit is contained in:
Thomas Harte 2020-03-11 23:28:38 -04:00
parent fd052189ca
commit 724e2e6d27
8 changed files with 11 additions and 11 deletions

View File

@ -19,7 +19,7 @@ namespace Static {
namespace AmstradCPC {
struct Target: public ::Analyser::Static::Target, public Reflection::Struct<Target> {
ReflectableEnum(Model, int, CPC464, CPC664, CPC6128);
ReflectableEnum(Model, CPC464, CPC664, CPC6128);
Model model = Model::CPC464;
std::string loading_command;

View File

@ -18,13 +18,13 @@ namespace Static {
namespace AppleII {
struct Target: public ::Analyser::Static::Target, public Reflection::Struct<Target> {
ReflectableEnum(Model, int,
ReflectableEnum(Model,
II,
IIplus,
IIe,
EnhancedIIe
);
ReflectableEnum(DiskController, int,
ReflectableEnum(DiskController,
None,
SixteenSector,
ThirteenSector

View File

@ -25,7 +25,7 @@ struct Target: public ::Analyser::Static::Target, public Reflection::Struct<Targ
ThirtyTwoKB
};
ReflectableEnum(Region, int,
ReflectableEnum(Region,
American,
Danish,
Japanese,

View File

@ -22,7 +22,7 @@ struct Target: public ::Analyser::Static::Target, public Reflection::Struct<Targ
bool has_disk_drive = false;
std::string loading_command;
ReflectableEnum(Region, int,
ReflectableEnum(Region,
Japan,
USA,
Europe

View File

@ -17,7 +17,7 @@ namespace Static {
namespace Macintosh {
struct Target: public ::Analyser::Static::Target, public Reflection::Struct<Target> {
ReflectableEnum(Model, int, Mac128k, Mac512k, Mac512ke, MacPlus);
ReflectableEnum(Model, Mac128k, Mac512k, Mac512ke, MacPlus);
Model model = Model::MacPlus;
Target() {

View File

@ -19,13 +19,13 @@ namespace Static {
namespace Oric {
struct Target: public ::Analyser::Static::Target, public Reflection::Struct<Target> {
ReflectableEnum(ROM, int,
ReflectableEnum(ROM,
BASIC10,
BASIC11,
Pravetz
);
ReflectableEnum(DiskInterface, int,
ReflectableEnum(DiskInterface,
None,
Microdisc,
Pravetz,

View File

@ -19,7 +19,7 @@ namespace Static {
namespace ZX8081 {
struct Target: public ::Analyser::Static::Target, public Reflection::Struct<Target> {
ReflectableEnum(MemoryModel, int,
ReflectableEnum(MemoryModel,
Unexpanded,
SixteenKB,
SixtyFourKB

View File

@ -18,8 +18,8 @@
namespace Reflection {
#define ReflectableEnum(Name, Type, ...) \
enum class Name: Type { __VA_ARGS__ }; \
#define ReflectableEnum(Name, ...) \
enum class Name { __VA_ARGS__ }; \
constexpr static const char *__declaration##Name = #__VA_ARGS__;
#define EnumDeclaration(Name) #Name, __declaration##Name