#ifndef SAX_DECODER_FACTORY_HH #define SAX_DECODER_FACTORY_HH #include #include namespace modxml { namespace sax { class Decoder; /** * Factory for decoders. You can give one to ProcessBuilder. */ class DecoderFactory { public: virtual ~DecoderFactory() = default; /** * If encoding is supported, return a decoder for that encoding. * Return nullptr if not supported and Processor will return * UNKNOWN_ENCODING error. * Note that encoding value isn't cleaned up or validated in any way, it is * reported EXACTLY as found (even if not valid per XML spec). */ virtual std::unique_ptr create(std::string_view encoding) = 0; protected: DecoderFactory() = default; }; } // namespace sax } // namespace modxml #endif // SAX_DECODER_FACTORY_HH