Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
pugi Namespace Reference

Classes

class  xml_object_range
class  xml_writer
class  xml_writer_file
class  xml_writer_stream
class  xml_attribute
class  xml_node
class  xml_text
class  xml_node_iterator
class  xml_attribute_iterator
class  xml_named_node_iterator
class  xml_tree_walker
struct  xml_parse_result
class  xml_document
struct  xpath_parse_result
class  xpath_variable
class  xpath_variable_set
class  xpath_query
class  xpath_exception
class  xpath_node
class  xpath_node_set
struct  xml_attribute_struct
struct  xml_node_struct

Typedefs

typedef PUGIXML_CHAR char_t
typedef std::basic_string< PUGIXML_CHAR, std::char_traits< PUGIXML_CHAR >, std::allocator< PUGIXML_CHAR > > string_t
typedef void *(* allocation_function) (size_t size)
typedef void(* deallocation_function) (void *ptr)

Enumerations

enum  xml_node_type {
  node_null , node_document , node_element , node_pcdata ,
  node_cdata , node_comment , node_pi , node_declaration ,
  node_doctype
}
enum  xml_encoding {
  encoding_auto , encoding_utf8 , encoding_utf16_le , encoding_utf16_be ,
  encoding_utf16 , encoding_utf32_le , encoding_utf32_be , encoding_utf32 ,
  encoding_wchar , encoding_latin1
}
enum  xml_parse_status {
  status_ok = 0 , status_file_not_found , status_io_error , status_out_of_memory ,
  status_internal_error , status_unrecognized_tag , status_bad_pi , status_bad_comment ,
  status_bad_cdata , status_bad_doctype , status_bad_pcdata , status_bad_start_element ,
  status_bad_attribute , status_bad_end_element , status_end_element_mismatch , status_append_invalid_root ,
  status_no_document_element
}
enum  xpath_value_type {
  xpath_type_none , xpath_type_node_set , xpath_type_number , xpath_type_string ,
  xpath_type_boolean
}

Functions

std::basic_string< char, std::char_traits< char >, std::allocator< char > > PUGIXML_FUNCTION as_utf8 (const wchar_t *str)
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)
std::basic_string< wchar_t, std::char_traits< wchar_t >, std::allocator< wchar_t > > PUGIXML_FUNCTION as_wide (const char *str)
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)
void PUGIXML_FUNCTION set_memory_management_functions (allocation_function allocate, deallocation_function deallocate)
allocation_function PUGIXML_FUNCTION get_memory_allocation_function ()
deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function ()
PUGI__FN std::string PUGIXML_FUNCTION as_utf8 (const std::basic_string< wchar_t > &str)
PUGI__FN std::basic_string< wchar_t > PUGIXML_FUNCTION as_wide (const std::string &str)

Variables

const unsigned int parse_minimal = 0x0000
const unsigned int parse_pi = 0x0001
const unsigned int parse_comments = 0x0002
const unsigned int parse_cdata = 0x0004
const unsigned int parse_ws_pcdata = 0x0008
const unsigned int parse_escapes = 0x0010
const unsigned int parse_eol = 0x0020
const unsigned int parse_wconv_attribute = 0x0040
const unsigned int parse_wnorm_attribute = 0x0080
const unsigned int parse_declaration = 0x0100
const unsigned int parse_doctype = 0x0200
const unsigned int parse_ws_pcdata_single = 0x0400
const unsigned int parse_trim_pcdata = 0x0800
const unsigned int parse_fragment = 0x1000
const unsigned int parse_embed_pcdata = 0x2000
const unsigned int parse_default = parse_cdata | parse_escapes | parse_wconv_attribute | parse_eol
const unsigned int parse_full = parse_default | parse_pi | parse_comments | parse_declaration | parse_doctype
const unsigned int format_indent = 0x01
const unsigned int format_write_bom = 0x02
const unsigned int format_raw = 0x04
const unsigned int format_no_declaration = 0x08
const unsigned int format_no_escapes = 0x10
const unsigned int format_save_file_text = 0x20
const unsigned int format_indent_attributes = 0x40
const unsigned int format_no_empty_element_tags = 0x80
const unsigned int format_skip_control_chars = 0x100
const unsigned int format_attribute_single_quote = 0x200
const unsigned int format_default = format_indent
const int default_double_precision = 17
const int default_float_precision = 9

Typedef Documentation

◆ allocation_function

typedef void *(* pugi::allocation_function) (size_t size)

Definition at line 1441 of file pugixml.hpp.

◆ char_t

