17 #ifndef PUGIXML_VERSION
18 # define PUGIXML_VERSION 1120 // 1.12
24 #ifndef HEADER_PUGIXML_HPP
25 #define HEADER_PUGIXML_HPP
28 #define USING_OIIO_PUGI 1
34 #if !defined(PUGIXML_NO_XPATH) && !defined(PUGIXML_NO_EXCEPTIONS)
39 #ifndef PUGIXML_NO_STL
46 #ifndef PUGIXML_DEPRECATED
47 # if defined(__GNUC__)
48 # define PUGIXML_DEPRECATED __attribute__((deprecated))
49 # elif defined(_MSC_VER) && _MSC_VER >= 1300
50 # define PUGIXML_DEPRECATED __declspec(deprecated)
52 # define PUGIXML_DEPRECATED
63 # define PUGIXML_CLASS PUGIXML_API
67 #ifndef PUGIXML_FUNCTION
68 # define PUGIXML_FUNCTION PUGIXML_API
72 #ifndef PUGIXML_HAS_LONG_LONG
73 # if __cplusplus >= 201103
74 # define PUGIXML_HAS_LONG_LONG
75 # elif defined(_MSC_VER) && _MSC_VER >= 1400
76 # define PUGIXML_HAS_LONG_LONG
81 #ifndef PUGIXML_HAS_MOVE
82 # if __cplusplus >= 201103
83 # define PUGIXML_HAS_MOVE
84 # elif defined(_MSC_VER) && _MSC_VER >= 1600
85 # define PUGIXML_HAS_MOVE
90 #ifndef PUGIXML_NOEXCEPT
91 # if __cplusplus >= 201103
92 # define PUGIXML_NOEXCEPT noexcept
93 # elif defined(_MSC_VER) && _MSC_VER >= 1900
94 # define PUGIXML_NOEXCEPT noexcept
96 # define PUGIXML_NOEXCEPT
101 #ifdef PUGIXML_COMPACT
102 # define PUGIXML_NOEXCEPT_IF_NOT_COMPACT
104 # define PUGIXML_NOEXCEPT_IF_NOT_COMPACT PUGIXML_NOEXCEPT
108 #ifndef PUGIXML_OVERRIDE
109 # if __cplusplus >= 201103
110 # define PUGIXML_OVERRIDE override
111 # elif defined(_MSC_VER) && _MSC_VER >= 1700
112 # define PUGIXML_OVERRIDE override
114 # define PUGIXML_OVERRIDE
120 # if __cplusplus >= 201103
121 # define PUGIXML_NULL nullptr
123 # define PUGIXML_NULL 0
128 #ifdef PUGIXML_WCHAR_MODE
129 # define PUGIXML_TEXT(t) L ## t
130 # define PUGIXML_CHAR wchar_t
132 # define PUGIXML_TEXT(t) t
133 # define PUGIXML_CHAR char
140 namespace pugi = OIIO::pugi;
149 #ifndef PUGIXML_NO_STL
291 struct xml_attribute_struct;
292 struct xml_node_struct;
294 class xml_node_iterator;
295 class xml_attribute_iterator;
296 class xml_named_node_iterator;
298 class xml_tree_walker;
300 struct xml_parse_result;
306 #ifndef PUGIXML_NO_XPATH
308 class xpath_node_set;
310 class xpath_variable_set;
325 It
end()
const {
return _end; }
327 bool empty()
const {
return _begin == _end; }
340 virtual void write(
const void*
data,
size_t size) = 0;
356 #ifndef PUGIXML_NO_STL
368 std::basic_ostream<char, std::char_traits<char> >* narrow_stream;
369 std::basic_ostream<wchar_t, std::char_traits<wchar_t> >* wide_stream;
392 operator unspecified_bool_type()
const;
416 int as_int(
int def = 0)
const;
417 unsigned int as_uint(
unsigned int def = 0)
const;
418 double as_double(
double def = 0)
const;
419 float as_float(
float def = 0)
const;
421 #ifdef PUGIXML_HAS_LONG_LONG
422 long long as_llong(
long long def = 0)
const;
423 unsigned long long as_ullong(
unsigned long long def = 0)
const;
427 bool as_bool(
bool def =
false)
const;
430 bool set_name(
const char_t* rhs);
431 bool set_value(
const char_t* rhs);
434 bool set_value(
int rhs);
435 bool set_value(
unsigned int rhs);
436 bool set_value(
long rhs);
437 bool set_value(
unsigned long rhs);
438 bool set_value(
double rhs);
439 bool set_value(
double rhs,
int precision);
440 bool set_value(
float rhs);
441 bool set_value(
float rhs,
int precision);
442 bool set_value(
bool rhs);
444 #ifdef PUGIXML_HAS_LONG_LONG
445 bool set_value(
long long rhs);
446 bool set_value(
unsigned long long rhs);
459 #ifdef PUGIXML_HAS_LONG_LONG
501 operator unspecified_bool_type()
const;
558 const char_t* child_value()
const;
564 bool set_name(
const char_t* rhs);
565 bool set_value(
const char_t* rhs);
608 bool remove_attributes();
615 bool remove_children();
655 if (pred(cur))
return cur;
674 #ifndef PUGIXML_NO_STL
685 #ifndef PUGIXML_NO_XPATH
703 #ifndef PUGIXML_NO_STL
727 ptrdiff_t offset_debug()
const;
761 operator unspecified_bool_type()
const;
770 const char_t*
get()
const;
776 int as_int(
int def = 0)
const;
777 unsigned int as_uint(
unsigned int def = 0)
const;
778 double as_double(
double def = 0)
const;
779 float as_float(
float def = 0)
const;
781 #ifdef PUGIXML_HAS_LONG_LONG
782 long long as_llong(
long long def = 0)
const;
783 unsigned long long as_ullong(
unsigned long long def = 0)
const;
787 bool as_bool(
bool def =
false)
const;
794 bool set(
unsigned int rhs);
796 bool set(
unsigned long rhs);
797 bool set(
double rhs);
803 #ifdef PUGIXML_HAS_LONG_LONG
804 bool set(
long long rhs);
805 bool set(
unsigned long long rhs);
818 #ifdef PUGIXML_HAS_LONG_LONG
851 #ifndef PUGIXML_NO_STL
893 #ifndef PUGIXML_NO_STL
929 #ifndef PUGIXML_NO_STL
980 virtual bool for_each(
xml_node& node) = 0;
1029 operator bool()
const;
1032 const char* description()
const;
1058 #ifdef PUGIXML_HAS_MOVE
1070 #ifndef PUGIXML_NO_STL
1100 #ifndef PUGIXML_NO_STL
1114 #ifndef PUGIXML_NO_XPATH
1138 operator bool()
const;
1141 const char* description()
const;
1167 bool get_boolean()
const;
1168 double get_number()
const;
1169 const char_t* get_string()
const;
1202 #ifdef PUGIXML_HAS_MOVE
1213 bool set(
const char_t* name,
double value);
1233 xpath_query&
operator=(
const xpath_query&);
1246 #ifdef PUGIXML_HAS_MOVE
1261 double evaluate_number(
const xpath_node& n)
const;
1263 #ifndef PUGIXML_NO_STL
1290 operator unspecified_bool_type()
const;
1296 #ifndef PUGIXML_NO_EXCEPTIONS
1297 #if defined(_MSC_VER)
1300 #pragma warning(push)
1301 #pragma warning(disable: 4275)
1319 #if defined(_MSC_VER)
1320 #pragma warning(pop)
1349 operator unspecified_bool_type()
const;
1396 #ifdef PUGIXML_HAS_MOVE
1406 size_t size()
const;
1437 #ifndef PUGIXML_NO_STL
1448 typedef void* (*allocation_function)(
size_t size);
1462 #if !defined(PUGIXML_NO_STL) && (defined(_MSC_VER) || defined(__ICC))
1472 #if !defined(PUGIXML_NO_STL) && defined(__SUNPRO_CC)
1486 #if defined(PUGIXML_HEADER_ONLY) && !defined(PUGIXML_SOURCE)
1487 # define PUGIXML_SOURCE "pugixml.cpp"
1488 # include PUGIXML_SOURCE
const unsigned int parse_ws_pcdata
const unsigned int format_indent_attributes
std::basic_string< wchar_t, std::char_traits< wchar_t >, std::allocator< wchar_t > > PUGIXML_FUNCTION as_wide(const char *str)
xml_node_iterator iterator
OCIOEXPORT ConstColorSpaceSetRcPtr operator&&(const ConstColorSpaceSetRcPtr &lcss, const ConstColorSpaceSetRcPtr &rcss)
Perform the intersection of two sets.
std::bidirectional_iterator_tag iterator_category
ptrdiff_t difference_type
typename detail::char_t_impl< S >::type char_t
const unsigned int parse_wconv_attribute
xml_attribute find_attribute(Predicate pred) const
xml_object_range(It b, It e)
void append_attribute(xml_attribute_struct *attr, xml_node_struct *node)
void remove_attribute(xml_attribute_struct *attr, xml_node_struct *node)
const unsigned int format_no_empty_element_tags
std::basic_string< char, std::char_traits< char >, std::allocator< char > > PUGIXML_FUNCTION as_utf8(const wchar_t *str)
GLsizei const GLfloat * value
const unsigned int parse_eol
const unsigned int format_no_declaration
xml_node find_child(Predicate pred) const
GLsizei const GLchar *const * path
std::bidirectional_iterator_tag iterator_category
GLboolean GLboolean GLboolean GLboolean a
xml_node first_child() const
const unsigned int format_no_escapes
PUGI__FN void reverse(I begin, I end)
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)
xml_attribute next_attribute() const
**But if you need a result
const int default_float_precision
#define PUGIXML_DEPRECATED
OIIO_FORCEINLINE vbool4 operator>=(const vint4 &a, const vint4 &b)
const unsigned int format_write_bom
const unsigned int parse_fragment
allocation_function PUGIXML_FUNCTION get_memory_allocation_function()
#define PUGIXML_NOEXCEPT_IF_NOT_COMPACT
xml_attribute & reference
ptrdiff_t difference_type
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
const unsigned int parse_escapes
OIIO_FORCEINLINE vbool4 operator>(const vint4 &a, const vint4 &b)
OIIO_FORCEINLINE vbool4 operator<=(const vint4 &a, const vint4 &b)
GLint GLint GLsizei GLint GLenum GLenum type
OCIOEXPORT ConstColorSpaceSetRcPtr operator||(const ConstColorSpaceSetRcPtr &lcss, const ConstColorSpaceSetRcPtr &rcss)
Perform the union of two sets.
std::bidirectional_iterator_tag iterator_category
const unsigned int parse_pi
const unsigned int parse_embed_pcdata
const unsigned int parse_ws_pcdata_single
const unsigned int parse_declaration
constexpr auto set(type rhs) -> int
const unsigned int format_skip_control_chars
const xpath_node * iterator
const unsigned int format_indent
void(* deallocation_function)(void *ptr)
std::basic_string< PUGIXML_CHAR, std::char_traits< PUGIXML_CHAR >, std::allocator< PUGIXML_CHAR > > string_t
xml_node next_sibling() const
bool operator<(const GU_TetrahedronFacet &a, const GU_TetrahedronFacet &b)
IMATH_HOSTDEVICE constexpr Color4< T > operator*(S a, const Color4< T > &v) IMATH_NOEXCEPT
Reverse multiplication: S * Color4.
xml_node find_node(Predicate pred) const
const unsigned int parse_wnorm_attribute
void *(* allocation_function)(size_t size)
GLuint const GLchar * name
const unsigned int parse_doctype
GLboolean GLboolean GLboolean b
void insert_attribute_after(xml_attribute_struct *attr, xml_attribute_struct *place, xml_node_struct *node)
const unsigned int parse_trim_pcdata
const unsigned int parse_full
ptrdiff_t difference_type
void traverse(T &func, const char *path, bool sort_contents=false, bool directories_first=true)
GLint GLint GLsizei GLsizei GLsizei depth
GLenum GLint GLint * precision
deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function()
const unsigned int parse_cdata
Usd_Term operator!(Usd_PrimFlags flag)
xml_attribute_iterator attribute_iterator
const unsigned int format_raw
void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate)
const unsigned int parse_minimal
LeafData & operator=(const LeafData &)=delete
const unsigned int format_save_file_text
OIIO_API bool attribute(string_view name, TypeDesc type, const void *val)
const unsigned int format_default
ImageBuf OIIO_API add(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
bool operator!=(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
#define OIIO_NAMESPACE_END
void prepend_attribute(xml_attribute_struct *attr, xml_node_struct *node)
const unsigned int parse_default
const xpath_node * const_iterator
size_t hash_value(const CH_ChannelRef &ref)
FMT_INLINE void print(format_string< T...> fmt, T &&...args)
const int default_double_precision
const unsigned int parse_comments
const unsigned int format_attribute_single_quote
#define OIIO_NAMESPACE_BEGIN
PcpNodeRef_ChildrenIterator begin(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.