16 #ifndef PUGIXML_VERSION 18 # define PUGIXML_VERSION 170 28 #if !defined(PUGIXML_NO_XPATH) && !defined(PUGIXML_NO_EXCEPTIONS) 33 #ifndef PUGIXML_NO_STL 40 #ifndef PUGIXML_DEPRECATED 41 # if defined(__GNUC__) 42 # define PUGIXML_DEPRECATED __attribute__((deprecated)) 43 # elif defined(_MSC_VER) && _MSC_VER >= 1300 44 # define PUGIXML_DEPRECATED __declspec(deprecated) 46 # define PUGIXML_DEPRECATED 57 # define PUGIXML_CLASS PUGIXML_API 61 #ifndef PUGIXML_FUNCTION 62 # define PUGIXML_FUNCTION PUGIXML_API 66 #ifndef PUGIXML_HAS_LONG_LONG 67 # if __cplusplus >= 201103 68 # define PUGIXML_HAS_LONG_LONG 69 # elif defined(_MSC_VER) && _MSC_VER >= 1400 70 # define PUGIXML_HAS_LONG_LONG 75 #ifdef PUGIXML_WCHAR_MODE 76 # define PUGIXML_TEXT(t) L ## t 77 # define PUGIXML_CHAR wchar_t 79 # define PUGIXML_TEXT(t) t 80 # define PUGIXML_CHAR char 88 #ifndef PUGIXML_NO_STL 90 using string_t = std::basic_string<PUGIXML_CHAR, std::char_traits<PUGIXML_CHAR>, std::allocator<PUGIXML_CHAR>>;
218 struct xml_attribute_struct;
219 struct xml_node_struct;
233 #ifndef PUGIXML_NO_XPATH 265 virtual void write(
const void* data,
size_t size) = 0;
275 virtual void write(
const void* data,
size_t size);
281 #ifndef PUGIXML_NO_STL 288 xml_writer_stream(std::basic_ostream<
wchar_t, std::char_traits<wchar_t> >& stream);
290 virtual void write(
const void* data,
size_t size);
294 std::basic_ostream<wchar_t, std::char_traits<wchar_t> >*
wide_stream;
320 bool operator!()
const;
334 const char_t* name()
const;
335 const char_t* value()
const;
341 int as_int(
int def = 0)
const;
342 unsigned int as_uint(
unsigned int def = 0)
const;
343 double as_double(
double def = 0)
const;
344 float as_float(
float def = 0)
const;
346 #ifdef PUGIXML_HAS_LONG_LONG 347 long long as_llong(
long long def = 0)
const;
348 unsigned long long as_ullong(
unsigned long long def = 0)
const;
352 bool as_bool(
bool def =
false)
const;
355 bool set_name(
const char_t* rhs);
356 bool set_value(
const char_t* rhs);
359 bool set_value(
int rhs);
360 bool set_value(
unsigned int rhs);
361 bool set_value(
double rhs);
362 bool set_value(
float rhs);
363 bool set_value(
bool rhs);
365 #ifdef PUGIXML_HAS_LONG_LONG 366 bool set_value(
long long rhs);
367 bool set_value(
unsigned long long rhs);
378 #ifdef PUGIXML_HAS_LONG_LONG 388 size_t hash_value()
const;
391 xml_attribute_struct* internal_object()
const;
417 explicit xml_node(xml_node_struct* p);
423 bool operator!()
const;
440 const char_t* name()
const;
444 const char_t* value()
const;
477 const char_t* child_value()
const;
483 bool set_name(
const char_t* rhs);
484 bool set_value(
const char_t* rhs);
524 bool remove_attribute(
const char_t* name);
527 bool remove_child(
const xml_node& n);
528 bool remove_child(
const char_t* name);
568 if (pred(cur))
return cur;
587 #ifndef PUGIXML_NO_STL 598 #ifndef PUGIXML_NO_XPATH 616 #ifndef PUGIXML_NO_STL 619 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;
640 ptrdiff_t offset_debug()
const;
643 size_t hash_value()
const;
646 xml_node_struct* internal_object()
const;
664 explicit xml_text(xml_node_struct* root);
666 xml_node_struct* _data_new();
667 xml_node_struct* _data()
const;
677 bool operator!()
const;
683 const char_t*
get()
const;
689 int as_int(
int def = 0)
const;
690 unsigned int as_uint(
unsigned int def = 0)
const;
691 double as_double(
double def = 0)
const;
692 float as_float(
float def = 0)
const;
694 #ifdef PUGIXML_HAS_LONG_LONG 695 long long as_llong(
long long def = 0)
const;
696 unsigned long long as_ullong(
unsigned long long def = 0)
const;
700 bool as_bool(
bool def =
false)
const;
703 bool set(
const char_t* rhs);
707 bool set(
unsigned int rhs);
708 bool set(
double rhs);
712 #ifdef PUGIXML_HAS_LONG_LONG 713 bool set(
long long rhs);
714 bool set(
unsigned long long rhs);
720 xml_text& operator=(
unsigned int rhs);
725 #ifdef PUGIXML_HAS_LONG_LONG 727 xml_text& operator=(
unsigned long long rhs);
758 #ifndef PUGIXML_NO_STL 800 #ifndef PUGIXML_NO_STL 836 #ifndef PUGIXML_NO_STL 936 operator bool()
const;
939 const char* description()
const;
970 #ifndef PUGIXML_NO_STL 973 xml_parse_result load(std::basic_istream<
wchar_t, std::char_traits<wchar_t> >& stream,
unsigned int options = parse_default);
1000 #ifndef PUGIXML_NO_STL 1003 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;
1014 #ifndef PUGIXML_NO_XPATH 1038 operator bool()
const;
1041 const char* description()
const;
1061 const char_t* name()
const;
1067 bool get_boolean()
const;
1068 double get_number()
const;
1069 const char_t* get_string()
const;
1073 bool set(
bool value);
1074 bool set(
double value);
1075 bool set(
const char_t* value);
1102 #if __cplusplus >= 201103 1112 bool set(
const char_t* name,
bool value);
1113 bool set(
const char_t* name,
double value);
1146 #if __cplusplus >= 201103 1157 bool evaluate_boolean(
const xpath_node& n)
const;
1161 double evaluate_number(
const xpath_node& n)
const;
1163 #ifndef PUGIXML_NO_STL 1173 size_t evaluate_string(
char_t* buffer,
size_t capacity,
const xpath_node& n)
const;
1193 bool operator!()
const;
1196 #ifndef PUGIXML_NO_EXCEPTIONS 1208 virtual const char* what()
const throw();
1243 bool operator!()
const;
1287 #if __cplusplus >= 201103 1297 size_t size()
const;
1300 const xpath_node& operator[](
size_t index)
const;
1328 #ifndef PUGIXML_NO_STL 1330 std::basic_string<char, std::char_traits<char>, std::allocator<char> >
PUGIXML_FUNCTION as_utf8(
const wchar_t* str);
1331 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);
1334 std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >
PUGIXML_FUNCTION as_wide(
const char* str);
1335 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);
1352 #if !defined(PUGIXML_NO_STL) && (defined(_MSC_VER) || defined(__ICC)) 1362 #if !defined(PUGIXML_NO_STL) && defined(__SUNPRO_CC) 1374 #if defined(PUGIXML_HEADER_ONLY) && !defined(PUGIXML_SOURCE) 1375 # define PUGIXML_SOURCE "pugixml.cpp" 1376 # include PUGIXML_SOURCE
std::basic_string< char, std::char_traits< char >, std::allocator< char > > PUGIXML_FUNCTION as_utf8(const wchar_t *str)
xml_node find_child(Predicate pred) const
std::basic_ostream< char, std::char_traits< char > > * narrow_stream
xml_node find_node(Predicate pred) const
void(*)(xpath_node ***) unspecified_bool_type
std::basic_string< wchar_t, std::char_traits< wchar_t >, std::allocator< wchar_t > > PUGIXML_FUNCTION as_wide(const char *str)
const unsigned int parse_ws_pcdata_single
xml_object_range(It b, It e)
const unsigned int parse_embed_pcdata
const unsigned int parse_minimal
ptrdiff_t difference_type
std::bidirectional_iterator_tag iterator_category
void(*)(xml_node ***) unspecified_bool_type
void *(*)(size_t size) allocation_function
void(*)(xpath_query ***) unspecified_bool_type
const unsigned int parse_escapes
void(*)(xml_text ***) unspecified_bool_type
const unsigned int format_write_bom
const unsigned int parse_trim_pcdata
const unsigned int parse_comments
const unsigned int parse_wnorm_attribute
std::basic_string< PUGIXML_CHAR, std::char_traits< PUGIXML_CHAR >, std::allocator< PUGIXML_CHAR > > string_t
const unsigned int parse_eol
const unsigned int parse_ws_pcdata
allocation_function PUGIXML_FUNCTION get_memory_allocation_function()
void sort(T *array, int size, LessThan lt)
xpath_parse_result _result
bool operator>(int lhs, BoyerMyrvoldPlanar::EmbeddingGrade rhs)
const unsigned int format_default
xml_attribute find_attribute(Predicate pred) const
void(*)(void *ptr) deallocation_function
std::bidirectional_iterator_tag iterator_category
const unsigned int parse_full
deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function()
void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate)
std::bidirectional_iterator_tag iterator_category
const unsigned int format_save_file_text
const unsigned int parse_declaration
bool operator>=(const MDMFLengthAttribute &x, const MDMFLengthAttribute &y)
NodeElement * node
The type of nodes.
const unsigned int parse_fragment
const unsigned int parse_default
const unsigned int format_no_declaration
const unsigned int format_raw
const unsigned int format_no_escapes
std::basic_ostream< wchar_t, std::char_traits< wchar_t > > * wide_stream
const unsigned int parse_doctype
xml_attribute_struct * _attr
bool operator<(const MDMFLengthAttribute &x, const MDMFLengthAttribute &y)
ptrdiff_t difference_type
void(*)(xml_attribute ***) unspecified_bool_type
const unsigned int format_indent
xml_node next_sibling() const
const unsigned int parse_pi
const unsigned int parse_wconv_attribute
void print(std::ostream &os, const Array< E, INDEX > &a, char delim=' ')
Prints array a to output stream os using delimiter delim.
bool operator<=(int lhs, BoyerMyrvoldPlanar::EmbeddingGrade rhs)
Reverse< T > reverse(T &container)
Provides iterators for container to make it easily iterable in reverse.
xml_attribute next_attribute() const
bool operator==(const Tuple2< E1, E2 > &t1, const Tuple2< E1, E2 > &t2)
Equality operator for 2-tuples.
bool operator!=(const Tuple2< E1, E2 > &t1, const Tuple2< E1, E2 > &t2)
Inequality operator for 2-tuples.
xml_node first_child() const
const unsigned int parse_cdata
ptrdiff_t difference_type
const unsigned int format_indent_attributes