Orcus
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, _Config > orcus::sax_parser< handler_wrapper >

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
 
size_t remains () const
 
char cur_char_checked () const
 
char next_and_char ()
 
char next_char_checked ()
 
cell_bufferget_cell_buffer ()
 
void blank ()
 
void comment ()
 
void skip_bom ()
 
void expects_next (const char *p, size_t n)
 
void parse_encoded_char (cell_buffer &buf)
 
void value_with_encoded_char (cell_buffer &buf, pstring &str)
 
bool value (pstring &str, bool decode)
 
void name (pstring &str)
 
void element_name (parser_element &elem, const char *begin_pos)
 
void attribute_name (pstring &attr_ns, pstring &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)
 
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 next_char () const
 
void skip (const char *chars_to_skip)
 
bool parse_expected (const char *expected)
 
double parse_double ()
 
size_t remaining_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 * mp_begin
 
const char * mp_char
 
const char * mp_end
 

Member Function Documentation

size_t orcus::sax::parser_base::remains ( ) const
inlineprotected

Determine the number of remaining characters including the current character.

Returns
number of remaining characters including the current character.
void orcus::sax::parser_base::skip_bom ( )
protected

Skip an optional byte order mark at the begining of the xml stream.

bool orcus::sax::parser_base::value ( pstring str,
bool  decode 
)
protected

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

Returns
true if the value is stored in temporary buffer, false otherwise.