14 #ifndef PUGIXML_VERSION
16 # define PUGIXML_VERSION 140
26 #ifndef HEADER_PUGIXML_HPP
27 #define HEADER_PUGIXML_HPP
33 #if !defined(PUGIXML_NO_XPATH) && !defined(PUGIXML_NO_EXCEPTIONS)
38 #ifndef PUGIXML_NO_STL
45 #ifndef PUGIXML_DEPRECATED
46 # if defined(__GNUC__)
47 # define PUGIXML_DEPRECATED __attribute__((deprecated))
48 # elif defined(_MSC_VER) && _MSC_VER >= 1300
49 # define PUGIXML_DEPRECATED __declspec(deprecated)
51 # define PUGIXML_DEPRECATED
62 # define PUGIXML_CLASS PUGIXML_API
66 #ifndef PUGIXML_FUNCTION
67 # define PUGIXML_FUNCTION PUGIXML_API
71 #ifndef PUGIXML_HAS_LONG_LONG
72 # if defined(__cplusplus) && __cplusplus >= 201103
73 # define PUGIXML_HAS_LONG_LONG
74 # elif defined(_MSC_VER) && _MSC_VER >= 1400
75 # define PUGIXML_HAS_LONG_LONG
80 #ifdef PUGIXML_WCHAR_MODE
81 # define PUGIXML_TEXT(t) L ## t
82 # define PUGIXML_CHAR wchar_t
84 # define PUGIXML_TEXT(t) t
85 # define PUGIXML_CHAR char
93 #ifndef PUGIXML_NO_STL
95 typedef std::basic_string<PUGIXML_CHAR, std::char_traits<PUGIXML_CHAR>, std::allocator<PUGIXML_CHAR> >
string_t;
230 #ifndef PUGIXML_NO_XPATH
262 virtual void write(
const void* data,
size_t size) = 0;
272 virtual void write(
const void* data,
size_t size);
278 #ifndef PUGIXML_NO_STL
287 virtual void write(
const void* data,
size_t size);
291 std::basic_ostream<wchar_t, std::char_traits<wchar_t> >*
wide_stream;
314 operator unspecified_bool_type()
const;
317 bool operator!()
const;
331 const char_t* name()
const;
332 const char_t* value()
const;
338 int as_int(
int def = 0)
const;
339 unsigned int as_uint(
unsigned int def = 0)
const;
340 double as_double(
double def = 0)
const;
341 float as_float(
float def = 0)
const;
343 #ifdef PUGIXML_HAS_LONG_LONG
344 long long as_llong(
long long def = 0)
const;
345 unsigned long long as_ullong(
unsigned long long def = 0)
const;
349 bool as_bool(
bool def =
false)
const;
352 bool set_name(
const char_t* rhs);
353 bool set_value(
const char_t* rhs);
356 bool set_value(
int rhs);
357 bool set_value(
unsigned int rhs);
358 bool set_value(
double rhs);
359 bool set_value(
bool rhs);
361 #ifdef PUGIXML_HAS_LONG_LONG
362 bool set_value(
long long rhs);
363 bool set_value(
unsigned long long rhs);
373 #ifdef PUGIXML_HAS_LONG_LONG
383 size_t hash_value()
const;
405 typedef void (*unspecified_bool_type)(
xml_node***);
415 operator unspecified_bool_type()
const;
418 bool operator!()
const;
421 bool operator==(
const xml_node& r)
const;
422 bool operator!=(
const xml_node& r)
const;
423 bool operator<(
const xml_node& r)
const;
424 bool operator>(
const xml_node& r)
const;
425 bool operator<=(
const xml_node& r)
const;
426 bool operator>=(
const xml_node& r)
const;
435 const char_t* name()
const;
439 const char_t* value()
const;
469 const char_t* child_value()
const;
475 bool set_name(
const char_t* rhs);
476 bool set_value(
const char_t* rhs);
510 bool remove_attribute(
const char_t* name);
513 bool remove_child(
const xml_node& n);
514 bool remove_child(
const char_t* name);
554 if (pred(cur))
return cur;
573 #ifndef PUGIXML_NO_STL
584 #ifndef PUGIXML_NO_XPATH
597 #ifndef PUGIXML_NO_STL
624 size_t hash_value()
const;
643 typedef void (*unspecified_bool_type)(
xml_text***);
655 operator unspecified_bool_type()
const;
658 bool operator!()
const;
664 const char_t* get()
const;
670 int as_int(
int def = 0)
const;
671 unsigned int as_uint(
unsigned int def = 0)
const;
672 double as_double(
double def = 0)
const;
673 float as_float(
float def = 0)
const;
675 #ifdef PUGIXML_HAS_LONG_LONG
676 long long as_llong(
long long def = 0)
const;
677 unsigned long long as_ullong(
unsigned long long def = 0)
const;
681 bool as_bool(
bool def =
false)
const;
684 bool set(
const char_t* rhs);
688 bool set(
unsigned int rhs);
689 bool set(
double rhs);
692 #ifdef PUGIXML_HAS_LONG_LONG
693 bool set(
long long rhs);
694 bool set(
unsigned long long rhs);
700 xml_text& operator=(
unsigned int rhs);
704 #ifdef PUGIXML_HAS_LONG_LONG
706 xml_text& operator=(
unsigned long long rhs);
737 #ifndef PUGIXML_NO_STL
779 #ifndef PUGIXML_NO_STL
815 #ifndef PUGIXML_NO_STL
915 operator bool()
const;
918 const char* description()
const;
949 #ifndef PUGIXML_NO_STL
976 #ifndef PUGIXML_NO_STL
990 #ifndef PUGIXML_NO_XPATH
1014 operator bool()
const;
1017 const char* description()
const;
1037 const char_t* name()
const;
1043 bool get_boolean()
const;
1044 double get_number()
const;
1045 const char_t* get_string()
const;
1049 bool set(
bool value);
1050 bool set(
double value);
1051 bool set(
const char_t* value);
1076 bool set(
const char_t* name,
bool value);
1077 bool set(
const char_t* name,
double value);
1112 bool evaluate_boolean(
const xpath_node& n)
const;
1116 double evaluate_number(
const xpath_node& n)
const;
1118 #ifndef PUGIXML_NO_STL
1128 size_t evaluate_string(
char_t* buffer,
size_t capacity,
const xpath_node& n)
const;
1139 operator unspecified_bool_type()
const;
1142 bool operator!()
const;
1145 #ifndef PUGIXML_NO_EXCEPTIONS
1157 virtual const char* what()
const throw();
1189 operator unspecified_bool_type()
const;
1192 bool operator!()
const;
1237 size_t size()
const;
1240 const xpath_node& operator[](
size_t index)
const;
1267 #ifndef PUGIXML_NO_STL
1270 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);
1274 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);
1278 typedef void* (*allocation_function)(
size_t size);
1291 #if !defined(PUGIXML_NO_STL) && (defined(_MSC_VER) || defined(__ICC))
1301 #if !defined(PUGIXML_NO_STL) && defined(__SUNPRO_CC)
ETISS_PLUGIN_EXPORT etiss::CPUArch std::map< std::string, std::string > options
create new instance of the CPUArch type at index
ptrdiff_t difference_type
std::bidirectional_iterator_tag iterator_category
xml_attribute & reference
xml_attribute_struct * _attr
xml_attribute next_attribute() const
xml_parse_result load(std::basic_istream< char, std::char_traits< char > > &stream, unsigned int options=parse_default, xml_encoding encoding=encoding_auto)
xml_document(const xml_document &)
xml_parse_result load(std::basic_istream< wchar_t, std::char_traits< wchar_t > > &stream, unsigned int options=parse_default)
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
const xml_document & operator=(const xml_document &)
void save(std::basic_ostream< char, std::char_traits< char > > &stream, const char_t *indent=PUGIXML_TEXT("\t"), unsigned int flags=format_default, xml_encoding encoding=encoding_auto) 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
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
xml_node find_node(Predicate pred) const
xml_attribute_iterator attribute_iterator
xml_node find_child(Predicate pred) const
xml_node_iterator iterator
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
xml_object_range(It b, It e)
virtual bool for_each(xml_node &node)=0
xml_writer_stream(std::basic_ostream< wchar_t, std::char_traits< wchar_t > > &stream)
std::basic_ostream< wchar_t, std::char_traits< wchar_t > > * wide_stream
xml_writer_stream(std::basic_ostream< char, std::char_traits< char > > &stream)
std::basic_ostream< char, std::char_traits< char > > * narrow_stream
virtual void write(const void *data, size_t size)=0
xpath_parse_result _result
const xpath_node * const_iterator
xpath_parse_result _result
xpath_query & operator=(const xpath_query &)
xpath_query(const xpath_query &)
xpath_variable_set & operator=(const xpath_variable_set &)
xpath_variable_set(const xpath_variable_set &)
xpath_variable & operator=(const xpath_variable &)
xpath_variable(const xpath_variable &)
static std::string depth(Dot::Node *node)
std::basic_string< PUGIXML_CHAR, std::char_traits< PUGIXML_CHAR >, std::allocator< PUGIXML_CHAR > > string_t
const unsigned int format_no_declaration
const unsigned int parse_trim_pcdata
const unsigned int parse_wconv_attribute
const unsigned int format_raw
const unsigned int format_default
void(* deallocation_function)(void *ptr)
std::basic_string< char, std::char_traits< char >, std::allocator< char > > PUGIXML_FUNCTION as_utf8(const wchar_t *str)
const unsigned int parse_cdata
const unsigned int parse_fragment
void *(* allocation_function)(size_t size)
const unsigned int parse_full
const unsigned int parse_wnorm_attribute
const unsigned int parse_pi
@ status_append_invalid_root
@ status_end_element_mismatch
@ status_bad_start_element
@ status_unrecognized_tag
@ status_no_document_element
void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate)
deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function()
std::basic_string< wchar_t, std::char_traits< wchar_t >, std::allocator< wchar_t > > PUGIXML_FUNCTION as_wide(const char *str)
const unsigned int format_save_file_text
allocation_function PUGIXML_FUNCTION get_memory_allocation_function()
const unsigned int parse_escapes
const unsigned int format_write_bom
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
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 unsigned int parse_doctype
__PTRDIFF_TYPE__ ptrdiff_t
A signed integer type that is the result of subtracting two pointers.
void sort(I begin, I end, const Pred &pred)
void reverse(I begin, I end)
A 'name=value' XML attribute structure.
An XML document tree node.