diff options
Diffstat (limited to 'sax/inc/sax_processor.hh')
| -rw-r--r-- | sax/inc/sax_processor.hh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sax/inc/sax_processor.hh b/sax/inc/sax_processor.hh new file mode 100644 index 0000000..7ca32f7 --- /dev/null +++ b/sax/inc/sax_processor.hh @@ -0,0 +1,37 @@ +#ifndef MODXML_SAX_PROCESSOR_HH +#define MODXML_SAX_PROCESSOR_HH + +#include <memory> + +namespace modxml { +namespace sax { + +class Delegate; + +/** + * The XML processor, or parser if you like that term better. + * Feed it data and the processor will give the delegate calls with events or + * possibly errors. + */ +class Processor { + public: + virtual ~Processor() = default; + + /** + * Construct a Processor. Same as creating a ProcessorBuilder + * and not changing any options and just calling build. + */ + static std::unique_ptr<Processor> create(std::shared_ptr<Delegate> delegate); + + protected: + Processor() = default; + + private: + Processor(Processor const&) = delete; + Processor& operator=(Processor const&) = delete; +}; + +} // namespace sax +} // namespace modxml + +#endif // MODXML_SAX_PROCESSOR_HH |
