8 #ifndef INCLUDED_ORCUS_TYPES_HPP
9 #define INCLUDED_ORCUS_TYPES_HPP
14 #include <unordered_set>
20 class xmlns_repository;
26 ORCUS_PSR_DLLPUBLIC
extern const size_t index_not_found;
30 using xml_token_t = size_t;
31 using xmlns_id_t =
const char*;
33 using xml_token_pair_t = std::pair<xmlns_id_t, xml_token_t>;
37 size_t operator()(
const xml_token_pair_t& v)
const;
40 using xml_elem_stack_t = std::vector<xml_token_pair_t>;
41 using xml_elem_set_t = std::unordered_set<xml_token_pair_t, xml_token_pair_hash>;
43 ORCUS_PSR_DLLPUBLIC
extern const xmlns_id_t XMLNS_UNKNOWN_ID;
44 ORCUS_PSR_DLLPUBLIC
extern const xml_token_t XML_UNKNOWN_TOKEN;
49 std::ptrdiff_t offset;
60 enum to_string_type { use_alias, use_short_name };
63 std::string_view name;
66 xml_name_t(xmlns_id_t _ns, std::string_view _name);
71 bool operator== (
const xml_name_t& other)
const;
72 bool operator!= (
const xml_name_t& other)
const;
74 std::string to_string(
const xmlns_context& cxt, to_string_type type)
const;
83 std::string_view raw_name;
84 std::string_view value;
97 xmlns_id_t _ns, xml_token_t _name, std::string_view _value,
bool _transient);
99 xmlns_id_t _ns, xml_token_t _name, std::string_view _raw_name,
100 std::string_view _value,
bool _transient);
111 std::string_view raw_name;
112 std::vector<xml_token_attr_t> attrs;
117 xml_token_element_t(xmlns_id_t _ns, xml_token_t _name, std::string_view _raw_name, std::vector<xml_token_attr_t>&& _attrs);
127 enum class character_set_t
145 extended_unix_code_packed_format_for_japanese,
146 extended_unix_code_fixed_width_for_japanese,
196 jis_c6229_1984_b_add,
198 jis_c6229_1984_hand_add,
248 iso_10646_unicode_latin1,
250 iso_unicode_ibm_1261,
251 iso_unicode_ibm_1268,
252 iso_unicode_ibm_1276,
253 iso_unicode_ibm_1264,
254 iso_unicode_ibm_1265,
266 iso_8859_1_windows_3_0_latin_1,
267 iso_8859_1_windows_3_1_latin_1,
268 iso_8859_2_windows_latin_2,
269 iso_8859_9_windows_latin_5,
271 adobe_standard_encoding,
273 ventura_international,
276 pc8_danish_norwegian,
284 adobe_symbol_encoding,
287 microsoft_publishing,
391 uint8_t version_major;
392 uint8_t version_minor;
393 character_set_t encoding;
397 xml_declaration_t(uint8_t _version_major, uint8_t _version_minor, character_set_t _encoding,
bool _standalone);
409 enum class length_unit_t
433 enum class dump_format_t
453 std::string to_string()
const;
455 bool operator== (
const length_t& other)
const noexcept;
456 bool operator!= (
const length_t& other)
const noexcept;
470 date_time_t(
int _year,
int _month,
int _day,
int _hour,
int _minute,
double _second);
480 std::string to_string()
const;
485 ORCUS_PSR_DLLPUBLIC dump_format_t to_dump_format_enum(std::string_view s);
487 ORCUS_PSR_DLLPUBLIC std::vector<std::pair<std::string_view, dump_format_t>> get_dump_format_entries();
489 ORCUS_PSR_DLLPUBLIC std::ostream& operator<< (std::ostream& os,
const date_time_t& v);
490 ORCUS_PSR_DLLPUBLIC std::ostream& operator<< (std::ostream& os, format_t v);
492 typedef ::std::vector<xml_token_attr_t> xml_attrs_t;
Definition: xml_namespace.hpp:82
Definition: xml_namespace.hpp:27
Definition: types.hpp:460
Definition: types.hpp:447
Definition: types.hpp:390
Definition: types.hpp:108