summaryrefslogtreecommitdiff
path: root/src/configparser.h
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2016-03-22 00:40:15 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2016-03-22 17:16:03 +0100
commit0728a11284f15100a8f8e0d9da0192019a056d6a (patch)
treedd430619bc74314ae21941102f1f1f92769d9ddc /src/configparser.h
parent8e2124ad955b51efb2f539998a369d7ca07cbc73 (diff)
Parser refactoring.
* Use new style * Update to C++11 * Use more std::string than char*
Diffstat (limited to 'src/configparser.h')
-rw-r--r--src/configparser.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/configparser.h b/src/configparser.h
index 9aba284..b33af85 100644
--- a/src/configparser.h
+++ b/src/configparser.h
@@ -24,26 +24,24 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#ifndef __DRUMGIZMO_CONFIGPARSER_H__
-#define __DRUMGIZMO_CONFIGPARSER_H__
+#pragma once
#include <map>
#include "saxparser.h"
-class ConfigParser : public SAXParser {
+class ConfigParser :
+ public SAXParser
+{
public:
- ConfigParser();
+ ConfigParser();
- void characterData(std::string &data);
- void startTag(std::string name, attr_t attr);
- void endTag(std::string name);
- std::string value(std::string name, std::string def = "");
- void parseError(char *buf, size_t len, std::string error, int lineno);
+ void characterData(const std::string& data) override;
+ void startTag(const std::string& name, attr_t& attr) override;
+ void endTag(const std::string& name) override;
+ std::string value(const std::string& name, const std::string& def = "");
private:
- std::map<std::string, std::string> values;
- std::string *str;
+ std::map<std::string, std::string> values;
+ std::string* str;
};
-
-#endif/*__DRUMGIZMO_CONFIGPARSER_H__*/