VirtualC64 v5.0 beta
Commodore 64 Emulator
Loading...
Searching...
No Matches
ParCableTypes.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2// This file is part of VirtualC64
3//
4// Copyright (C) Dirk W. Hoffmann. www.dirkwhoffmann.de
5// This FILE is dual-licensed. You are free to choose between:
6//
7// - The GNU General Public License v3 (or any later version)
8// - The Mozilla Public License v2
9//
10// SPDX-License-Identifier: GPL-3.0-or-later OR MPL-2.0
11// -----------------------------------------------------------------------------
13
14#pragma once
15
16#include "Reflection.h"
17
18namespace vc64 {
19
20//
21// Enumerations
22//
23
31typedef PAR_CABLE_TYPE ParCableType;
32
33struct ParCableTypeEnum : util::Reflection<ParCableTypeEnum, ParCableType> {
34
35 static constexpr long minVal = 0;
36 static constexpr long maxVal = PAR_CABLE_DOLPHIN3;
37 static bool isValid(auto value) { return value >= minVal && value <= maxVal; }
38
39 static const char *prefix() { return "PAR_CABLE"; }
40 static const char *key(long value)
41 {
42 switch (value) {
43
44 case PAR_CABLE_NONE: return "PAR_CABLE_NONE";
45 case PAR_CABLE_STANDARD: return "PAR_CABLE_STANDARD";
46 case PAR_CABLE_DOLPHIN3: return "PAR_CABLE_DOLPHIN3";
47 }
48 return "???";
49 }
50};
51
52}
VirtualC64 project namespace.
Definition CmdQueue.cpp:16
PAR_CABLE_TYPE
Parallel cable type.
Definition ParCableTypes.h:26
@ PAR_CABLE_STANDARD
Standard parallel cable.
Definition ParCableTypes.h:28
@ PAR_CABLE_NONE
No parallel cable attached.
Definition ParCableTypes.h:27
@ PAR_CABLE_DOLPHIN3
DolphinDOS cable.
Definition ParCableTypes.h:29