14#ifndef PUGIXML_VERSION
17# define PUGIXML_VERSION 1110
23#ifndef HEADER_PUGIXML_HPP
24#define HEADER_PUGIXML_HPP
30#if !defined(PUGIXML_NO_XPATH) && !defined(PUGIXML_NO_EXCEPTIONS)
42#ifndef PUGIXML_DEPRECATED
44# define PUGIXML_DEPRECATED __attribute__((deprecated))
45# elif defined(_MSC_VER) && _MSC_VER >= 1300
46# define PUGIXML_DEPRECATED __declspec(deprecated)
48# define PUGIXML_DEPRECATED
59# define PUGIXML_CLASS PUGIXML_API
63#ifndef PUGIXML_FUNCTION
64# define PUGIXML_FUNCTION PUGIXML_API
68#ifndef PUGIXML_HAS_LONG_LONG
69# if __cplusplus >= 201103
70# define PUGIXML_HAS_LONG_LONG
71# elif defined(_MSC_VER) && _MSC_VER >= 1400
72# define PUGIXML_HAS_LONG_LONG
77#ifndef PUGIXML_HAS_MOVE
78# if __cplusplus >= 201103
79# define PUGIXML_HAS_MOVE
80# elif defined(_MSC_VER) && _MSC_VER >= 1600
81# define PUGIXML_HAS_MOVE
86#ifndef PUGIXML_NOEXCEPT
87# if __cplusplus >= 201103
88# define PUGIXML_NOEXCEPT noexcept
89# elif defined(_MSC_VER) && _MSC_VER >= 1900
90# define PUGIXML_NOEXCEPT noexcept
92# define PUGIXML_NOEXCEPT
98# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT
100# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT PUGIXML_NOEXCEPT
104#ifndef PUGIXML_OVERRIDE
105# if __cplusplus >= 201103
106# define PUGIXML_OVERRIDE override
107# elif defined(_MSC_VER) && _MSC_VER >= 1700
108# define PUGIXML_OVERRIDE override
110# define PUGIXML_OVERRIDE
116# if __cplusplus >= 201103
117# define PUGIXML_NULL nullptr
119# define PUGIXML_NULL 0
124#ifdef PUGIXML_WCHAR_MODE
125# define PUGIXML_TEXT(t) L ## t
126# define PUGIXML_CHAR wchar_t
128# define PUGIXML_TEXT(t) t
129# define PUGIXML_CHAR char
137#ifndef PUGIXML_NO_STL
139 typedef std::basic_string<PUGIXML_CHAR, std::char_traits<PUGIXML_CHAR>, std::allocator<PUGIXML_CHAR> >
string_t;
294 #ifndef PUGIXML_NO_XPATH
313 It
end()
const {
return _end; }
315 bool empty()
const {
return _begin == _end; }
328 virtual void write(
const void* data,
size_t size) = 0;
344 #ifndef PUGIXML_NO_STL
351 xml_writer_stream(std::basic_ostream<
wchar_t, std::char_traits<wchar_t> >& stream);
356 std::basic_ostream<char, std::char_traits<char> >* narrow_stream;
357 std::basic_ostream<wchar_t, std::char_traits<wchar_t> >* wide_stream;
380 operator unspecified_bool_type()
const;
383 bool operator!()
const;
397 const char_t* name()
const;
398 const char_t* value()
const;
404 int as_int(
int def = 0)
const;
405 unsigned int as_uint(
unsigned int def = 0)
const;
406 double as_double(
double def = 0)
const;
407 float as_float(
float def = 0)
const;
409 #ifdef PUGIXML_HAS_LONG_LONG
410 long long as_llong(
long long def = 0)
const;
411 unsigned long long as_ullong(
unsigned long long def = 0)
const;
415 bool as_bool(
bool def =
false)
const;
418 bool set_name(
const char_t* rhs);
419 bool set_value(
const char_t* rhs);
422 bool set_value(
int rhs);
423 bool set_value(
unsigned int rhs);
424 bool set_value(
long rhs);
425 bool set_value(
unsigned long rhs);
426 bool set_value(
double rhs);
427 bool set_value(
double rhs,
int precision);
428 bool set_value(
float rhs);
429 bool set_value(
float rhs,
int precision);
430 bool set_value(
bool rhs);
432 #ifdef PUGIXML_HAS_LONG_LONG
433 bool set_value(
long long rhs);
434 bool set_value(
unsigned long long rhs);
447 #ifdef PUGIXML_HAS_LONG_LONG
457 size_t hash_value()
const;
479 typedef void (*unspecified_bool_type)(
xml_node***);
489 operator unspecified_bool_type()
const;
492 bool operator!()
const;
495 bool operator==(
const xml_node& r)
const;
496 bool operator!=(
const xml_node& r)
const;
498 bool operator>(
const xml_node& r)
const;
499 bool operator<=(
const xml_node& r)
const;
500 bool operator>=(
const xml_node& r)
const;
509 const char_t* name()
const;
513 const char_t* value()
const;
546 const char_t* child_value()
const;
552 bool set_name(
const char_t* rhs);
553 bool set_value(
const char_t* rhs);
596 bool remove_attributes();
599 bool remove_child(
const xml_node& n);
600 bool remove_child(
const char_t* name);
603 bool remove_children();
608 xml_parse_result append_buffer(
const void* contents,
size_t size,
unsigned int options = parse_default,
xml_encoding encoding = encoding_auto);
643 if (pred(cur))
return cur;
662 #ifndef PUGIXML_NO_STL
673 #ifndef PUGIXML_NO_XPATH
691 #ifndef PUGIXML_NO_STL
693 void print(std::basic_ostream<
char, std::char_traits<char> >& os,
const char_t* indent =
PUGIXML_TEXT(
"\t"),
unsigned int flags = format_default,
xml_encoding encoding = encoding_auto,
unsigned int depth = 0)
const;
694 void print(std::basic_ostream<
wchar_t, std::char_traits<wchar_t> >& os,
const char_t* indent =
PUGIXML_TEXT(
"\t"),
unsigned int flags = format_default,
unsigned int depth = 0)
const;
715 ptrdiff_t offset_debug()
const;
718 size_t hash_value()
const;
737 typedef void (*unspecified_bool_type)(
xml_text***);
749 operator unspecified_bool_type()
const;
752 bool operator!()
const;
758 const char_t* get()
const;
764 int as_int(
int def = 0)
const;
765 unsigned int as_uint(
unsigned int def = 0)
const;
766 double as_double(
double def = 0)
const;
767 float as_float(
float def = 0)
const;
769 #ifdef PUGIXML_HAS_LONG_LONG
770 long long as_llong(
long long def = 0)
const;
771 unsigned long long as_ullong(
unsigned long long def = 0)
const;
775 bool as_bool(
bool def =
false)
const;
778 bool set(
const char_t* rhs);
782 bool set(
unsigned int rhs);
784 bool set(
unsigned long rhs);
785 bool set(
double rhs);
786 bool set(
double rhs,
int precision);
788 bool set(
float rhs,
int precision);
791 #ifdef PUGIXML_HAS_LONG_LONG
792 bool set(
long long rhs);
793 bool set(
unsigned long long rhs);
799 xml_text& operator=(
unsigned int rhs);
801 xml_text& operator=(
unsigned long rhs);
806 #ifdef PUGIXML_HAS_LONG_LONG
808 xml_text& operator=(
unsigned long long rhs);
839 #ifndef PUGIXML_NO_STL
881 #ifndef PUGIXML_NO_STL
917 #ifndef PUGIXML_NO_STL
1017 operator bool()
const;
1020 const char* description()
const;
1046 #ifdef PUGIXML_HAS_MOVE
1058 #ifndef PUGIXML_NO_STL
1088 #ifndef PUGIXML_NO_STL
1091 void save(std::basic_ostream<
wchar_t, std::char_traits<wchar_t> >& stream,
const char_t* indent =
PUGIXML_TEXT(
"\t"),
unsigned int flags =
format_default)
const;
1102#ifndef PUGIXML_NO_XPATH
1126 operator bool()
const;
1129 const char* description()
const;
1149 const char_t* name()
const;
1155 bool get_boolean()
const;
1156 double get_number()
const;
1157 const char_t* get_string()
const;
1161 bool set(
bool value);
1162 bool set(
double value);
1163 bool set(
const char_t* value);
1190 #ifdef PUGIXML_HAS_MOVE
1200 bool set(
const char_t* name,
bool value);
1201 bool set(
const char_t* name,
double value);
1217 typedef void (*unspecified_bool_type)(
xpath_query***);
1234 #ifdef PUGIXML_HAS_MOVE
1245 bool evaluate_boolean(
const xpath_node& n)
const;
1249 double evaluate_number(
const xpath_node& n)
const;
1251 #ifndef PUGIXML_NO_STL
1261 size_t evaluate_string(
char_t* buffer,
size_t capacity,
const xpath_node& n)
const;
1278 operator unspecified_bool_type()
const;
1281 bool operator!()
const;
1284 #ifndef PUGIXML_NO_EXCEPTIONS
1285 #if defined(_MSC_VER)
1288 #pragma warning(push)
1289 #pragma warning(disable: 4275)
1307 #if defined(_MSC_VER)
1308 #pragma warning(pop)
1319 typedef void (*unspecified_bool_type)(
xpath_node***);
1337 operator unspecified_bool_type()
const;
1340 bool operator!()
const;
1384 #ifdef PUGIXML_HAS_MOVE
1394 size_t size()
const;
1397 const xpath_node& operator[](
size_t index)
const;
1425#ifndef PUGIXML_NO_STL
1427 std::basic_string<char, std::char_traits<char>, std::allocator<char> >
PUGIXML_FUNCTION as_utf8(
const wchar_t* str);
1428 std::basic_string<char, std::char_traits<char>, std::allocator<char> >
PUGIXML_FUNCTION as_utf8(
const std::basic_string<
wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >& str);
1431 std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >
PUGIXML_FUNCTION as_wide(
const char* str);
1432 std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >
PUGIXML_FUNCTION as_wide(
const std::basic_string<
char, std::char_traits<char>, std::allocator<char> >& str);
1436 typedef void* (*allocation_function)(
size_t size);
1449#if !defined(PUGIXML_NO_STL) && (defined(_MSC_VER) || defined(__ICC))
1459#if !defined(PUGIXML_NO_STL) && defined(__SUNPRO_CC)
1473#if defined(PUGIXML_HEADER_ONLY) && !defined(PUGIXML_SOURCE)
1474# define PUGIXML_SOURCE "pugixml.cpp"
1475# include PUGIXML_SOURCE
ptrdiff_t difference_type
std::bidirectional_iterator_tag iterator_category
xml_attribute & reference
xml_attribute next_attribute() const
ptrdiff_t difference_type
std::bidirectional_iterator_tag iterator_category
std::bidirectional_iterator_tag iterator_category
ptrdiff_t difference_type
xml_node first_child() const
xml_node next_sibling() const
xml_attribute find_attribute(Predicate pred) const
xml_node find_node(Predicate pred) const
xml_attribute_iterator attribute_iterator
xml_node find_child(Predicate pred) const
xml_node_iterator iterator
xml_object_range(It b, It e)
virtual bool for_each(xml_node &node)=0
virtual void write(const void *data, size_t size)=0
const xpath_node * const_iterator
const xpath_node * iterator
xpath_variable(const xpath_variable &)
xpath_variable & operator=(const xpath_variable &)
const unsigned int format_no_empty_element_tags
std::basic_string< PUGIXML_CHAR, std::char_traits< PUGIXML_CHAR >, std::allocator< PUGIXML_CHAR > > string_t
PUGI__FN deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function()
PUGI__FN allocation_function PUGIXML_FUNCTION get_memory_allocation_function()
const unsigned int format_no_declaration
const unsigned int parse_trim_pcdata
const unsigned int parse_wconv_attribute
const unsigned int format_skip_control_chars
const unsigned int format_raw
const unsigned int format_default
void(* deallocation_function)(void *ptr)
const int default_double_precision
const unsigned int parse_cdata
void *(* allocation_function)(size_t size)
PUGI__FN std::string PUGIXML_FUNCTION as_utf8(const wchar_t *str)
const unsigned int parse_fragment
const unsigned int parse_full
const unsigned int parse_embed_pcdata
const unsigned int parse_wnorm_attribute
const unsigned int format_indent_attributes
const unsigned int parse_pi
@ status_append_invalid_root
@ status_end_element_mismatch
@ status_bad_start_element
@ status_unrecognized_tag
@ status_no_document_element
const unsigned int format_save_file_text
const unsigned int parse_escapes
const unsigned int format_write_bom
PUGI__FN void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate)
const unsigned int format_attribute_single_quote
const unsigned int format_indent
const unsigned int parse_eol
const unsigned int parse_default
const unsigned int parse_declaration
const unsigned int parse_comments
PUGI__FN std::basic_string< wchar_t > PUGIXML_FUNCTION as_wide(const char *str)
const unsigned int parse_ws_pcdata
const unsigned int parse_minimal
const unsigned int parse_ws_pcdata_single
const unsigned int format_no_escapes
const int default_float_precision
const unsigned int parse_doctype
PUGI__FN void reverse(I begin, I end)
void remove_attribute(xml_attribute_struct *attr, xml_node_struct *node)
PUGI__FN void sort(I begin, I end, const Pred &pred)
void insert_attribute_before(xml_attribute_struct *attr, xml_attribute_struct *place, xml_node_struct *node)
void append_attribute(xml_attribute_struct *attr, xml_node_struct *node)
void prepend_attribute(xml_attribute_struct *attr, xml_node_struct *node)
void insert_attribute_after(xml_attribute_struct *attr, xml_attribute_struct *place, xml_node_struct *node)
#define PUGIXML_DEPRECATED
#define PUGIXML_NOEXCEPT_IF_NOT_COMPACT
static bool operator<(const QStringView &entityStr, const TextHtmlEntity &entity)