From 042a3d2004d47e7d4c5b11d26e23b70c1c716aac Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 28 Nov 2020 18:08:42 +0100 Subject: Move PortType to its own header --- src/AlsaDriver.cpp | 1 + src/Configuration.cpp | 1 + src/Configuration.hpp | 10 +--------- src/JackDbusDriver.cpp | 1 + src/JackDriver.cpp | 1 + src/Legend.cpp | 1 + src/PortType.hpp | 29 +++++++++++++++++++++++++++++ 7 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 src/PortType.hpp (limited to 'src') diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp index 015e659..7f1e409 100644 --- a/src/AlsaDriver.cpp +++ b/src/AlsaDriver.cpp @@ -21,6 +21,7 @@ #include "PatchageCanvas.hpp" #include "PatchageModule.hpp" #include "PatchagePort.hpp" +#include "PortType.hpp" #include "SignalDirection.hpp" #include "handle_event.hpp" diff --git a/src/Configuration.cpp b/src/Configuration.cpp index 8333264..1c75261 100644 --- a/src/Configuration.cpp +++ b/src/Configuration.cpp @@ -17,6 +17,7 @@ #include "Configuration.hpp" #include "Patchage.hpp" +#include "PortType.hpp" #include "SignalDirection.hpp" #include diff --git a/src/Configuration.hpp b/src/Configuration.hpp index c39ab01..81b9e84 100644 --- a/src/Configuration.hpp +++ b/src/Configuration.hpp @@ -17,6 +17,7 @@ #ifndef PATCHAGE_CONFIGURATION_HPP #define PATCHAGE_CONFIGURATION_HPP +#include "PortType.hpp" #include "SignalDirection.hpp" #include @@ -25,15 +26,6 @@ #include #include -enum class PortType -{ - jack_audio, - jack_midi, - alsa_midi, - jack_osc, - jack_cv, -}; - #define N_PORT_TYPES 5 struct Coord diff --git a/src/JackDbusDriver.cpp b/src/JackDbusDriver.cpp index 3dd268b..81d6224 100644 --- a/src/JackDbusDriver.cpp +++ b/src/JackDbusDriver.cpp @@ -26,6 +26,7 @@ #include "PatchageModule.hpp" #include "PatchagePort.hpp" #include "PortNames.hpp" +#include "PortType.hpp" #include "SignalDirection.hpp" PATCHAGE_DISABLE_FMT_WARNINGS diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp index 83bcf31..096b543 100644 --- a/src/JackDriver.cpp +++ b/src/JackDriver.cpp @@ -24,6 +24,7 @@ #include "PatchageModule.hpp" #include "PatchagePort.hpp" #include "PortNames.hpp" +#include "PortType.hpp" #include "SignalDirection.hpp" #include "handle_event.hpp" #include "patchage_config.h" diff --git a/src/Legend.cpp b/src/Legend.cpp index f57cc1e..42fb95d 100644 --- a/src/Legend.cpp +++ b/src/Legend.cpp @@ -17,6 +17,7 @@ #include "Legend.hpp" #include "Configuration.hpp" +#include "PortType.hpp" #include #include diff --git a/src/PortType.hpp b/src/PortType.hpp new file mode 100644 index 0000000..498564e --- /dev/null +++ b/src/PortType.hpp @@ -0,0 +1,29 @@ +/* This file is part of Patchage. + * Copyright 2007-2020 David Robillard + * + * Patchage is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * Patchage is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License + * along with Patchage. If not, see . + */ + +#ifndef PATCHAGE_PORTTYPE_HPP +#define PATCHAGE_PORTTYPE_HPP + +enum class PortType +{ + jack_audio, + jack_midi, + alsa_midi, + jack_osc, + jack_cv, +}; + +#endif // PATCHAGE_PORTTYPE_HPP -- cgit v1.2.1