src/lib/INIReader.h
branchv_0
changeset 28 0e7c57d48d1e
parent 26 80e129ec3408
child 29 06aaad12c207
--- a/src/lib/INIReader.h	Thu Nov 26 11:42:26 2020 +0100
+++ b/src/lib/INIReader.h	Sat Nov 28 18:14:15 2020 +0100
@@ -20,6 +20,7 @@
 #include <istream>
 
 #include "INIContentHandler.h"
+#include "UnescapingProcessor.h"
 
 namespace relpipe {
 namespace in {
@@ -32,7 +33,20 @@
 class INIReader {
 public:
 	virtual ~INIReader() = default;
+	/**
+	 * TODO: after moving to alt2xml:
+	 *        - option will be identified by globally unique URI/IRI
+	 *        - parsers will provide catalog of supported options (names, enum values, documentation)
+	 *        - options serves as both XML parser features and properties and are mapped to them
+	 */
+	virtual void setOption(const std::string& uri, const std::string& value) = 0;
+	/**
+	 * TODO: after moving to alt2xml:
+	 *        - this will be generic handler for SAX event
+	 *        - but both sides will know the schema (allowed elements and attributes for INI events)
+	 */
 	virtual void addHandler(INIContentHandler* handler) = 0;
+	virtual void addUnescapingProcessor(std::shared_ptr<UnescapingProcessor> processor, const std::string uri, bool enabledByDefault) = 0;
 	virtual void process() = 0;
 	static INIReader* create(std::istream& input);
 };