16 #ifndef PUGIXML_VERSION
17 # define PUGIXML_VERSION 1130
23 #ifndef HEADER_PUGIXML_HPP
24 #define HEADER_PUGIXML_HPP
30 #if !defined(PUGIXML_NO_XPATH) && !defined(PUGIXML_NO_EXCEPTIONS)
35 #ifndef PUGIXML_NO_STL
42 #ifndef PUGIXML_DEPRECATED
43 # if defined(__GNUC__)
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
97 #ifdef PUGIXML_COMPACT
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
118 # elif defined(_MSC_VER) && _MSC_VER >= 1600
119 # define PUGIXML_NULL nullptr
121 # define PUGIXML_NULL 0
126 #ifdef PUGIXML_WCHAR_MODE
127 # define PUGIXML_TEXT(t) L ## t
128 # define PUGIXML_CHAR wchar_t
130 # define PUGIXML_TEXT(t) t
131 # define PUGIXML_CHAR char
139 #ifndef PUGIXML_NO_STL
141 typedef std::basic_string<PUGIXML_CHAR, std::char_traits<PUGIXML_CHAR>, std::allocator<PUGIXML_CHAR> >
string_t;
296 #ifndef PUGIXML_NO_XPATH
330 virtual void write(
const void* data,
size_t size) = 0;
346 #ifndef PUGIXML_NO_STL
353 xml_writer_stream(std::basic_ostream<
wchar_t, std::char_traits<wchar_t> >& stream);
359 std::basic_ostream<wchar_t, std::char_traits<wchar_t> >*
wide_stream;
382 operator unspecified_bool_type()
const;
385 bool operator!()
const;
399 const char_t* name()
const;
406 int as_int(
int def = 0)
const;
407 unsigned int as_uint(
unsigned int def = 0)
const;
408 double as_double(
double def = 0)
const;
409 float as_float(
float def = 0)
const;
411 #ifdef PUGIXML_HAS_LONG_LONG
412 long long as_llong(
long long def = 0)
const;
413 unsigned long long as_ullong(
unsigned long long def = 0)
const;
417 bool as_bool(
bool def =
false)
const;
420 bool set_name(
const char_t* rhs);
421 bool set_value(
const char_t* rhs,
size_t sz);
422 bool set_value(
const char_t* rhs);
425 bool set_value(
int rhs);
426 bool set_value(
unsigned int rhs);
427 bool set_value(
long rhs);
428 bool set_value(
unsigned long rhs);
429 bool set_value(
double rhs);
430 bool set_value(
double rhs,
int precision);
431 bool set_value(
float rhs);
432 bool set_value(
float rhs,
int precision);
433 bool set_value(
bool rhs);
435 #ifdef PUGIXML_HAS_LONG_LONG
436 bool set_value(
long long rhs);
437 bool set_value(
unsigned long long rhs);
450 #ifdef PUGIXML_HAS_LONG_LONG
460 size_t hash_value()
const;
482 typedef void (*unspecified_bool_type)(
xml_node***);
492 operator unspecified_bool_type()
const;
495 bool operator!()
const;
501 bool operator>(
const xml_node& r)
const;
502 bool operator<=(
const xml_node& r)
const;
503 bool operator>=(
const xml_node& r)
const;
512 const char_t* name()
const;
549 const char_t* child_value()
const;
555 bool set_name(
const char_t* rhs);
556 bool set_value(
const char_t* rhs,
size_t sz);
557 bool set_value(
const char_t* rhs);
600 bool remove_attributes();
603 bool remove_child(
const xml_node& n);
604 bool remove_child(
const char_t* name);
607 bool remove_children();
647 if (pred(cur))
return cur;
666 #ifndef PUGIXML_NO_STL
677 #ifndef PUGIXML_NO_XPATH
695 #ifndef PUGIXML_NO_STL
698 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;
722 ptrdiff_t offset_debug()
const;
725 size_t hash_value()
const;
744 typedef void (*unspecified_bool_type)(
xml_text***);
756 operator unspecified_bool_type()
const;
759 bool operator!()
const;
771 int as_int(
int def = 0)
const;
772 unsigned int as_uint(
unsigned int def = 0)
const;
773 double as_double(
double def = 0)
const;
774 float as_float(
float def = 0)
const;
776 #ifdef PUGIXML_HAS_LONG_LONG
777 long long as_llong(
long long def = 0)
const;
778 unsigned long long as_ullong(
unsigned long long def = 0)
const;
782 bool as_bool(
bool def =
false)
const;
785 bool set(
const char_t* rhs,
size_t sz);
786 bool set(
const char_t* rhs);
790 bool set(
unsigned int rhs);
792 bool set(
unsigned long rhs);
793 bool set(
double rhs);
794 bool set(
double rhs,
int precision);
796 bool set(
float rhs,
int precision);
799 #ifdef PUGIXML_HAS_LONG_LONG
800 bool set(
long long rhs);
801 bool set(
unsigned long long rhs);
807 xml_text& operator=(
unsigned int rhs);
809 xml_text& operator=(
unsigned long rhs);
814 #ifdef PUGIXML_HAS_LONG_LONG
816 xml_text& operator=(
unsigned long long rhs);
847 #ifndef PUGIXML_NO_STL
889 #ifndef PUGIXML_NO_STL
925 #ifndef PUGIXML_NO_STL
1026 operator bool()
const;
1029 const char* description()
const;
1055 #ifdef PUGIXML_HAS_MOVE
1067 #ifndef PUGIXML_NO_STL
1097 #ifndef PUGIXML_NO_STL
1111 #ifndef PUGIXML_NO_XPATH
1135 operator bool()
const;
1138 const char* description()
const;
1158 const char_t* name()
const;
1164 bool get_boolean()
const;
1165 double get_number()
const;
1166 const char_t* get_string()
const;
1170 bool set(
bool value);
1171 bool set(
double value);
1199 #ifdef PUGIXML_HAS_MOVE
1209 bool set(
const char_t* name,
bool value);
1210 bool set(
const char_t* name,
double value);
1243 #ifdef PUGIXML_HAS_MOVE
1254 bool evaluate_boolean(
const xpath_node& n)
const;
1258 double evaluate_number(
const xpath_node& n)
const;
1260 #ifndef PUGIXML_NO_STL
1270 size_t evaluate_string(
char_t* buffer,
size_t capacity,
const xpath_node& n)
const;
1287 operator unspecified_bool_type()
const;
1290 bool operator!()
const;
1293 #ifndef PUGIXML_NO_EXCEPTIONS
1294 #if defined(_MSC_VER)
1297 #pragma warning(push)
1298 #pragma warning(disable: 4275)
1316 #if defined(_MSC_VER)
1317 #pragma warning(pop)
1346 operator unspecified_bool_type()
const;
1349 bool operator!()
const;
1393 #ifdef PUGIXML_HAS_MOVE
1403 size_t size()
const;
1406 const xpath_node& operator[](
size_t index)
const;
1434 #ifndef PUGIXML_NO_STL
1436 std::basic_string<char, std::char_traits<char>, std::allocator<char> >
PUGIXML_FUNCTION as_utf8(
const wchar_t* str);
1437 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);
1440 std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >
PUGIXML_FUNCTION as_wide(
const char* str);
1441 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);
1445 typedef void* (*allocation_function)(
size_t size);
1458 #if !defined(PUGIXML_NO_STL) && (defined(_MSC_VER) || defined(__ICC))
1468 #if !defined(PUGIXML_NO_STL) && defined(__SUNPRO_CC)
1482 #if defined(PUGIXML_HEADER_ONLY) && !defined(PUGIXML_SOURCE)
1483 # define PUGIXML_SOURCE "pugixml.cpp"
1484 # include PUGIXML_SOURCE
bool operator!=(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
Definition: json.hpp:15536
Definition: pugixml.hpp:873
ptrdiff_t difference_type
Definition: pugixml.hpp:884
xml_attribute value_type
Definition: pugixml.hpp:885
xml_node _parent
Definition: pugixml.hpp:878
xml_attribute _wrap
Definition: pugixml.hpp:877
xml_attribute * pointer
Definition: pugixml.hpp:886
std::bidirectional_iterator_tag iterator_category
Definition: pugixml.hpp:890
xml_attribute & reference
Definition: pugixml.hpp:887
Definition: pugixml.hpp:365
xml_attribute_struct * _attr
Definition: pugixml.hpp:370
xml_attribute next_attribute() const
Definition: pugixml.cpp:5235
Definition: pugixml.hpp:1034
xml_document(const xml_document &)
char_t * _buffer
Definition: pugixml.hpp:1036
void _move(xml_document &rhs) PUGIXML_NOEXCEPT_IF_NOT_COMPACT
xml_document & operator=(const xml_document &)
Definition: pugixml.hpp:915
ptrdiff_t difference_type
Definition: pugixml.hpp:920
xml_node & reference
Definition: pugixml.hpp:923
const char_t * _name
Definition: pugixml.hpp:952
xml_node _wrap
Definition: pugixml.hpp:950
xml_node value_type
Definition: pugixml.hpp:921
std::bidirectional_iterator_tag iterator_category
Definition: pugixml.hpp:926
xml_node _parent
Definition: pugixml.hpp:951
xml_node * pointer
Definition: pugixml.hpp:922
Definition: pugixml.hpp:831
xml_node value_type
Definition: pugixml.hpp:843
xml_node _parent
Definition: pugixml.hpp:836
xml_node * pointer
Definition: pugixml.hpp:844
xml_node _wrap
Definition: pugixml.hpp:835
std::bidirectional_iterator_tag iterator_category
Definition: pugixml.hpp:848
xml_node & reference
Definition: pugixml.hpp:845
ptrdiff_t difference_type
Definition: pugixml.hpp:842
Definition: pugixml.hpp:474
xml_node parent() const
Definition: pugixml.cpp:5727
xml_attribute find_attribute(Predicate pred) const
Definition: pugixml.hpp:615
xml_node_struct * _root
Definition: pugixml.hpp:480
xml_node find_node(Predicate pred) const
Definition: pugixml.hpp:639
xml_attribute_iterator attribute_iterator
Definition: pugixml.hpp:708
xml_node first_child() const
Definition: pugixml.cpp:5778
xml_node find_child(Predicate pred) const
Definition: pugixml.hpp:627
xml_node_iterator iterator
Definition: pugixml.hpp:702
xml_node next_sibling() const
Definition: pugixml.cpp:5662
Definition: pugixml.hpp:305
It iterator
Definition: pugixml.hpp:308
It begin() const
Definition: pugixml.hpp:314
bool empty() const
Definition: pugixml.hpp:317
It _begin
Definition: pugixml.hpp:320
xml_object_range(It b, It e)
Definition: pugixml.hpp:310
It end() const
Definition: pugixml.hpp:315
It const_iterator
Definition: pugixml.hpp:307
It _end
Definition: pugixml.hpp:320
Definition: pugixml.hpp:739
xml_node_struct * _root
Definition: pugixml.hpp:742
Definition: pugixml.hpp:959
virtual bool for_each(xml_node &node)=0
int _depth
Definition: pugixml.hpp:963
Definition: pugixml.hpp:335
void * file
Definition: pugixml.hpp:343
Definition: pugixml.hpp:349
std::basic_ostream< wchar_t, std::char_traits< wchar_t > > * wide_stream
Definition: pugixml.hpp:359
std::basic_ostream< char, std::char_traits< char > > * narrow_stream
Definition: pugixml.hpp:358
Definition: pugixml.hpp:325
virtual void write(const void *data, size_t size)=0
Definition: pugixml.hpp:1302
xpath_parse_result _result
Definition: pugixml.hpp:1304
Definition: pugixml.hpp:1364
type_t _type
Definition: pugixml.hpp:1422
const xpath_node * const_iterator
Definition: pugixml.hpp:1375
type_t
Definition: pugixml.hpp:1368
@ type_unsorted
Definition: pugixml.hpp:1369
@ type_sorted
Definition: pugixml.hpp:1370
const xpath_node * iterator
Definition: pugixml.hpp:1378
xpath_node * _begin
Definition: pugixml.hpp:1426
xpath_node * _end
Definition: pugixml.hpp:1427
void _move(xpath_node_set &rhs) PUGIXML_NOEXCEPT
Definition: pugixml.hpp:1323
xml_node _node
Definition: pugixml.hpp:1325
xml_attribute _attribute
Definition: pugixml.hpp:1326
Definition: pugixml.hpp:1221
xpath_parse_result _result
Definition: pugixml.hpp:1224
xpath_query & operator=(const xpath_query &)
xpath_query(const xpath_query &)
void * _impl
Definition: pugixml.hpp:1223
Definition: pugixml.hpp:1178
Definition: pugixml.hpp:1143
xpath_variable * _next
Definition: pugixml.hpp:1148
xpath_variable & operator=(const xpath_variable &)
xpath_variable(const xpath_variable &)
xpath_value_type _type
Definition: pugixml.hpp:1147
bool operator==(const cp< d > &a, const cp< d > &b)
Contact equivalence is based solely on the index of objects in contact i and j.
Definition: ContactList.h:291
bool operator<(const cp< d > &a, const cp< d > &b)
The contact list is order in increasing order of index i, and for two identical i in increasing order...
Definition: ContactList.h:289
v1d operator*(v1d a, double b)
Definition: Tools.cpp:9
type
The type the bitset is encoded with.
Definition: bitset.hpp:44
OutIt print(OutIt out, const xml_node< Ch > &node, int flags=0)
Definition: rapidxml_print.hpp:394
void save(Archive &ar, SetT const &set)
Definition: set.hpp:42
void load(Archive &ar, SetT &set)
Definition: set.hpp:52
auto get(const nlohmann::detail::iteration_proxy_value< IteratorType > &i) -> decltype(i.key())
Definition: json.hpp:5657
Definition: pugixml.cpp:1109
const unsigned int format_no_empty_element_tags
Definition: pugixml.hpp:265
xml_encoding
Definition: pugixml.hpp:228
@ encoding_utf32
Definition: pugixml.hpp:236
@ encoding_utf16_le
Definition: pugixml.hpp:231
@ encoding_utf32_be
Definition: pugixml.hpp:235
@ encoding_utf16_be
Definition: pugixml.hpp:232
@ encoding_utf8
Definition: pugixml.hpp:230
@ encoding_latin1
Definition: pugixml.hpp:238
@ encoding_utf16
Definition: pugixml.hpp:233
@ encoding_utf32_le
Definition: pugixml.hpp:234
@ encoding_auto
Definition: pugixml.hpp:229
@ encoding_wchar
Definition: pugixml.hpp:237
std::basic_string< PUGIXML_CHAR, std::char_traits< PUGIXML_CHAR >, std::allocator< PUGIXML_CHAR > > string_t
Definition: pugixml.hpp:141
PUGI_IMPL_FN deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function()
Definition: pugixml.cpp:7514
PUGI_IMPL_FN allocation_function PUGIXML_FUNCTION get_memory_allocation_function()
Definition: pugixml.cpp:7509
const unsigned int format_no_declaration
Definition: pugixml.hpp:253
xml_node_type
Definition: pugixml.hpp:150
@ node_comment
Definition: pugixml.hpp:156
@ node_pcdata
Definition: pugixml.hpp:154
@ node_element
Definition: pugixml.hpp:153
@ node_doctype
Definition: pugixml.hpp:159
@ node_document
Definition: pugixml.hpp:152
@ node_declaration
Definition: pugixml.hpp:158
@ node_pi
Definition: pugixml.hpp:157
@ node_null
Definition: pugixml.hpp:151
@ node_cdata
Definition: pugixml.hpp:155
const unsigned int parse_trim_pcdata
Definition: pugixml.hpp:205
const unsigned int parse_wconv_attribute
Definition: pugixml.hpp:188
const unsigned int format_skip_control_chars
Definition: pugixml.hpp:268
const unsigned int format_raw
Definition: pugixml.hpp:250
const unsigned int format_default
Definition: pugixml.hpp:275
void(* deallocation_function)(void *ptr)
Definition: pugixml.hpp:1448
const int default_double_precision
Definition: pugixml.hpp:277
const unsigned int parse_cdata
Definition: pugixml.hpp:175
PUGI_IMPL_FN std::string PUGIXML_FUNCTION as_utf8(const wchar_t *str)
Definition: pugixml.cpp:7478
const unsigned int parse_fragment
Definition: pugixml.hpp:209
void *(* allocation_function)(size_t size)
Definition: pugixml.hpp:1445
const unsigned int parse_full
Definition: pugixml.hpp:224
const unsigned int parse_embed_pcdata
Definition: pugixml.hpp:214
const unsigned int parse_wnorm_attribute
Definition: pugixml.hpp:191
const unsigned int format_indent_attributes
Definition: pugixml.hpp:262
const unsigned int parse_pi
Definition: pugixml.hpp:169
xml_parse_status
Definition: pugixml.hpp:985
@ status_append_invalid_root
Definition: pugixml.hpp:1005
@ status_end_element_mismatch
Definition: pugixml.hpp:1003
@ status_bad_end_element
Definition: pugixml.hpp:1002
@ status_io_error
Definition: pugixml.hpp:989
@ status_bad_attribute
Definition: pugixml.hpp:1001
@ status_file_not_found
Definition: pugixml.hpp:988
@ status_internal_error
Definition: pugixml.hpp:991
@ status_bad_start_element
Definition: pugixml.hpp:1000
@ status_ok
Definition: pugixml.hpp:986
@ status_bad_comment
Definition: pugixml.hpp:996
@ status_bad_doctype
Definition: pugixml.hpp:998
@ status_out_of_memory
Definition: pugixml.hpp:990
@ status_unrecognized_tag
Definition: pugixml.hpp:993
@ status_bad_cdata
Definition: pugixml.hpp:997
@ status_bad_pcdata
Definition: pugixml.hpp:999
@ status_bad_pi
Definition: pugixml.hpp:995
@ status_no_document_element
Definition: pugixml.hpp:1007
const unsigned int format_save_file_text
Definition: pugixml.hpp:259
const unsigned int parse_escapes
Definition: pugixml.hpp:182
const unsigned int format_write_bom
Definition: pugixml.hpp:247
PUGI_IMPL_FN void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate)
Definition: pugixml.cpp:7503
const unsigned int format_attribute_single_quote
Definition: pugixml.hpp:271
const unsigned int format_indent
Definition: pugixml.hpp:244
const unsigned int parse_eol
Definition: pugixml.hpp:185
const unsigned int parse_default
Definition: pugixml.hpp:219
const unsigned int parse_declaration
Definition: pugixml.hpp:194
const unsigned int parse_comments
Definition: pugixml.hpp:172
PUGI_IMPL_FN std::basic_string< wchar_t > PUGIXML_FUNCTION as_wide(const char *str)
Definition: pugixml.cpp:7490
xpath_value_type
Definition: pugixml.hpp:1114
@ xpath_type_number
Definition: pugixml.hpp:1117
@ xpath_type_boolean
Definition: pugixml.hpp:1119
@ xpath_type_none
Definition: pugixml.hpp:1115
@ xpath_type_string
Definition: pugixml.hpp:1118
@ xpath_type_node_set
Definition: pugixml.hpp:1116
const unsigned int parse_ws_pcdata
Definition: pugixml.hpp:179
const unsigned int parse_minimal
Definition: pugixml.hpp:166
const unsigned int parse_ws_pcdata_single
Definition: pugixml.hpp:202
const unsigned int format_no_escapes
Definition: pugixml.hpp:256
PUGIXML_CHAR char_t
Definition: pugixml.hpp:137
const int default_float_precision
Definition: pugixml.hpp:278
const unsigned int parse_doctype
Definition: pugixml.hpp:197
Definition: json.hpp:5678
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1282
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1181
PUGI_IMPL_FN void sort(I begin, I end, const Pred &pred)
Definition: pugixml.cpp:7707
PUGI_IMPL_FN void reverse(I begin, I end)
Definition: pugixml.cpp:7615
void remove_attribute(xml_attribute_struct *attr, xml_node_struct *node)
Definition: pugixml.cpp:1409
void insert_attribute_before(xml_attribute_struct *attr, xml_attribute_struct *place, xml_node_struct *node)
Definition: pugixml.cpp:1395
void append_attribute(xml_attribute_struct *attr, xml_node_struct *node)
Definition: pugixml.cpp:1346
void prepend_attribute(xml_attribute_struct *attr, xml_node_struct *node)
Definition: pugixml.cpp:1365
void insert_attribute_after(xml_attribute_struct *attr, xml_attribute_struct *place, xml_node_struct *node)
Definition: pugixml.cpp:1381
#define PUGIXML_NULL
Definition: pugixml.hpp:121
#define PUGIXML_DEPRECATED
Definition: pugixml.hpp:48
#define PUGIXML_NOEXCEPT_IF_NOT_COMPACT
Definition: pugixml.hpp:100
#define PUGIXML_FUNCTION
Definition: pugixml.hpp:64
#define PUGIXML_NOEXCEPT
Definition: pugixml.hpp:92
#define PUGIXML_OVERRIDE
Definition: pugixml.hpp:110
#define PUGIXML_CLASS
Definition: pugixml.hpp:59
#define PUGIXML_TEXT(t)
Definition: pugixml.hpp:130
#define PUGIXML_CHAR
Definition: pugixml.hpp:131
Definition: pugixml.cpp:1111
Definition: pugixml.cpp:1127
Definition: pugixml.hpp:1012
xml_encoding encoding
Definition: pugixml.hpp:1020
ptrdiff_t offset
Definition: pugixml.hpp:1017
xml_parse_status status
Definition: pugixml.hpp:1014
Definition: pugixml.hpp:1124
const char * error
Definition: pugixml.hpp:1126
ptrdiff_t offset
Definition: pugixml.hpp:1129
#define const
Definition: zconf.h:233