Definition at line 137 of file pugixml.hpp.

◆ deallocation_function

typedef void(* pugi::deallocation_function) (void *ptr)

Definition at line 1444 of file pugixml.hpp.

◆ string_t

typedef std::basic_string<PUGIXML_CHAR, std::char_traits<PUGIXML_CHAR>, std::allocator<PUGIXML_CHAR> > pugi::string_t

Definition at line 141 of file pugixml.hpp.

Enumeration Type Documentation

◆ xml_encoding

Enumerator
encoding_auto 
encoding_utf8 
encoding_utf16_le 
encoding_utf16_be 
encoding_utf16 
encoding_utf32_le 
encoding_utf32_be 
encoding_utf32 
encoding_wchar 
encoding_latin1 

Definition at line 227 of file pugixml.hpp.

228 {
229 encoding_auto, // Auto-detect input encoding using BOM or < / <? detection; use UTF8 if BOM is not found
230 encoding_utf8, // UTF8 encoding
231 encoding_utf16_le, // Little-endian UTF16
232 encoding_utf16_be, // Big-endian UTF16
233 encoding_utf16, // UTF16 with native endianness
234 encoding_utf32_le, // Little-endian UTF32
235 encoding_utf32_be, // Big-endian UTF32
236 encoding_utf32, // UTF32 with native endianness
237 encoding_wchar, // The same encoding wchar_t has (either UTF16 or UTF32)
239 };
@ 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

◆ xml_node_type

Enumerator
node_null 
node_document 
node_element 
node_pcdata 
node_cdata 
node_comment 
node_pi 
node_declaration 
node_doctype 

Definition at line 149 of file pugixml.hpp.

150 {
151 node_null, // Empty (null) node handle
152 node_document, // A document tree's absolute root
153 node_element, // Element tag, i.e. '<node/>'
154 node_pcdata, // Plain character data, i.e. 'text'
155 node_cdata, // Character data, i.e. '<![CDATA[text]]>'
156 node_comment, // Comment tag, i.e. '<!-- text -->'
157 node_pi, // Processing instruction, i.e. '<?name?>'
158 node_declaration, // Document declaration, i.e. '<?xml version="1.0"?>'
159 node_doctype // Document type declaration, i.e. '<!DOCTYPE doc>'
160 };
@ 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

◆ xml_parse_status

Enumerator
status_ok 
status_file_not_found 
status_io_error 
status_out_of_memory 
status_internal_error 
status_unrecognized_tag 
status_bad_pi 
status_bad_comment 
status_bad_cdata 
status_bad_doctype 
status_bad_pcdata 
status_bad_start_element 
status_bad_attribute 
status_bad_end_element 
status_end_element_mismatch 
status_append_invalid_root 
status_no_document_element 

Definition at line 980 of file pugixml.hpp.

981 {
982 status_ok = 0, // No error
983
984 status_file_not_found, // File was not found during load_file()
985 status_io_error, // Error reading from file/stream
986 status_out_of_memory, // Could not allocate memory
987 status_internal_error, // Internal error occurred
988
989 status_unrecognized_tag, // Parser could not determine tag type
990
991 status_bad_pi, // Parsing error occurred while parsing document declaration/processing instruction
992 status_bad_comment, // Parsing error occurred while parsing comment
993 status_bad_cdata, // Parsing error occurred while parsing CDATA section
994 status_bad_doctype, // Parsing error occurred while parsing document type declaration
995 status_bad_pcdata, // Parsing error occurred while parsing PCDATA section
996 status_bad_start_element, // Parsing error occurred while parsing start element tag
997 status_bad_attribute, // Parsing error occurred while parsing element attribute
998 status_bad_end_element, // Parsing error occurred while parsing end element tag
999 status_end_element_mismatch,// There was a mismatch of start-end tags (closing tag had incorrect name, some tag was not closed or there was an excessive closing tag)
1000
1001 status_append_invalid_root, // Unable to append nodes since root type is not node_element or node_document (exclusive to xml_node::append_buffer)
1002
1003 status_no_document_element // Parsing resulted in a document without element nodes
1004 };
@ status_append_invalid_root
Definition pugixml.hpp:1001
@ status_end_element_mismatch
Definition pugixml.hpp:999
@ status_bad_end_element
Definition pugixml.hpp:998
@ status_io_error
Definition pugixml.hpp:985
@ status_bad_attribute
Definition pugixml.hpp:997
@ status_file_not_found
Definition pugixml.hpp:984
@ status_internal_error
Definition pugixml.hpp:987
@ status_bad_start_element
Definition pugixml.hpp:996
@ status_ok
Definition pugixml.hpp:982
@ status_bad_comment
Definition pugixml.hpp:992
@ status_bad_doctype
Definition pugixml.hpp:994
@ status_out_of_memory
Definition pugixml.hpp:986
@ status_unrecognized_tag
Definition pugixml.hpp:989
@ status_bad_cdata
Definition pugixml.hpp:993
@ status_bad_pcdata
Definition pugixml.hpp:995
@ status_bad_pi
Definition pugixml.hpp:991
@ status_no_document_element
Definition pugixml.hpp:1003

