summaryrefslogtreecommitdiff
path: root/src/drumkitparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/drumkitparser.h')
-rw-r--r--src/drumkitparser.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/drumkitparser.h b/src/drumkitparser.h
index 7b34b44..6b24fa5 100644
--- a/src/drumkitparser.h
+++ b/src/drumkitparser.h
@@ -30,6 +30,18 @@
#include "saxparser.h"
#include "drumkit.h"
+struct MetaData {
+ std::string version;
+ std::string name;
+ std::string description;
+ std::string notes;
+ std::string author;
+ std::string email;
+ std::string website;
+ std::vector<std::pair< std::string, std::string> > channels; // name, microphone
+ std::vector<std::pair< std::string, std::string> > instruments; // name, microphone
+};
+
class DrumKitParser : public SAXParser {
public:
DrumKitParser(const std::string &kitfile, DrumKit &kit);
@@ -39,6 +51,7 @@ public:
std::map< std::string, std::string> attributes,
std::string &data);
void endTag(std::string name);
+ MetaData getMetaData();
protected:
int readData(char *data, size_t size);
@@ -46,12 +59,21 @@ protected:
private:
FILE *fd;
DrumKit &kit;
+
+ MetaData meta;
+
+ std::string ch_id;
+ std::string ch_name;
+ std::string ch_microphone;
+
// Instrument *instr;
std::string path;
std::map<std::string, std::string> channelmap;
- std::string instr_file;
std::string instr_name;
+ std::string instr_description;
+ std::string instr_file;
+ std::string instr_id;
std::string instr_group;
bool in_metadata;
bool in_channel;