From fb992677cf62b6aa982476538faae43e5bbbd87f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Sun, 12 Jan 2020 15:41:39 +0100 Subject: Introduce EventsDS to handle all the events and enable new features. Also: * Added an id.h class to make IDs with type * Added a range class to easily use range based for loops --- src/instrument.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/instrument.h') diff --git a/src/instrument.h b/src/instrument.h index 2cb0813..c06ccdc 100644 --- a/src/instrument.h +++ b/src/instrument.h @@ -31,21 +31,17 @@ #include #include -#include "rangemap.h" // for v1.0 kits +#include "id.h" #include "powerlist.h" +#include "rangemap.h" // for v1.0 kits +#include "random.h" #include "sample_selection.h" - #include "sample.h" #include "versionstr.h" -#include "random.h" #include "settings.h" -struct Choke -{ - std::size_t instrument_id; - double choketime; -}; +struct Choke; class Instrument { @@ -109,5 +105,12 @@ private: SampleSelection sample_selection; }; -// typedef std::map< std::string, Instrument > Instruments; using Instruments = std::vector>; +using InstrumentID = ID; +using InstrumentIDs = std::vector; + +struct Choke +{ + std::size_t instrument_id; + double choketime; +}; -- cgit v1.2.3