aboutsummaryrefslogtreecommitdiff
path: root/src/support/error/warning_capacitor.h
blob: 70f979b8462da811c216423cdfffd16cf29f04f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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_