8#ifndef INCLUDED_ORCUS_TYPES_HPP
9#define INCLUDED_ORCUS_TYPES_HPP
15#include <unordered_set>
21class xmlns_repository;
27ORCUS_PSR_DLLPUBLIC
extern const size_t index_not_found;
31using xml_token_t = size_t;
32using xmlns_id_t =
const char*;
34using xml_token_pair_t = std::pair<xmlns_id_t, xml_token_t>;
38 size_t operator()(
const xml_token_pair_t& v)
const;
41using xml_elem_stack_t = std::vector<xml_token_pair_t>;
42using xml_elem_set_t = std::unordered_set<xml_token_pair_t, xml_token_pair_hash>;
44ORCUS_PSR_DLLPUBLIC
extern const xmlns_id_t XMLNS_UNKNOWN_ID;
45ORCUS_PSR_DLLPUBLIC
extern const xml_token_t XML_UNKNOWN_TOKEN;
50 std::ptrdiff_t offset;
61 enum to_string_type { use_alias, use_short_name };
64 std::string_view name;
67 xml_name_t(xmlns_id_t _ns, std::string_view _name);
72 bool operator== (
const xml_name_t& other)
const;
73 bool operator!= (
const xml_name_t& other)
const;
75 std::string to_string(
const xmlns_context& cxt, to_string_type type)
const;
84 std::string_view raw_name;
85 std::string_view value;
98 xmlns_id_t _ns, xml_token_t _name, std::string_view _value,
bool _transient);
100 xmlns_id_t _ns, xml_token_t _name, std::string_view _raw_name,
101 std::string_view _value,
bool _transient);
112 std::string_view raw_name;
113 std::vector<xml_token_attr_t> attrs;
118 xml_token_element_t(xmlns_id_t _ns, xml_token_t _name, std::string_view _raw_name, std::vector<xml_token_attr_t>&& _attrs);
128enum class character_set_t
146 extended_unix_code_packed_format_for_japanese,
147 extended_unix_code_fixed_width_for_japanese,
197 jis_c6229_1984_b_add,
199 jis_c6229_1984_hand_add,
249 iso_10646_unicode_latin1,
251 iso_unicode_ibm_1261,
252 iso_unicode_ibm_1268,
253 iso_unicode_ibm_1276,
254 iso_unicode_ibm_1264,
255 iso_unicode_ibm_1265,
267 iso_8859_1_windows_3_0_latin_1,
268 iso_8859_1_windows_3_1_latin_1,
269 iso_8859_2_windows_latin_2,
270 iso_8859_9_windows_latin_5,
272 adobe_standard_encoding,
274 ventura_international,
277 pc8_danish_norwegian,
285 adobe_symbol_encoding,
288 microsoft_publishing,
392 uint8_t version_major;
393 uint8_t version_minor;
394 character_set_t encoding;
398 xml_declaration_t(uint8_t _version_major, uint8_t _version_minor, character_set_t _encoding,
bool _standalone);
410enum class length_unit_t
434enum class dump_format_t
454 std::string to_string()
const;
456 bool operator== (
const length_t& other)
const noexcept;
457 bool operator!= (
const length_t& other)
const noexcept;
471 date_time_t(
int _year,
int _month,
int _day,
int _hour,
int _minute,
double _second);
481 std::string to_string()
const;
486ORCUS_PSR_DLLPUBLIC dump_format_t to_dump_format_enum(std::string_view s);
488ORCUS_PSR_DLLPUBLIC std::vector<std::pair<std::string_view, dump_format_t>> get_dump_format_entries();
490ORCUS_PSR_DLLPUBLIC std::ostream& operator<< (std::ostream& os,
const date_time_t& v);
491ORCUS_PSR_DLLPUBLIC std::ostream& operator<< (std::ostream& os, format_t v);
493typedef ::std::vector<xml_token_attr_t> xml_attrs_t;
Definition: xml_namespace.hpp:82
Definition: xml_namespace.hpp:27
Definition: types.hpp:461
Definition: types.hpp:448
Definition: types.hpp:391
bool transient
Definition: types.hpp:94
Definition: types.hpp:109