Orcus
Loading...
Searching...
No Matches
Protected Member Functions | Protected Attributes | List of all members
orcus::sax::parser_base Class Reference
Inheritance diagram for orcus::sax::parser_base:
orcus::parser_base orcus::sax_parser< handler_wrapper > orcus::sax_parser< HandlerT, ConfigT >

Protected Member Functions

 parser_base (const char *content, size_t size)
 
void next_check ()
 
void nest_up ()
 
void nest_down ()
 
void inc_buffer_pos ()
 
void reset_buffer_pos ()
 
void has_char_throw (const char *msg) const
 
char cur_char_checked () const
 
char next_and_char ()
 
char next_char_checked ()
 
cell_bufferget_cell_buffer ()
 
void comment ()
 
void expects_next (const char *p, size_t n)
 
void parse_encoded_char (cell_buffer &buf)
 
void value_with_encoded_char (cell_buffer &buf, std::string_view &str, char quote_char)
 
bool value (std::string_view &str, bool decode)
 
void name (std::string_view &str)
 
void element_name (parser_element &elem, std::ptrdiff_t begin_pos)
 
void attribute_name (std::string_view &attr_ns, std::string_view &attr_name)
 
void characters_with_encoded_char (cell_buffer &buf)
 
- Protected Member Functions inherited from orcus::parser_base
 parser_base (const char *p, size_t n)
 
void set_numeric_parser (const numeric_parser_type &func)
 
bool has_char () const
 
bool has_next () const
 
void next (size_t inc=1)
 
void prev (size_t dec=1)
 
char cur_char () const
 
char peek_char (std::size_t offset=1) const
 
std::string_view peek_chars (std::size_t length) const
 
void skip_bom ()
 
void skip (std::string_view chars_to_skip)
 
void skip_space_and_control ()
 
bool parse_expected (std::string_view expected)
 
double parse_double ()
 
size_t remaining_size () const
 
size_t available_size () const
 
std::ptrdiff_t offset () const
 

Protected Attributes

size_t m_nest_level
 
size_t m_buffer_pos
 
bool m_root_elem_open:1
 
- Protected Attributes inherited from orcus::parser_base
const char *const mp_begin
 
const char * mp_char
 
const char * mp_end
 

Additional Inherited Members

- Protected Types inherited from orcus::parser_base
using numeric_parser_type = std::function<const char*(const char*, const char*, double&)>
 

Member Function Documentation

◆ value()

bool orcus::sax::parser_base::value ( std::string_view & str,
bool decode )
protected

Parse quoted value. Note that the retrieved string may be stored in a temporary cell buffer if the decode parameter is true. Use the string immediately after this call before the buffer becomes invalid.

Note
This method checks for valid stream; the caller doesn't need to check for valid stream before calling this method.
Returns
true if the value is stored in temporary buffer, false otherwise.