summaryrefslogtreecommitdiff
path: root/src/drumkitparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/drumkitparser.h')
-rw-r--r--src/drumkitparser.h39
1 files changed, 18 insertions, 21 deletions
diff --git a/src/drumkitparser.h b/src/drumkitparser.h
index b59e81b..91456d4 100644
--- a/src/drumkitparser.h
+++ b/src/drumkitparser.h
@@ -24,37 +24,34 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#ifndef __DRUMGIZMO_DRUMKITPARSER_H__
-#define __DRUMGIZMO_DRUMKITPARSER_H__
+#pragma once
#include "saxparser.h"
#include "drumkit.h"
#include "configfile.h"
-class DrumKitParser : public SAXParser {
+class DrumKitParser
+ : public SAXParser
+{
public:
- DrumKitParser(const std::string &kitfile, DrumKit &kit);
- ~DrumKitParser();
-
- void startTag(std::string name,
- std::map< std::string, std::string> attributes);
- void endTag(std::string name);
+ DrumKitParser(const std::string& kitfile, DrumKit& kit);
+ ~DrumKitParser();
protected:
- int readData(char *data, size_t size);
+ void startTag(const std::string& name, attr_t& attributes) override;
+ void endTag(const std::string& name) override;
+
+ int readData(std::string& data, std::size_t size) override;
private:
- FILE *fd;
- DrumKit &kit;
- // Instrument *instr;
- std::string path;
+ FILE* fd;
+ DrumKit& kit;
+ std::string path;
- std::map<std::string, std::string> channelmap;
- std::string instr_file;
- std::string instr_name;
- std::string instr_group;
+ std::map<std::string, std::string> channelmap;
+ std::string instr_file;
+ std::string instr_name;
+ std::string instr_group;
- ConfigFile refs;
+ ConfigFile refs;
};
-
-#endif/*__DRUMGIZMO_DRUMKITPARSER_H__*/