◆ xpath_value_type

Enumerator
xpath_type_none 
xpath_type_node_set 
xpath_type_number 
xpath_type_string 
xpath_type_boolean 

Definition at line 1109 of file pugixml.hpp.

1110 {
1111 xpath_type_none, // Unknown type (query failed to compile)
1112 xpath_type_node_set, // Node set (xpath_node_set)
1113 xpath_type_number, // Number
1114 xpath_type_string, // String
1115 xpath_type_boolean // Boolean
1116 };
@ xpath_type_number
Definition pugixml.hpp:1113
@ xpath_type_boolean
Definition pugixml.hpp:1115
@ xpath_type_none
Definition pugixml.hpp:1111
@ xpath_type_string
Definition pugixml.hpp:1114
@ xpath_type_node_set
Definition pugixml.hpp:1112

Function Documentation

◆ as_utf8() [1/3]

PUGI__FN std::string PUGIXML_FUNCTION pugi::as_utf8 ( const std::basic_string< wchar_t > & str)

Definition at line 7456 of file pugixml.cc.

7457 {
7458 return impl::as_utf8_impl(str.c_str(), str.size());
7459 }

◆ as_utf8() [2/3]

std::basic_string< char, std::char_traits< char >, std::allocator< char > > PUGIXML_FUNCTION pugi::as_utf8 ( const std::basic_string< wchar_t, std::char_traits< wchar_t >, std::allocator< wchar_t > > & str)

◆ as_utf8() [3/3]

PUGI__FN std::string PUGIXML_FUNCTION pugi::as_utf8 ( const wchar_t * str)

Definition at line 7449 of file pugixml.cc.

7450 {
7451 assert(str);
7452
7453 return impl::as_utf8_impl(str, impl::strlength_wide(str));
7454 }

◆ as_wide() [1/3]

PUGI__FN std::basic_string< wchar_t > PUGIXML_FUNCTION pugi::as_wide ( const char * str)

Definition at line 7461 of file pugixml.cc.

7462 {
7463 assert(str);
7464
7465 return impl::as_wide_impl(str, strlen(str));
7466 }

◆ as_wide() [2/3]

std::basic_string< wchar_t, std::char_traits< wchar_t >, std::allocator< wchar_t > > PUGIXML_FUNCTION pugi::as_wide ( const std::basic_string< char, std::char_traits< char >, std::allocator< char > > & str)

◆ as_wide() [3/3]

PUGI__FN std::basic_string< wchar_t > PUGIXML_FUNCTION pugi::as_wide ( const std::string & str)

Definition at line 7468 of file pugixml.cc.

7469 {
7470 return impl::as_wide_impl(str.c_str(), str.size());
7471 }

◆ get_memory_allocation_function()

PUGI__FN allocation_function PUGIXML_FUNCTION pugi::get_memory_allocation_function ( )

Definition at line 7480 of file pugixml.cc.

7481 {
7482 return impl::xml_memory::allocate;
7483 }

◆ get_memory_deallocation_function()

PUGI__FN deallocation_function PUGIXML_FUNCTION pugi::get_memory_deallocation_function ( )

Definition at line 7485 of file pugixml.cc.

7486 {
7487 return impl::xml_memory::deallocate;
7488 }

◆ set_memory_management_functions()

PUGI__FN void PUGIXML_FUNCTION pugi::set_memory_management_functions ( allocation_function allocate,
deallocation_function deallocate )

Definition at line 7474 of file pugixml.cc.

7475 {
7476 impl::xml_memory::allocate = allocate;
7477 impl::xml_memory::deallocate = deallocate;
7478 }
allocation_function xml_memory_management_function_storage< T >::allocate
Definition pugixml.cc:205
deallocation_function xml_memory_management_function_storage< T >::deallocate
Definition pugixml.cc:206

Variable Documentation

◆ default_double_precision

const int pugi::default_double_precision = 17

