summaryrefslogtreecommitdiff
path: root/src/instrument.h
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2020-01-12 15:41:39 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2020-02-16 19:57:13 +0100
commitfb992677cf62b6aa982476538faae43e5bbbd87f (patch)
tree8973b63653e2acbecb2b273444b4dc67dc623fd8 /src/instrument.h
parent8070e5578aa9d185f07534778dc0ebf596fece13 (diff)
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
Diffstat (limited to 'src/instrument.h')
-rw-r--r--src/instrument.h21
1 files changed, 12 insertions, 9 deletions
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 <memory>
#include <deque>
-#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<std::unique_ptr<Instrument>>;
+using InstrumentID = ID<Instrument>;
+using InstrumentIDs = std::vector<InstrumentID>;
+
+struct Choke
+{
+ std::size_t instrument_id;
+ double choketime;
+};