summaryrefslogtreecommitdiff
path: root/src/midimapparser.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2016-03-23 18:24:29 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2016-03-23 18:24:29 +0100
commit5c04b951ffe53e1a31182bb0814908af8d7f0a6f (patch)
tree5499759253aaa92abfa853aa55fede9e9029f140 /src/midimapparser.cc
parente8fcde7654f2d7dce494ebe1ca27abbebc3908b4 (diff)
Do the file related actions in SAXParser.
Diffstat (limited to 'src/midimapparser.cc')
-rw-r--r--src/midimapparser.cc26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/midimapparser.cc b/src/midimapparser.cc
index e847c58..8d0e6ad 100644
--- a/src/midimapparser.cc
+++ b/src/midimapparser.cc
@@ -26,19 +26,6 @@
*/
#include "midimapparser.h"
-MidiMapParser::MidiMapParser(const std::string& file)
-{
- fd = fopen(file.c_str(), "r");
-}
-
-MidiMapParser::~MidiMapParser()
-{
- if(fd)
- {
- fclose(fd);
- }
-}
-
void MidiMapParser::startTag(const std::string& name, const attr_t& attr)
{
if(name == "map")
@@ -49,16 +36,3 @@ void MidiMapParser::startTag(const std::string& name, const attr_t& attr)
}
}
}
-
-int MidiMapParser::readData(std::string& data, std::size_t size)
-{
- if(!fd)
- {
- return -1;
- }
-
- data.resize(size);
- auto nr_of_bytes_read = fread((void*)data.data(), 1, size, fd);
- data.resize(nr_of_bytes_read);
- return nr_of_bytes_read;
-}