aboutsummaryrefslogtreecommitdiff
path: root/src/support/error/warning_capacitor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/error/warning_capacitor.h')
-rw-r--r--src/support/error/warning_capacitor.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/support/error/warning_capacitor.h b/src/support/error/warning_capacitor.h
new file mode 100644
index 0000000..6b7058b
--- /dev/null
+++ b/src/support/error/warning_capacitor.h
@@ -0,0 +1,31 @@
+#ifndef INPUTXSLT_SRC_SUPPORT_ERROR_WARNING_CAPACITOR_H_
+#define INPUTXSLT_SRC_SUPPORT_ERROR_WARNING_CAPACITOR_H_
+
+#include <memory>
+
+#include "error_multiplexer.h"
+
+namespace InputXSLT {
+
+class WarningCapacitor : public ErrorMultiplexer::receiver {
+ public:
+ typedef std::vector<std::string> warning_cache;
+ typedef std::unique_ptr<warning_cache> warning_cache_ptr;
+
+ WarningCapacitor(ErrorMultiplexer*);
+
+ warning_cache_ptr discharge();
+
+ virtual void receive(
+ const ErrorMultiplexer::error_type,
+ const std::string&
+ );
+
+ private:
+ warning_cache_ptr warning_cache_;
+
+};
+
+}
+
+#endif // INPUTXSLT_SRC_SUPPORT_ERROR_WARNING_CAPACITOR_H_