--- a/src/lib/XMLContentHandler.h Sat Jun 12 21:29:18 2021 +0200
+++ b/src/lib/XMLContentHandler.h Sat Jun 12 22:37:44 2021 +0200
@@ -16,6 +16,8 @@
*/
#pragma once
+#include <vector>
+
namespace relpipe {
namespace in {
namespace asn1 {
@@ -26,10 +28,12 @@
virtual ~XMLContentHandler() = default;
+ // FIXME: namespaces, check names
+
virtual void writeStartElement(const std::string& name, const std::vector<std::string>& attributes = {}) = 0;
virtual void writeEndElement() = 0;
- virtual void writeCharacters(const std::string& text) = 0;
- virtual void writeComment(const std::string& text, bool addSpaces = true) = 0;
+ virtual void writeCharacters(const std::string& value) = 0;
+ virtual void writeComment(const std::string& value, bool addSpaces = true) = 0;
};
@@ -44,20 +48,20 @@
#define handler for (auto ___h : handlers) ___h
- void writeStartElement(const std::string& name, const std::vector<std::string>& attributes = {}) {
+ void writeStartElement(const std::string& name, const std::vector<std::string>& attributes = {}) override {
handler->writeStartElement(name, attributes);
}
- void writeEndElement() {
+ void writeEndElement() override {
handler->writeEndElement();
}
- void writeCharacters(const std::string& text) {
- handler->writeCharacters(text);
+ void writeCharacters(const std::string& value) override {
+ handler->writeCharacters(value);
}
- void writeComment(const std::string& text, bool addSpaces = true) {
- handler->writeComment(text, addSpaces);
+ void writeComment(const std::string& value, bool addSpaces = true) override {
+ handler->writeComment(value, addSpaces);
}
#undef handler