14 #ifndef PUGIXML_VERSION 16 # define PUGIXML_VERSION 190 22 #ifndef HEADER_PUGIXML_HPP 23 #define HEADER_PUGIXML_HPP 29 #if !defined(PUGIXML_NO_XPATH) && !defined(PUGIXML_NO_EXCEPTIONS) 34 #ifndef PUGIXML_NO_STL 41 #ifndef PUGIXML_DEPRECATED 42 # if defined(__GNUC__) 43 # define PUGIXML_DEPRECATED __attribute__((deprecated)) 44 # elif defined(_MSC_VER) && _MSC_VER >= 1300 45 # define PUGIXML_DEPRECATED __declspec(deprecated) 47 # define PUGIXML_DEPRECATED 58 # define PUGIXML_CLASS PUGIXML_API 62 #ifndef PUGIXML_FUNCTION 63 # define PUGIXML_FUNCTION PUGIXML_API 67 #ifndef PUGIXML_HAS_LONG_LONG 68 # if __cplusplus >= 201103 69 # define PUGIXML_HAS_LONG_LONG 70 # elif defined(_MSC_VER) && _MSC_VER >= 1400 71 # define PUGIXML_HAS_LONG_LONG 76 #ifndef PUGIXML_HAS_MOVE 77 # if __cplusplus >= 201103 78 # define PUGIXML_HAS_MOVE 79 # elif defined(_MSC_VER) && _MSC_VER >= 1600 80 # define PUGIXML_HAS_MOVE 85 #ifndef PUGIXML_NOEXCEPT 86 # if __cplusplus >= 201103 87 # define PUGIXML_NOEXCEPT noexcept 88 # elif defined(_MSC_VER) && _MSC_VER >= 1900 89 # define PUGIXML_NOEXCEPT noexcept 91 # define PUGIXML_NOEXCEPT 96 #ifdef PUGIXML_COMPACT 97 # define PUGIXML_NOEXCEPT_IF_NOT_COMPACT 99 # define PUGIXML_NOEXCEPT_IF_NOT_COMPACT PUGIXML_NOEXCEPT 103 #ifndef PUGIXML_OVERRIDE 104 # if __cplusplus >= 201103 105 # define PUGIXML_OVERRIDE override 106 # elif defined(_MSC_VER) && _MSC_VER >= 1700 107 # define PUGIXML_OVERRIDE override 109 # define PUGIXML_OVERRIDE 114 #ifdef PUGIXML_WCHAR_MODE 115 # define PUGIXML_TEXT(t) L ## t 116 # define PUGIXML_CHAR wchar_t 118 # define PUGIXML_TEXT(t) t 119 # define PUGIXML_CHAR char 127 #ifndef PUGIXML_NO_STL 129 typedef std::basic_string<PUGIXML_CHAR, std::char_traits<PUGIXML_CHAR>, std::allocator<PUGIXML_CHAR> >
string_t;
260 struct xml_attribute_struct;
261 struct xml_node_struct;
275 #ifndef PUGIXML_NO_XPATH 294 It
end()
const {
return _end; }
307 virtual void write(
const void*
data,
size_t size) = 0;
323 #ifndef PUGIXML_NO_STL 335 std::basic_ostream<char, std::char_traits<char> >* narrow_stream;
336 std::basic_ostream<wchar_t, std::char_traits<wchar_t> >* wide_stream;
347 xml_attribute_struct* _attr;
359 operator unspecified_bool_type()
const;
362 bool operator!()
const;
383 int as_int(
int def = 0)
const;
384 unsigned int as_uint(
unsigned int def = 0)
const;
385 double as_double(
double def = 0)
const;
386 float as_float(
float def = 0)
const;
388 #ifdef PUGIXML_HAS_LONG_LONG 389 long long as_llong(
long long def = 0)
const;
390 unsigned long long as_ullong(
unsigned long long def = 0)
const;
394 bool as_bool(
bool def =
false)
const;
397 bool set_name(
const char_t* rhs);
398 bool set_value(
const char_t* rhs);
401 bool set_value(
int rhs);
402 bool set_value(
unsigned int rhs);
403 bool set_value(
long rhs);
404 bool set_value(
unsigned long rhs);
405 bool set_value(
double rhs);
406 bool set_value(
float rhs);
407 bool set_value(
bool rhs);
409 #ifdef PUGIXML_HAS_LONG_LONG 410 bool set_value(
long long rhs);
411 bool set_value(
unsigned long long rhs);
424 #ifdef PUGIXML_HAS_LONG_LONG 434 size_t hash_value()
const;
437 xml_attribute_struct* internal_object()
const;
466 operator unspecified_bool_type()
const;
469 bool operator!()
const;
476 bool operator<=(
const xml_node&
r)
const;
477 bool operator>=(
const xml_node&
r)
const;
523 const char_t* child_value()
const;
529 bool set_name(
const char_t* rhs);
530 bool set_value(
const char_t* rhs);
614 if (pred(cur))
return cur;
633 #ifndef PUGIXML_NO_STL 644 #ifndef PUGIXML_NO_XPATH 662 #ifndef PUGIXML_NO_STL 686 ptrdiff_t offset_debug()
const;
689 size_t hash_value()
const;
692 xml_node_struct* internal_object()
const;
706 xml_node_struct* _root;
710 explicit xml_text(xml_node_struct* root);
712 xml_node_struct* _data_new();
713 xml_node_struct* _data()
const;
720 operator unspecified_bool_type()
const;
723 bool operator!()
const;
729 const char_t* get()
const;
735 int as_int(
int def = 0)
const;
736 unsigned int as_uint(
unsigned int def = 0)
const;
737 double as_double(
double def = 0)
const;
738 float as_float(
float def = 0)
const;
740 #ifdef PUGIXML_HAS_LONG_LONG 741 long long as_llong(
long long def = 0)
const;
742 unsigned long long as_ullong(
unsigned long long def = 0)
const;
746 bool as_bool(
bool def =
false)
const;
749 bool set(
const char_t* rhs);
753 bool set(
unsigned int rhs);
755 bool set(
unsigned long rhs);
756 bool set(
double rhs);
760 #ifdef PUGIXML_HAS_LONG_LONG 761 bool set(
long long rhs);
762 bool set(
unsigned long long rhs);
768 xml_text& operator=(
unsigned int rhs);
770 xml_text& operator=(
unsigned long rhs);
775 #ifdef PUGIXML_HAS_LONG_LONG 777 xml_text& operator=(
unsigned long long rhs);
808 #ifndef PUGIXML_NO_STL 850 #ifndef PUGIXML_NO_STL 886 #ifndef PUGIXML_NO_STL 937 virtual bool for_each(
xml_node& node) = 0;
986 operator bool()
const;
989 const char* description()
const;
1015 #ifdef PUGIXML_HAS_MOVE 1027 #ifndef PUGIXML_NO_STL 1057 #ifndef PUGIXML_NO_STL 1071 #ifndef PUGIXML_NO_XPATH 1095 operator bool()
const;
1098 const char* description()
const;
1124 bool get_boolean()
const;
1125 double get_number()
const;
1126 const char_t* get_string()
const;
1130 bool set(
bool value);
1131 bool set(
double value);
1159 #ifdef PUGIXML_HAS_MOVE 1203 #ifdef PUGIXML_HAS_MOVE 1218 double evaluate_number(
const xpath_node&
n)
const;
1220 #ifndef PUGIXML_NO_STL 1247 operator unspecified_bool_type()
const;
1250 bool operator!()
const;
1253 #ifndef PUGIXML_NO_EXCEPTIONS 1254 #if defined(_MSC_VER) 1257 #pragma warning(push) 1258 #pragma warning(disable: 4275) 1276 #if defined(_MSC_VER) 1277 #pragma warning(pop) 1306 operator unspecified_bool_type()
const;
1309 bool operator!()
const;
1353 #ifdef PUGIXML_HAS_MOVE 1363 size_t size()
const;
1373 void sort(
bool reverse =
false);
1394 #ifndef PUGIXML_NO_STL 1396 std::basic_string<char, std::char_traits<char>, std::allocator<char> >
PUGIXML_FUNCTION as_utf8(
const wchar_t* str);
1397 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);
1400 std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >
PUGIXML_FUNCTION as_wide(
const char* str);
1401 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);
1405 typedef void* (*allocation_function)(
size_t size);
1418 #if !defined(PUGIXML_NO_STL) && (defined(_MSC_VER) || defined(__ICC)) 1428 #if !defined(PUGIXML_NO_STL) && defined(__SUNPRO_CC) 1442 #if defined(PUGIXML_HEADER_ONLY) && !defined(PUGIXML_SOURCE) 1443 # define PUGIXML_SOURCE "pugixml.cpp" 1444 # include PUGIXML_SOURCE
xml_node_iterator iterator
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
xml_node find_node(Predicate pred) const
std::basic_string< PUGIXML_CHAR, std::char_traits< PUGIXML_CHAR >, std::allocator< PUGIXML_CHAR > > string_t
std::bidirectional_iterator_tag iterator_category
ptrdiff_t difference_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
GLdouble GLdouble GLdouble r
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
std::bidirectional_iterator_tag iterator_category
const unsigned int parse_escapes
void(* deallocation_function)(void *ptr)
const unsigned int format_write_bom
const unsigned int parse_trim_pcdata
const unsigned int format_no_empty_element_tags
GLuint const GLchar * name
const unsigned int parse_comments
const unsigned int parse_wnorm_attribute
#define PUGIXML_DEPRECATED
const unsigned int parse_eol
#define PUGIXML_NOEXCEPT_IF_NOT_COMPACT
xml_attribute & reference
const unsigned int parse_ws_pcdata
ptrdiff_t difference_type
bool operator!=(const CustomAllocator< T > &, const CustomAllocator< U > &)
allocation_function PUGIXML_FUNCTION get_memory_allocation_function()
CMatrix4< T > operator *(const T scalar, const CMatrix4< T > &mat)
const unsigned int format_default
std::bidirectional_iterator_tag iterator_category
xml_attribute find_attribute(Predicate pred) const
const unsigned int parse_full
const xpath_node * iterator
GLsizei const GLfloat * value
deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function()
bool operator==(const CustomAllocator< T > &, const CustomAllocator< U > &)
void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate)
const unsigned int format_save_file_text
const unsigned int parse_declaration
const unsigned int parse_fragment
const unsigned int parse_default
ptrdiff_t difference_type
const unsigned int format_no_declaration
const unsigned int format_raw
const unsigned int format_no_escapes
const unsigned int parse_doctype
void *(* allocation_function)(size_t size)
GLint GLint GLsizei GLsizei GLsizei depth
xml_attribute_iterator attribute_iterator
GLboolean GLboolean GLboolean b
const unsigned int format_indent
xml_node next_sibling() const
GLuint GLuint GLsizei GLenum type
const unsigned int parse_pi
GLsizei const GLchar *const * path
GLboolean GLboolean GLboolean GLboolean a
const unsigned int parse_wconv_attribute
const xpath_node * const_iterator
xml_attribute next_attribute() const
xml_node first_child() const
const unsigned int parse_cdata
const unsigned int format_indent_attributes