summaryrefslogtreecommitdiff
path: root/src/midimapparser.h
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2016-03-22 00:40:15 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2016-03-29 22:43:30 +0200
commit31ac3fd56ce77cfb2e9caddd0bdac0614971d98b (patch)
treeb1d1546af97495e06b9129bcae08cefcfc98897e /src/midimapparser.h
parentefe93864d53f72be4fa4dfe003f0f7578fc558e2 (diff)
Parser refactoring.
* Use new style * Update to C++11 * Use more std::string than char*
Diffstat (limited to 'src/midimapparser.h')
-rw-r--r--src/midimapparser.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/midimapparser.h b/src/midimapparser.h
index b9ef3e7..80b7507 100644
--- a/src/midimapparser.h
+++ b/src/midimapparser.h
@@ -24,29 +24,27 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#ifndef __DRUMGIZMO_MIDIMAPPARSER_H__
-#define __DRUMGIZMO_MIDIMAPPARSER_H__
+#pragma once
#include <stdio.h>
#include "saxparser.h"
-
#include "midimapper.h"
-class MidiMapParser : public SAXParser {
+class MidiMapParser
+ : public SAXParser
+{
public:
- MidiMapParser(std::string file);
- ~MidiMapParser();
+ MidiMapParser(const std::string& file);
+ ~MidiMapParser();
- void startTag(std::string name, attr_t attr);
+ void startTag(const std::string& name, attr_t& attr) override;
- midimap_t midimap;
+ midimap_t midimap;
protected:
- int readData(char *data, size_t size);
+ int readData(std::string& data, size_t size) override;
private:
- FILE *fd;
+ FILE* fd;
};
-
-#endif/*__DRUMGIZMO_MIDIMAPPARSER_H__*/