8 #ifndef INCLUDED_ORCUS_SAX_PARSER_BASE_HPP 9 #define INCLUDED_ORCUS_SAX_PARSER_BASE_HPP 12 #include "pstring.hpp" 13 #include "cell_buffer.hpp" 14 #include "parser_global.hpp" 15 #include "parser_base.hpp" 23 #define ORCUS_DEBUG_SAX_PARSER 0 25 #if ORCUS_DEBUG_SAX_PARSER 31 namespace orcus {
namespace sax {
47 enum class keyword_type { dtd_public, dtd_private };
66 ORCUS_PSR_DLLPUBLIC
char decode_xml_encoded_char(
const char* p,
size_t n);
79 ORCUS_PSR_DLLPUBLIC std::string decode_xml_unicode_char(
const char* p,
size_t n);
89 const char* begin_pos;
111 std::unique_ptr<impl> mp_impl;
119 bool m_root_elem_open:1;
132 void nest_up() { ++m_nest_level; }
135 if (m_nest_level == 0)
141 void inc_buffer_pos();
142 void reset_buffer_pos() { m_buffer_pos = 0; }
144 void has_char_throw(
const char* msg)
const 159 #if ORCUS_DEBUG_SAX_PARSER 160 if (mp_char >= mp_end)
163 return mp_end - mp_char;
166 char cur_char_checked()
const 177 #if ORCUS_DEBUG_SAX_PARSER 178 if (mp_char >= mp_end)
184 char next_char_checked()
203 void expects_next(
const char* p,
size_t n);
216 bool value(
pstring& str,
bool decode);
221 void characters_with_encoded_char(
cell_buffer& buf);
Definition: pstring.hpp:24
Definition: cell_buffer.hpp:21
size_t remains() const
Definition: sax_parser_base.hpp:157
Definition: sax_parser_base.hpp:100
Definition: parser_base.hpp:35
Definition: sax_parser_base.hpp:85
Definition: sax_parser_base.hpp:45
Definition: parser_base.hpp:21
Definition: base64.hpp:15
Definition: sax_parser_base.hpp:108