Definition at line 277 of file pugixml.hpp.

Referenced by pugi::xml_text::set(), and pugi::xml_attribute::set_value().

◆ default_float_precision

const int pugi::default_float_precision = 9

Definition at line 278 of file pugixml.hpp.

Referenced by pugi::xml_text::set(), and pugi::xml_attribute::set_value().

◆ format_attribute_single_quote

const unsigned int pugi::format_attribute_single_quote = 0x200

Definition at line 271 of file pugixml.hpp.

◆ format_default

const unsigned int pugi::format_default = format_indent

Definition at line 275 of file pugixml.hpp.

◆ format_indent

const unsigned int pugi::format_indent = 0x01

Definition at line 244 of file pugixml.hpp.

◆ format_indent_attributes

const unsigned int pugi::format_indent_attributes = 0x40

Definition at line 262 of file pugixml.hpp.

◆ format_no_declaration

const unsigned int pugi::format_no_declaration = 0x08

Definition at line 253 of file pugixml.hpp.

Referenced by pugi::xml_document::save().

◆ format_no_empty_element_tags

const unsigned int pugi::format_no_empty_element_tags = 0x80

Definition at line 265 of file pugixml.hpp.

◆ format_no_escapes

const unsigned int pugi::format_no_escapes = 0x10

Definition at line 256 of file pugixml.hpp.

◆ format_raw

const unsigned int pugi::format_raw = 0x04

Definition at line 250 of file pugixml.hpp.

Referenced by pugi::xml_document::save().

◆ format_save_file_text

const unsigned int pugi::format_save_file_text = 0x20

Definition at line 259 of file pugixml.hpp.

Referenced by pugi::xml_document::save_file(), and pugi::xml_document::save_file().

◆ format_skip_control_chars

const unsigned int pugi::format_skip_control_chars = 0x100

Definition at line 268 of file pugixml.hpp.

◆ format_write_bom

const unsigned int pugi::format_write_bom = 0x02

Definition at line 247 of file pugixml.hpp.

Referenced by pugi::xml_document::save().

◆ parse_cdata

const unsigned int pugi::parse_cdata = 0x0004

Definition at line 175 of file pugixml.hpp.

◆ parse_comments

const unsigned int pugi::parse_comments = 0x0002

Definition at line 172 of file pugixml.hpp.

◆ parse_declaration

const unsigned int pugi::parse_declaration = 0x0100

Definition at line 194 of file pugixml.hpp.

◆ parse_default

const unsigned int pugi::parse_default = parse_cdata | parse_escapes | parse_wconv_attribute | parse_eol

Definition at line 219 of file pugixml.hpp.

◆ parse_doctype

const unsigned int pugi::parse_doctype = 0x0200

Definition at line 197 of file pugixml.hpp.

◆ parse_embed_pcdata

const unsigned int pugi::parse_embed_pcdata = 0x2000

Definition at line 214 of file pugixml.hpp.

◆ parse_eol

const unsigned int pugi::parse_eol = 0x0020

Definition at line 185 of file pugixml.hpp.

◆ parse_escapes

const unsigned int pugi::parse_escapes = 0x0010

Definition at line 182 of file pugixml.hpp.

◆ parse_fragment

const unsigned int pugi::parse_fragment = 0x1000

Definition at line 209 of file pugixml.hpp.

◆ parse_full

const unsigned int pugi::parse_full = parse_default | parse_pi | parse_comments | parse_declaration | parse_doctype

Definition at line 224 of file pugixml.hpp.

◆ parse_minimal

const unsigned int pugi::parse_minimal = 0x0000

Definition at line 166 of file pugixml.hpp.

◆ parse_pi

const unsigned int pugi::parse_pi = 0x0001

Definition at line 169 of file pugixml.hpp.

◆ parse_trim_pcdata

const unsigned int pugi::parse_trim_pcdata = 0x0800

Definition at line 205 of file pugixml.hpp.

◆ parse_wconv_attribute

const unsigned int pugi::parse_wconv_attribute = 0x0040

Definition at line 188 of file pugixml.hpp.

◆ parse_wnorm_attribute

const unsigned int pugi::parse_wnorm_attribute = 0x0080

Definition at line 191 of file pugixml.hpp.

◆ parse_ws_pcdata

const unsigned int pugi::parse_ws_pcdata = 0x0008

Definition at line 179 of file pugixml.hpp.

◆ parse_ws_pcdata_single

const unsigned int pugi::parse_ws_pcdata_single = 0x0400

Definition at line 202 of file pugixml.hpp.