C++/Tree Mapping Runtime Library
types.hxx
Go to the documentation of this file.
1// file : xsd/cxx/tree/types.hxx
2// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
3
14#ifndef XSD_CXX_TREE_TYPES_HXX
15#define XSD_CXX_TREE_TYPES_HXX
16
17#include <string>
18#include <cstddef> // std::size_t
19
20#include <xercesc/dom/DOMAttr.hpp>
21#include <xercesc/dom/DOMElement.hpp>
22
24#include <xsd/cxx/tree/list.hxx>
26#include <xsd/cxx/tree/istream-fwd.hxx>
27
29
30namespace xsd
31{
32 namespace cxx
33 {
42 namespace tree
43 {
55 template <typename C, typename B>
56 class string: public B, public std::basic_string<C>
57 {
58 typedef std::basic_string<C> base_type;
59
60 base_type&
61 base ()
62 {
63 return *this;
64 }
65
66 public:
71
76 {
77 }
78
84 string (const C* s)
85 : base_type (s)
86 {
87 }
88
95 string (const C* s, std::size_t n)
96 : base_type (s, n)
97 {
98 }
99
107 string (std::size_t n, C c)
108 : base_type (n, c)
109 {
110 }
111
117 string (const std::basic_string<C>& s)
118 : base_type (s)
119 {
120 }
121
129 string (const std::basic_string<C>& s,
130 std::size_t pos,
131 std::size_t n = std::basic_string<C>::npos)
132 : base_type (s, pos, n)
133 {
134 }
135
136 public:
146 string (const string& x, flags f = 0, container* c = 0)
147 : B (x, f, c), base_type (x)
148 {
149 }
150
162 virtual string*
163 _clone (flags f = 0, container* c = 0) const;
164
165 public:
175 template <typename S>
176 string (istream<S>& s, flags f = 0, container* c = 0);
177
186 string (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
187
196 string (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
197
207 string (const std::basic_string<C>& s,
208 const xercesc::DOMElement* e,
209 flags f = 0,
210 container* c = 0);
212
213 public:
222 string&
224 {
225 base () = c;
226 return *this;
227 }
228
237 string&
238 operator= (const C* s)
239 {
240 base () = s;
241 return *this;
242 }
243
252 string&
253 operator= (const std::basic_string<C>& s)
254 {
255 base () = s;
256 return *this;
257 }
258
265 string&
266 operator= (const string& x)
267 {
268 base () = x;
269 return *this;
270 }
271
272 public:
278 const std::basic_string<C>&
279 base_string () const
280 {
281 return *this;
282 }
283 };
284
290 template <typename C, typename B>
291 inline bool
293 {
294 return static_cast<const std::basic_string<C>&> (a) == b;
295 }
296
302 template <typename C, typename B>
303 inline bool
305 {
306 return !(a == b);
307 }
308
320 template <typename C, typename B>
321 class normalized_string: public B
322 {
323 typedef B base_type;
324
325 base_type&
326 base ()
327 {
328 return *this;
329 }
330
331 public:
336
341 {
342 }
343
349 normalized_string (const C* s)
350 : base_type (s)
351 {
352 }
353
360 normalized_string (const C* s, std::size_t n)
361 : base_type (s, n)
362 {
363 }
364
372 normalized_string (std::size_t n, C c)
373 : base_type (n, c)
374 {
375 }
376
382 normalized_string (const std::basic_string<C>& s)
383 : base_type (s)
384 {
385 }
386
394 normalized_string (const std::basic_string<C>& s,
395 std::size_t pos,
396 std::size_t n = std::basic_string<C>::npos)
397 : base_type (s, pos, n)
398 {
399 }
400
401 public:
412 flags f = 0,
413 container* c = 0)
414 : base_type (x, f, c)
415 {
416 }
417
429 virtual normalized_string*
430 _clone (flags f = 0, container* c = 0) const;
431
432 public:
442 template <typename S>
443 normalized_string (istream<S>& s, flags f = 0, container* c = 0);
444
453 normalized_string (const xercesc::DOMElement& e,
454 flags f = 0,
455 container* c = 0);
456
465 normalized_string (const xercesc::DOMAttr& a,
466 flags f = 0,
467 container* c = 0);
468
478 normalized_string (const std::basic_string<C>& s,
479 const xercesc::DOMElement* e,
480 flags f = 0,
481 container* c = 0);
483
484 public:
495 {
496 base () = c;
497 return *this;
498 }
499
509 operator= (const C* s)
510 {
511 base () = s;
512 return *this;
513 }
514
525 operator= (const std::basic_string<C>& s)
526 {
527 base () = s;
528 return *this;
529 }
530
539 {
540 base () = x;
541 return *this;
542 }
543
544 protected:
545 //@cond
546
547 void
548 normalize ();
549
550 //@endcond
551 };
552
553
565 template <typename C, typename B>
566 class token: public B
567 {
568 typedef B base_type;
569
570 base_type&
571 base ()
572 {
573 return *this;
574 }
575
576 public:
581
586 {
587 }
588
594 token (const C* s)
595 : base_type (s)
596 {
597 }
598
605 token (const C* s, std::size_t n)
606 : base_type (s, n)
607 {
608 }
609
617 token (std::size_t n, C c)
618 : base_type (n, c)
619 {
620 }
621
627 token (const std::basic_string<C>& s)
628 : base_type (s)
629 {
630 }
631
639 token (const std::basic_string<C>& s,
640 std::size_t pos,
641 std::size_t n = std::basic_string<C>::npos)
642 : base_type (s, pos, n)
643 {
644 }
645
646 public:
656 token (const token& x, flags f = 0, container* c = 0)
657 : base_type (x, f, c)
658 {
659 }
660
672 virtual token*
673 _clone (flags f = 0, container* c = 0) const;
674
675 public:
685 template <typename S>
686 token (istream<S>& s, flags f = 0, container* c = 0);
687
696 token (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
697
706 token (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
707
717 token (const std::basic_string<C>& s,
718 const xercesc::DOMElement* e,
719 flags f = 0,
720 container* c = 0);
722
723 public:
732 token&
734 {
735 base () = c;
736 return *this;
737 }
738
747 token&
748 operator= (const C* s)
749 {
750 base () = s;
751 return *this;
752 }
753
762 token&
763 operator= (const std::basic_string<C>& s)
764 {
765 base () = s;
766 return *this;
767 }
768
775 token&
777 {
778 base () = x;
779 return *this;
780 }
781
782 protected:
783 //@cond
784
785 void
786 collapse ();
787
788 //@endcond
789 };
790
791
803 template <typename C, typename B>
804 class nmtoken: public B
805 {
806 typedef B base_type;
807
808 base_type&
809 base ()
810 {
811 return *this;
812 }
813
814 public:
819
825 nmtoken (const C* s)
826 : base_type (s)
827 {
828 }
829
836 nmtoken (const C* s, std::size_t n)
837 : base_type (s, n)
838 {
839 }
840
848 nmtoken (std::size_t n, C c)
849 : base_type (n, c)
850 {
851 }
852
858 nmtoken (const std::basic_string<C>& s)
859 : base_type (s)
860 {
861 }
862
870 nmtoken (const std::basic_string<C>& s,
871 std::size_t pos,
872 std::size_t n = std::basic_string<C>::npos)
873 : base_type (s, pos, n)
874 {
875 }
876
877 public:
887 nmtoken (const nmtoken& x, flags f = 0, container* c = 0)
888 : base_type (x, f, c)
889 {
890 }
891
903 virtual nmtoken*
904 _clone (flags f = 0, container* c = 0) const;
905
906 public:
916 template <typename S>
917 nmtoken (istream<S>& s, flags f = 0, container* c = 0);
918
927 nmtoken (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
928
937 nmtoken (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
938
948 nmtoken (const std::basic_string<C>& s,
949 const xercesc::DOMElement* e,
950 flags f = 0,
951 container* c = 0);
953
954 public:
963 nmtoken&
965 {
966 base () = c;
967 return *this;
968 }
969
978 nmtoken&
979 operator= (const C* s)
980 {
981 base () = s;
982 return *this;
983 }
984
993 nmtoken&
994 operator= (const std::basic_string<C>& s)
995 {
996 base () = s;
997 return *this;
998 }
999
1006 nmtoken&
1008 {
1009 base () = x;
1010 return *this;
1011 }
1012
1013 protected:
1014 //@cond
1015
1016 nmtoken ()
1017 : base_type ()
1018 {
1019 }
1020
1021 //@endcond
1022 };
1023
1024
1035 template <typename C, typename B, typename nmtoken>
1036 class nmtokens: public B, public list<nmtoken, C>
1037 {
1038 typedef list<nmtoken, C> base_type;
1039
1040 public:
1045
1050 : base_type (this)
1051 {
1052 }
1053
1060 nmtokens (typename base_type::size_type n, const nmtoken& x)
1061 : base_type (n, x, this)
1062 {
1063 }
1064
1072 template <typename I>
1073 nmtokens (const I& begin, const I& end)
1074 : base_type (begin, end, this)
1075 {
1076 }
1077
1078 public:
1088 nmtokens (const nmtokens& x, flags f, container* c = 0)
1089 : B (x, f, c), base_type (x, f, this)
1090 {
1091 }
1092
1093#ifdef XSD_CXX11
1094 nmtokens&
1095 operator= (const nmtokens&) = default;
1096#endif
1097
1109 virtual nmtokens*
1110 _clone (flags f = 0, container* c = 0) const;
1111
1112 public:
1122 template <typename S>
1123 nmtokens (istream<S>& s, flags f = 0, container* c = 0);
1124
1133 nmtokens (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
1134
1143 nmtokens (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
1144
1154 nmtokens (const std::basic_string<C>& s,
1155 const xercesc::DOMElement* e,
1156 flags f = 0,
1157 container* c = 0);
1159 };
1160
1166 template <typename C, typename B, typename nmtoken>
1167 inline bool
1169 const nmtokens<C, B, nmtoken>& b)
1170 {
1171 return static_cast<const list<nmtoken, C>&> (a) == b;
1172 }
1173
1179 template <typename C, typename B, typename nmtoken>
1180 inline bool
1182 const nmtokens<C, B, nmtoken>& b)
1183 {
1184 return !(a == b);
1185 }
1186
1198 template <typename C, typename B>
1199 class name: public B
1200 {
1201 typedef B base_type;
1202
1203 base_type&
1204 base ()
1205 {
1206 return *this;
1207 }
1208
1209 public:
1214
1220 name (const C* s)
1221 : base_type (s)
1222 {
1223 }
1224
1231 name (const C* s, std::size_t n)
1232 : base_type (s, n)
1233 {
1234 }
1235
1243 name (std::size_t n, C c)
1244 : base_type (n, c)
1245 {
1246 }
1247
1253 name (const std::basic_string<C>& s)
1254 : base_type (s)
1255 {
1256 }
1257
1265 name (const std::basic_string<C>& s,
1266 std::size_t pos,
1267 std::size_t n = std::basic_string<C>::npos)
1268 : base_type (s, pos, n)
1269 {
1270 }
1271
1272 public:
1282 name (const name& x, flags f = 0, container* c = 0)
1283 : base_type (x, f, c)
1284 {
1285 }
1286
1298 virtual name*
1299 _clone (flags f = 0, container* c = 0) const;
1300
1301 public:
1311 template <typename S>
1312 name (istream<S>& s, flags f = 0, container* c = 0);
1313
1322 name (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
1323
1332 name (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
1333
1343 name (const std::basic_string<C>& s,
1344 const xercesc::DOMElement* e,
1345 flags f = 0,
1346 container* c = 0);
1348
1349 public:
1358 name&
1360 {
1361 base () = c;
1362 return *this;
1363 }
1364
1373 name&
1374 operator= (const C* s)
1375 {
1376 base () = s;
1377 return *this;
1378 }
1379
1388 name&
1389 operator= (const std::basic_string<C>& s)
1390 {
1391 base () = s;
1392 return *this;
1393 }
1394
1401 name&
1403 {
1404 base () = x;
1405 return *this;
1406 }
1407
1408 protected:
1409 //@cond
1410
1411 name ()
1412 : base_type ()
1413 {
1414 }
1415
1416 //@endcond
1417 };
1418
1419
1420 // Forward declaration for Sun CC.
1421 //
1422 template <typename C, typename B, typename uri, typename ncname>
1423 class qname;
1424
1425
1437 template <typename C, typename B>
1438 class ncname: public B
1439 {
1440 typedef B base_type;
1441
1442 base_type&
1443 base ()
1444 {
1445 return *this;
1446 }
1447
1448 public:
1453
1459 ncname (const C* s)
1460 : base_type (s)
1461 {
1462 }
1463
1470 ncname (const C* s, std::size_t n)
1471 : base_type (s, n)
1472 {
1473 }
1474
1482 ncname (std::size_t n, C c)
1483 : base_type (n, c)
1484 {
1485 }
1486
1492 ncname (const std::basic_string<C>& s)
1493 : base_type (s)
1494 {
1495 }
1496
1504 ncname (const std::basic_string<C>& s,
1505 std::size_t pos,
1506 std::size_t n = std::basic_string<C>::npos)
1507 : base_type (s, pos, n)
1508 {
1509 }
1510
1511 public:
1521 ncname (const ncname& x, flags f = 0, container* c = 0)
1522 : base_type (x, f, c)
1523 {
1524 }
1525
1537 virtual ncname*
1538 _clone (flags f = 0, container* c = 0) const;
1539
1540 public:
1550 template <typename S>
1551 ncname (istream<S>& s, flags f = 0, container* c = 0);
1552
1561 ncname (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
1562
1571 ncname (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
1572
1582 ncname (const std::basic_string<C>& s,
1583 const xercesc::DOMElement* e,
1584 flags f = 0,
1585 container* c = 0);
1587
1588 public:
1597 ncname&
1599 {
1600 base () = c;
1601 return *this;
1602 }
1603
1612 ncname&
1613 operator= (const C* s)
1614 {
1615 base () = s;
1616 return *this;
1617 }
1618
1627 ncname&
1628 operator= (const std::basic_string<C>& s)
1629 {
1630 base () = s;
1631 return *this;
1632 }
1633
1640 ncname&
1642 {
1643 base () = x;
1644 return *this;
1645 }
1646
1647 protected:
1648 //@cond
1649
1650 ncname ()
1651 : base_type ()
1652 {
1653 }
1654
1655 //@endcond
1656
1657 template <typename, typename, typename, typename>
1658 friend class qname;
1659 };
1660
1661
1673 template <typename C, typename B>
1674 class language: public B
1675 {
1676 typedef B base_type;
1677
1678 base_type&
1679 base ()
1680 {
1681 return *this;
1682 }
1683
1684 public:
1689
1695 language (const C* s)
1696 : base_type (s)
1697 {
1698 }
1699
1706 language (const C* s, std::size_t n)
1707 : base_type (s, n)
1708 {
1709 }
1710
1718 language (std::size_t n, C c)
1719 : base_type (n, c)
1720 {
1721 }
1722
1728 language (const std::basic_string<C>& s)
1729 : base_type (s)
1730 {
1731 }
1732
1740 language (const std::basic_string<C>& s,
1741 std::size_t pos,
1742 std::size_t n = std::basic_string<C>::npos)
1743 : base_type (s, pos, n)
1744 {
1745 }
1746
1747 public:
1757 language (const language& x, flags f = 0, container* c = 0)
1758 : base_type (x, f, c)
1759 {
1760 }
1761
1773 virtual language*
1774 _clone (flags f = 0, container* c = 0) const;
1775
1776 public:
1786 template <typename S>
1787 language (istream<S>& s, flags f = 0, container* c = 0);
1788
1797 language (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
1798
1807 language (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
1808
1818 language (const std::basic_string<C>& s,
1819 const xercesc::DOMElement* e,
1820 flags f = 0,
1821 container* c = 0);
1823
1824 public:
1833 language&
1835 {
1836 base () = c;
1837 return *this;
1838 }
1839
1848 language&
1849 operator= (const C* s)
1850 {
1851 base () = s;
1852 return *this;
1853 }
1854
1863 language&
1864 operator= (const std::basic_string<C>& s)
1865 {
1866 base () = s;
1867 return *this;
1868 }
1869
1876 language&
1878 {
1879 base () = x;
1880 return *this;
1881 }
1882
1883 protected:
1884 //@cond
1885
1886 language ()
1887 : base_type ()
1888 {
1889 }
1890
1891 //@endcond
1892 };
1893
1894
1895 //@cond
1896
1897 template <typename C, typename ncname>
1898 struct identity_impl: identity
1899 {
1900 identity_impl (const ncname& id)
1901 : id_ (id)
1902 {
1903 }
1904
1905 virtual bool
1906 before (const identity& y) const;
1907
1908 virtual void
1909 throw_duplicate_id () const;
1910
1911 private:
1912 const ncname& id_;
1913 };
1914
1915 //@endcond
1916
1917
1929 template <typename C, typename B>
1930 class id: public B
1931 {
1932 typedef B base_type;
1933
1934 base_type&
1935 base ()
1936 {
1937 return *this;
1938 }
1939
1940 public:
1941 ~id()
1942 {
1943 unregister_id ();
1944 }
1945
1946 public:
1951
1957 id (const C* s)
1958 : base_type (s), identity_ (*this)
1959 {
1960 register_id ();
1961 }
1962
1969 id (const C* s, std::size_t n)
1970 : base_type (s, n), identity_ (*this)
1971 {
1972 register_id ();
1973 }
1974
1982 id (std::size_t n, C c)
1983 : base_type (n, c), identity_ (*this)
1984 {
1985 register_id ();
1986 }
1987
1993 id (const std::basic_string<C>& s)
1994 : base_type (s), identity_ (*this)
1995 {
1996 register_id ();
1997 }
1998
2006 id (const std::basic_string<C>& s,
2007 std::size_t pos,
2008 std::size_t n = std::basic_string<C>::npos)
2009 : base_type (s, pos, n), identity_ (*this)
2010 {
2011 register_id ();
2012 }
2013
2014 public:
2024 id (const id& x, flags f = 0, container* c = 0)
2025 : base_type (x, f, c), identity_ (*this)
2026 {
2027 register_id ();
2028 }
2029
2041 virtual id*
2042 _clone (flags f = 0, container* c = 0) const;
2043
2044 public:
2054 template <typename S>
2055 id (istream<S>& s, flags f = 0, container* c = 0);
2056
2065 id (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
2066
2075 id (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
2076
2086 id (const std::basic_string<C>& s,
2087 const xercesc::DOMElement* e,
2088 flags f = 0,
2089 container* c = 0);
2091
2092 public:
2101 id&
2103
2104
2113 id&
2114 operator= (const C* s);
2115
2124 id&
2125 operator= (const std::basic_string<C>& s);
2126
2133 id&
2134 operator= (const id& x);
2135
2136 public:
2137 //@cond
2138
2139 virtual void
2140 _container (container*);
2141
2142 using B::_container;
2143
2144 //@endcond
2145
2146 protected:
2147 //@cond
2148
2149 id ()
2150 : base_type (), identity_ (*this)
2151 {
2152 register_id ();
2153 }
2154
2155 //@endcond
2156
2157 private:
2158 void
2159 register_id ();
2160
2161 void
2162 unregister_id ();
2163
2164 private:
2165 identity_impl<C, B> identity_;
2166 };
2167
2168
2186 template <typename C, typename B, typename T>
2187 class idref: public B
2188 {
2189 typedef B base_type;
2190
2191 base_type&
2192 base ()
2193 {
2194 return *this;
2195 }
2196
2197 public:
2201 typedef T ref_type;
2202
2203 public:
2208
2214 idref (const C* s)
2215 : base_type (s), identity_ (*this)
2216 {
2217 }
2218
2225 idref (const C* s, std::size_t n)
2226 : base_type (s, n), identity_ (*this)
2227 {
2228 }
2229
2237 idref (std::size_t n, C c)
2238 : base_type (n, c), identity_ (*this)
2239 {
2240 }
2241
2247 idref (const std::basic_string<C>& s)
2248 : base_type (s), identity_ (*this)
2249 {
2250 }
2251
2259 idref (const std::basic_string<C>& s,
2260 std::size_t pos,
2261 std::size_t n = std::basic_string<C>::npos)
2262 : base_type (s, pos, n), identity_ (*this)
2263 {
2264 }
2265
2266 public:
2276 idref (const idref& x, flags f = 0, container* c = 0)
2277 : base_type (x, f, c), identity_ (*this)
2278 {
2279 }
2280
2292 virtual idref*
2293 _clone (flags f = 0, container* c = 0) const;
2294
2295 public:
2305 template <typename S>
2306 idref (istream<S>& s, flags f = 0, container* c = 0);
2307
2316 idref (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
2317
2326 idref (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
2327
2337 idref (const std::basic_string<C>& s,
2338 const xercesc::DOMElement* e,
2339 flags f = 0,
2340 container* c = 0);
2342
2343 public:
2352 idref&
2354 {
2355 base () = c;
2356 return *this;
2357 }
2358
2367 idref&
2368 operator= (const C* s)
2369 {
2370 base () = s;
2371 return *this;
2372 }
2373
2382 idref&
2383 operator= (const std::basic_string<C>& s)
2384 {
2385 base () = s;
2386 return *this;
2387 }
2388
2395 idref&
2397 {
2398 base () = x;
2399 return *this;
2400 }
2401
2402 public:
2408 const ref_type*
2410 {
2411 return get ();
2412 }
2413
2419 ref_type*
2421 {
2422 return get ();
2423 }
2424
2430 const ref_type&
2432 {
2433 return *(get ());
2434 }
2435
2441 ref_type&
2443 {
2444 return *(get ());
2445 }
2446
2453 const ref_type*
2454 get () const
2455 {
2456 return dynamic_cast<const ref_type*> (get_ ());
2457 }
2458
2465 ref_type*
2467 {
2468 return dynamic_cast<ref_type*> (get_ ());
2469 }
2470
2474 typedef void (idref::*bool_convertible)();
2475
2481 operator bool_convertible () const
2482 {
2483 return get_ () ? &idref::true_ : 0;
2484 }
2485
2486 protected:
2487 //@cond
2488
2489 idref ()
2490 : base_type (), identity_ (*this)
2491 {
2492 }
2493
2494 //@endcond
2495
2496 private:
2497 const _type*
2498 get_ () const;
2499
2500 _type*
2501 get_ ();
2502
2503 void
2504 true_ ();
2505
2506 private:
2507 identity_impl<C, B> identity_;
2508 };
2509
2510
2521 template <typename C, typename B, typename idref>
2522 class idrefs: public B, public list<idref, C>
2523 {
2524 typedef list<idref, C> base_type;
2525
2526 public:
2531
2536 : base_type (this)
2537 {
2538 }
2539
2546 idrefs (typename base_type::size_type n, const idref& x)
2547 : base_type (n, x, this)
2548 {
2549 }
2550
2558 template <typename I>
2559 idrefs (const I& begin, const I& end)
2560 : base_type (begin, end, this)
2561 {
2562 }
2563
2564 public:
2574 idrefs (const idrefs& x, flags f = 0, container* c = 0)
2575 : B (x, f, c), base_type (x, f, this)
2576 {
2577 }
2578
2579#ifdef XSD_CXX11
2580 idrefs&
2581 operator= (const idrefs&) = default;
2582#endif
2583
2595 virtual idrefs*
2596 _clone (flags f = 0, container* c = 0) const;
2597
2598 public:
2608 template <typename S>
2609 idrefs (istream<S>& s, flags f = 0, container* c = 0);
2610
2619 idrefs (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
2620
2629 idrefs (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
2630
2640 idrefs (const std::basic_string<C>& s,
2641 const xercesc::DOMElement* e,
2642 flags f = 0,
2643 container* c = 0);
2645 };
2646
2652 template <typename C, typename B, typename idref>
2653 inline bool
2655 {
2656 return static_cast<const list<idref, C>&> (a) == b;
2657 }
2658
2664 template <typename C, typename B, typename idref>
2665 inline bool
2667 {
2668 return !(a == b);
2669 }
2670
2682 template <typename C, typename B>
2683 class uri: public B, public std::basic_string<C>
2684 {
2685 typedef std::basic_string<C> base_type;
2686
2687 base_type&
2688 base ()
2689 {
2690 return *this;
2691 }
2692
2693 public:
2698
2704 uri (const C* s)
2705 : base_type (s)
2706 {
2707 }
2708
2715 uri (const C* s, std::size_t n)
2716 : base_type (s, n)
2717 {
2718 }
2719
2727 uri (std::size_t n, C c)
2728 : base_type (n, c)
2729 {
2730 }
2731
2737 uri (const std::basic_string<C>& s)
2738 : base_type (s)
2739 {
2740 }
2741
2749 uri (const std::basic_string<C>& s,
2750 std::size_t pos,
2751 std::size_t n = std::basic_string<C>::npos)
2752 : base_type (s, pos, n)
2753 {
2754 }
2755
2756 public:
2766 uri (const uri& x, flags f = 0, container* c = 0)
2767 : B (x, f, c), base_type (x)
2768 {
2769 }
2770
2782 virtual uri*
2783 _clone (flags f = 0, container* c = 0) const;
2784
2785 public:
2795 template <typename S>
2796 uri (istream<S>& s, flags f = 0, container* c = 0);
2797
2806 uri (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
2807
2816 uri (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
2817
2827 uri (const std::basic_string<C>& s,
2828 const xercesc::DOMElement* e,
2829 flags f = 0,
2830 container* c = 0);
2832
2833 public:
2842 uri&
2844 {
2845 base () = c;
2846 return *this;
2847 }
2848
2857 uri&
2858 operator= (const C* s)
2859 {
2860 base () = s;
2861 return *this;
2862 }
2863
2872 uri&
2873 operator= (const std::basic_string<C>& s)
2874 {
2875 base () = s;
2876 return *this;
2877 }
2878
2885 uri&
2886 operator= (const uri& x)
2887 {
2888 base () = x;
2889 return *this;
2890 }
2891
2892 public:
2898 const std::basic_string<C>&
2900 {
2901 return *this;
2902 }
2903
2904 protected:
2905 //@cond
2906
2907 uri ()
2908 : base_type ()
2909 {
2910 }
2911
2912 //@endcond
2913
2914 template <typename, typename, typename, typename>
2915 friend class qname;
2916 };
2917
2923 template <typename C, typename B>
2924 inline bool
2925 operator== (const uri<C, B>& a, const uri<C, B>& b)
2926 {
2927 return static_cast<const std::basic_string<C>&> (a) == b;
2928 }
2929
2935 template <typename C, typename B>
2936 inline bool
2937 operator!= (const uri<C, B>& a, const uri<C, B>& b)
2938 {
2939 return !(a == b);
2940 }
2941
2951 template <typename C, typename B, typename uri, typename ncname>
2952 class qname: public B
2953 {
2954 public:
2959
2967 qname (const ncname& n)
2968 : ns_ (), name_ (n)
2969 {
2970 }
2971
2980 qname (const uri& ns, const ncname& n)
2981 : ns_ (ns), name_ (n)
2982 {
2983 }
2984
2985 public:
2995 qname (const qname& x, flags f = 0, container* c = 0)
2996 : B (x, f, c),
2997 ns_ (x.ns_),
2998 name_ (x.name_)
2999 {
3000 // Note that ns_ and name_ have no DOM association.
3001 //
3002 }
3003
3004#ifdef XSD_CXX11
3005 qname&
3006 operator= (const qname&) = default;
3007#endif
3008
3020 virtual qname*
3021 _clone (flags f = 0, container* c = 0) const;
3022
3023 public:
3033 template <typename S>
3034 qname (istream<S>& s, flags f = 0, container* c = 0);
3035
3044 qname (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
3045
3054 qname (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
3055
3065 qname (const std::basic_string<C>& s,
3066 const xercesc::DOMElement* e,
3067 flags f = 0,
3068 container* c = 0);
3070
3071 public:
3077 bool
3078 qualified () const
3079 {
3080 return !ns_.empty ();
3081 }
3082
3088 const uri&
3089 namespace_ () const
3090 {
3091 return ns_;
3092 }
3093
3099 const ncname&
3100 name () const
3101 {
3102 return name_;
3103 }
3104
3105 protected:
3106 //@cond
3107
3108 qname ()
3109 : ns_ (), name_ ()
3110 {
3111 }
3112
3113 //@endcond
3114
3115 private:
3116 static uri
3117 resolve (const std::basic_string<C>&, const xercesc::DOMElement*);
3118
3119 private:
3120 uri ns_;
3121 ncname name_;
3122 };
3123
3129 template <typename C, typename B, typename uri, typename ncname>
3130 inline bool
3132 const qname<C, B, uri, ncname>& b)
3133 {
3134 return a.name () == b.name () && a.namespace_ () == b.namespace_ ();
3135 }
3136
3142 template <typename C, typename B, typename uri, typename ncname>
3143 inline bool
3145 const qname<C, B, uri, ncname>& b)
3146 {
3147 return !(a == b);
3148 }
3149
3150
3161 template <typename C, typename B>
3162 class base64_binary: public B, public buffer<C>
3163 {
3164 public:
3165 //@cond
3166 typedef typename buffer<C>::size_t size_t;
3167 //@endcond
3168
3169 public:
3174
3182 explicit
3183 base64_binary (size_t size = 0);
3184
3192 base64_binary (size_t size, size_t capacity);
3193
3204 base64_binary (const void* data, size_t size);
3205
3218 base64_binary (const void* data, size_t size, size_t capacity);
3219
3235 size_t size,
3236 size_t capacity,
3237 bool assume_ownership);
3238 public:
3249 flags f = 0,
3250 container* c = 0)
3251 : B (x, f, c), buffer<C> (x)
3252 {
3253 }
3254
3266 virtual base64_binary*
3267 _clone (flags f = 0, container* c = 0) const;
3268
3269 public:
3279 template <typename S>
3280 base64_binary (istream<S>& s, flags f = 0, container* c = 0);
3281
3290 base64_binary (const xercesc::DOMElement& e,
3291 flags f = 0,
3292 container* c = 0);
3293
3302 base64_binary (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
3303
3313 base64_binary (const std::basic_string<C>& s,
3314 const xercesc::DOMElement* e,
3315 flags f = 0,
3316 container* c = 0);
3318
3319 public:
3328 {
3329 buffer<C>& b (*this);
3330 b = x;
3331 return *this;
3332 }
3333
3334 public:
3340 std::basic_string<C>
3341 encode () const;
3342
3343 private:
3344 void
3345 decode (const XMLCh*);
3346 };
3347
3353 template <typename C, typename B>
3354 inline bool
3356 {
3357 return static_cast<const buffer<C>&> (a) == b;
3358 }
3359
3365 template <typename C, typename B>
3366 inline bool
3368 {
3369 return !(a == b);
3370 }
3371
3382 template <typename C, typename B>
3383 class hex_binary: public B, public buffer<C>
3384 {
3385 public:
3386 //@cond
3387 typedef typename buffer<C>::size_t size_t;
3388 //@endcond
3389
3390 public:
3395
3403 explicit
3404 hex_binary (size_t size = 0);
3405
3413 hex_binary (size_t size, size_t capacity);
3414
3425 hex_binary (const void* data, size_t size);
3426
3439 hex_binary (const void* data, size_t size, size_t capacity);
3440
3456 size_t size,
3457 size_t capacity,
3458 bool assume_ownership);
3459
3460 public:
3470 hex_binary (const hex_binary& x, flags f = 0, container* c = 0)
3471 : B (x, f, c), buffer<C> (x)
3472 {
3473 }
3474
3486 virtual hex_binary*
3487 _clone (flags f = 0, container* c = 0) const;
3488
3489 public:
3499 template <typename S>
3500 hex_binary (istream<S>& s, flags f = 0, container* c = 0);
3501
3510 hex_binary (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
3511
3520 hex_binary (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
3521
3531 hex_binary (const std::basic_string<C>& s,
3532 const xercesc::DOMElement* e,
3533 flags f = 0,
3534 container* c = 0);
3536
3537 public:
3544 hex_binary&
3546 {
3547 buffer<C>& b (*this);
3548 b = x;
3549 return *this;
3550 }
3551
3552 public:
3558 std::basic_string<C>
3559 encode () const;
3560
3561 private:
3562 void
3563 decode (const XMLCh*);
3564 };
3565
3571 template <typename C, typename B>
3572 inline bool
3574 {
3575 return static_cast<const buffer<C>&> (a) == b;
3576 }
3577
3583 template <typename C, typename B>
3584 inline bool
3586 {
3587 return !(a == b);
3588 }
3589
3601 template <typename C, typename B>
3602 class entity: public B
3603 {
3604 typedef B base_type;
3605
3606 base_type&
3607 base ()
3608 {
3609 return *this;
3610 }
3611
3612 public:
3617
3623 entity (const C* s)
3624 : base_type (s)
3625 {
3626 }
3627
3634 entity (const C* s, std::size_t n)
3635 : base_type (s, n)
3636 {
3637 }
3638
3646 entity (std::size_t n, C c)
3647 : base_type (n, c)
3648 {
3649 }
3650
3656 entity (const std::basic_string<C>& s)
3657 : base_type (s)
3658 {
3659 }
3660
3668 entity (const std::basic_string<C>& s,
3669 std::size_t pos,
3670 std::size_t n = std::basic_string<C>::npos)
3671 : base_type (s, pos, n)
3672 {
3673 }
3674
3675 public:
3685 entity (const entity& x, flags f = 0, container* c = 0)
3686 : base_type (x, f, c)
3687 {
3688 }
3689
3701 virtual entity*
3702 _clone (flags f = 0, container* c = 0) const;
3703
3704 public:
3714 template <typename S>
3715 entity (istream<S>& s, flags f = 0, container* c = 0);
3716
3725 entity (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
3726
3735 entity (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
3736
3746 entity (const std::basic_string<C>& s,
3747 const xercesc::DOMElement* e,
3748 flags f = 0,
3749 container* c = 0);
3751
3752 public:
3761 entity&
3763 {
3764 base () = c;
3765 return *this;
3766 }
3767
3776 entity&
3777 operator= (const C* s)
3778 {
3779 base () = s;
3780 return *this;
3781 }
3782
3791 entity&
3792 operator= (const std::basic_string<C>& s)
3793 {
3794 base () = s;
3795 return *this;
3796 }
3797
3804 entity&
3806 {
3807 base () = x;
3808 return *this;
3809 }
3810
3811 protected:
3812 //@cond
3813
3814 entity ()
3815 : base_type ()
3816 {
3817 }
3818
3819 //@endcond
3820 };
3821
3822
3833 template <typename C, typename B, typename entity>
3834 class entities: public B, public list<entity, C>
3835 {
3836 typedef list<entity, C> base_type;
3837
3838 public:
3843
3848 : base_type (this)
3849 {
3850 }
3851
3858 entities (typename base_type::size_type n, const entity& x)
3859 : base_type (n, x, this)
3860 {
3861 }
3862
3870 template <typename I>
3871 entities (const I& begin, const I& end)
3872 : base_type (begin, end, this)
3873 {
3874 }
3875
3876 public:
3886 entities (const entities& x, flags f = 0, container* c = 0)
3887 : B (x, f, c), base_type (x, f, this)
3888 {
3889 }
3890
3891#ifdef XSD_CXX11
3892 entities&
3893 operator= (const entities&) = default;
3894#endif
3895
3907 virtual entities*
3908 _clone (flags f = 0, container* c = 0) const;
3909
3910 public:
3920 template <typename S>
3921 entities (istream<S>& s, flags f = 0, container* c = 0);
3922
3931 entities (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
3932
3941 entities (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
3942
3952 entities (const std::basic_string<C>& s,
3953 const xercesc::DOMElement* e,
3954 flags f = 0,
3955 container* c = 0);
3957 };
3958
3964 template <typename C, typename B, typename entity>
3965 inline bool
3967 const entities<C, B, entity>& b)
3968 {
3969 return static_cast<const list<entity, C>&> (a) == b;
3970 }
3971
3977 template <typename C, typename B, typename entity>
3978 inline bool
3980 const entities<C, B, entity>& b)
3981 {
3982 return !(a == b);
3983 }
3984 }
3985 }
3986}
3987
3988#include <xsd/cxx/tree/types.txx>
3989
3990#endif // XSD_CXX_TREE_TYPES_HXX
Contains a simple binary buffer abstraction that is used to implement the base64Binary and hexBinary ...
Class corresponding to the XML Schema anyType built-in type.
Definition elements.hxx:318
Class corresponding to the XML Schema base64Binary built-in type.
Definition types.hxx:3163
base64_binary(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
base64_binary(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
std::basic_string< C > encode() const
Encode the buffer in base64 encoding.
base64_binary(const void *data, size_t size)
Allocate a buffer of the specified size and copy the data.
virtual base64_binary * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
base64_binary(size_t size, size_t capacity)
Allocate a buffer of the specified size and capacity.
base64_binary(const void *data, size_t size, size_t capacity)
Allocate a buffer of the specified size and capacity and copy the data.
base64_binary & operator=(const base64_binary &x)
Copy assignment operator.
Definition types.hxx:3327
base64_binary(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
base64_binary(void *data, size_t size, size_t capacity, bool assume_ownership)
Reuse an existing buffer.
base64_binary(const base64_binary &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:3248
base64_binary(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
base64_binary(size_t size=0)
Allocate a buffer of the specified size.
Simple binary buffer abstraction.
Definition buffer.hxx:81
size_t size() const
Get buffer's size.
Definition buffer.hxx:215
size_t capacity() const
Get buffer's capacity.
Definition buffer.hxx:191
std::size_t size_t
Size type.
Definition buffer.hxx:86
const char * data() const
Get the underlying memory region.
Definition buffer.hxx:243
Class corresponding to the XML Schema ENTITIES built-in type.
Definition types.hxx:3835
entities(const I &begin, const I &end)
Initialize the instance with copies of elements from an iterator range.
Definition types.hxx:3871
entities(typename base_type::size_type n, const entity &x)
Initialize the instance with copies of an exemplar elements.
Definition types.hxx:3858
virtual entities * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
entities(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
entities(const entities &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:3886
entities()
Default constructor creates no elements.
Definition types.hxx:3847
entities(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
entities(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
entities(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
Class corresponding to the XML Schema ENTITY built-in type.
Definition types.hxx:3603
entity & operator=(C c)
Assign a character to the instance.
Definition types.hxx:3762
entity(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
entity(const std::basic_string< C > &s, std::size_t pos, std::size_t n=std::basic_string< C >::npos)
Initialize an instance with a copy of a substring.
Definition types.hxx:3668
entity(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
virtual entity * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
entity(const C *s)
Initialize an instance with a copy of a C string.
Definition types.hxx:3623
entity(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
entity(const C *s, std::size_t n)
Initialize an instance with a character array.
Definition types.hxx:3634
entity(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
entity(const entity &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:3685
entity(std::size_t n, C c)
Initialize an instance with multiple copies of the same character.
Definition types.hxx:3646
entity(const std::basic_string< C > &s)
Initialize an instance with a copy of a standard string.
Definition types.hxx:3656
Parsing and serialization flags.
Definition elements.hxx:76
Class corresponding to the XML Schema hexBinary built-in type.
Definition types.hxx:3384
hex_binary(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
std::basic_string< C > encode() const
Encode the buffer in hex encoding.
virtual hex_binary * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
hex_binary(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
hex_binary(void *data, size_t size, size_t capacity, bool assume_ownership)
Reuse an existing buffer..
hex_binary(size_t size=0)
Allocate a buffer of the specified size.
hex_binary(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
hex_binary(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
hex_binary(const void *data, size_t size, size_t capacity)
Allocate a buffer of the specified size and capacity and copy the data.
hex_binary(const void *data, size_t size)
Allocate a buffer of the specified size and copy the data.
hex_binary(const hex_binary &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:3470
hex_binary & operator=(const hex_binary &x)
Copy assignment operator.
Definition types.hxx:3545
hex_binary(size_t size, size_t capacity)
Allocate a buffer of the specified size and capacity.
Class corresponding to the XML Schema ID built-in type.
Definition types.hxx:1931
id(const C *s)
Initialize an instance with a copy of a C string.
Definition types.hxx:1957
id(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
id(const id &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:2024
id(const std::basic_string< C > &s)
Initialize an instance with a copy of a standard string.
Definition types.hxx:1993
id(const std::basic_string< C > &s, std::size_t pos, std::size_t n=std::basic_string< C >::npos)
Initialize an instance with a copy of a substring.
Definition types.hxx:2006
id(std::size_t n, C c)
Initialize an instance with multiple copies of the same character.
Definition types.hxx:1982
id(const C *s, std::size_t n)
Initialize an instance with a character array.
Definition types.hxx:1969
virtual id * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
id & operator=(C c)
Assign a character to the instance.
id(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
id(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
id(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
Class corresponding to the XML Schema IDREF built-in type.
Definition types.hxx:2188
virtual idref * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
idref(const idref &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:2276
idref(const std::basic_string< C > &s)
Initialize an instance with a copy of a standard string.
Definition types.hxx:2247
idref(const C *s)
Initialize an instance with a copy of a C string.
Definition types.hxx:2214
idref(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
idref & operator=(C c)
Assign a character to the instance.
Definition types.hxx:2353
ref_type * get()
Get a pointer to the referenced object.
Definition types.hxx:2466
idref(const C *s, std::size_t n)
Initialize an instance with a character array.
Definition types.hxx:2225
void(idref::* bool_convertible)()
Opaque type that can be evaluated as true or false.
Definition types.hxx:2474
idref(std::size_t n, C c)
Initialize an instance with multiple copies of the same character.
Definition types.hxx:2237
const ref_type * operator->() const
Call referenced object.
Definition types.hxx:2409
idref(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
T ref_type
Referenced type.
Definition types.hxx:2201
idref(const std::basic_string< C > &s, std::size_t pos, std::size_t n=std::basic_string< C >::npos)
Initialize an instance with a copy of a substring.
Definition types.hxx:2259
const ref_type & operator*() const
Dereference referenced object.
Definition types.hxx:2431
idref(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
idref(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
const ref_type * get() const
Get a constant pointer to the referenced object.
Definition types.hxx:2454
Class corresponding to the XML Schema IDREFS built-in type.
Definition types.hxx:2523
idrefs(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
idrefs(const idrefs &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:2574
idrefs(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
idrefs(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
idrefs(const I &begin, const I &end)
Initialize the instance with copies of elements from an iterator range.
Definition types.hxx:2559
virtual idrefs * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
idrefs(typename base_type::size_type n, const idref &x)
Initialize the instance with copies of an exemplar elements.
Definition types.hxx:2546
idrefs(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
idrefs()
Default constructor creates no elements.
Definition types.hxx:2535
Class corresponding to the XML Schema language built-in type.
Definition types.hxx:1675
language(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
language(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
language(std::size_t n, C c)
Initialize an instance with multiple copies of the same character.
Definition types.hxx:1718
language(const C *s)
Initialize an instance with a copy of a C string.
Definition types.hxx:1695
language & operator=(C c)
Assign a character to the instance.
Definition types.hxx:1834
language(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
virtual language * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
language(const std::basic_string< C > &s)
Initialize an instance with a copy of a standard string.
Definition types.hxx:1728
language(const language &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:1757
language(const C *s, std::size_t n)
Initialize an instance with a character array.
Definition types.hxx:1706
language(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
language(const std::basic_string< C > &s, std::size_t pos, std::size_t n=std::basic_string< C >::npos)
Initialize an instance with a copy of a substring.
Definition types.hxx:1740
Class corresponding to the XML Schema Name built-in type.
Definition types.hxx:1200
name(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
name(const name &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:1282
name(const std::basic_string< C > &s, std::size_t pos, std::size_t n=std::basic_string< C >::npos)
Initialize an instance with a copy of a substring.
Definition types.hxx:1265
name(const C *s, std::size_t n)
Initialize an instance with a character array.
Definition types.hxx:1231
name(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
name(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
virtual name * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
name(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
name & operator=(C c)
Assign a character to the instance.
Definition types.hxx:1359
name(std::size_t n, C c)
Initialize an instance with multiple copies of the same character.
Definition types.hxx:1243
name(const std::basic_string< C > &s)
Initialize an instance with a copy of a standard string.
Definition types.hxx:1253
name(const C *s)
Initialize an instance with a copy of a C string.
Definition types.hxx:1220
Class corresponding to the XML Schema NCame built-in type.
Definition types.hxx:1439
ncname(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
ncname(const ncname &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:1521
ncname(const C *s, std::size_t n)
Initialize an instance with a character array.
Definition types.hxx:1470
ncname(const C *s)
Initialize an instance with a copy of a C string.
Definition types.hxx:1459
ncname(const std::basic_string< C > &s, std::size_t pos, std::size_t n=std::basic_string< C >::npos)
Initialize an instance with a copy of a substring.
Definition types.hxx:1504
ncname & operator=(C c)
Assign a character to the instance.
Definition types.hxx:1598
ncname(std::size_t n, C c)
Initialize an instance with multiple copies of the same character.
Definition types.hxx:1482
ncname(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
ncname(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
virtual ncname * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
ncname(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
ncname(const std::basic_string< C > &s)
Initialize an instance with a copy of a standard string.
Definition types.hxx:1492
Class corresponding to the XML Schema NMTOKEN built-in type.
Definition types.hxx:805
nmtoken(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
nmtoken(const std::basic_string< C > &s, std::size_t pos, std::size_t n=std::basic_string< C >::npos)
Initialize an instance with a copy of a substring.
Definition types.hxx:870
nmtoken(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
nmtoken(const nmtoken &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:887
nmtoken(const C *s, std::size_t n)
Initialize an instance with a character array.
Definition types.hxx:836
nmtoken(const C *s)
Initialize an instance with a copy of a C string.
Definition types.hxx:825
nmtoken(const std::basic_string< C > &s)
Initialize an instance with a copy of a standard string.
Definition types.hxx:858
virtual nmtoken * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
nmtoken(std::size_t n, C c)
Initialize an instance with multiple copies of the same character.
Definition types.hxx:848
nmtoken(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
nmtoken & operator=(C c)
Assign a character to the instance.
Definition types.hxx:964
nmtoken(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
Class corresponding to the XML Schema NMTOKENS built-in type.
Definition types.hxx:1037
nmtokens(const I &begin, const I &end)
Initialize the instance with copies of elements from an iterator range.
Definition types.hxx:1073
nmtokens(typename base_type::size_type n, const nmtoken &x)
Initialize the instance with copies of an exemplar elements.
Definition types.hxx:1060
virtual nmtokens * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
nmtokens(const nmtokens &x, flags f, container *c=0)
Copy constructor.
Definition types.hxx:1088
nmtokens(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
nmtokens(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
nmtokens(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
nmtokens(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
nmtokens()
Default constructor creates no elements.
Definition types.hxx:1049
Class corresponding to the XML Schema normalizedString built-in type.
Definition types.hxx:322
normalized_string(const normalized_string &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:411
normalized_string(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
virtual normalized_string * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
normalized_string(const C *s)
Initialize an instance with a copy of a C string.
Definition types.hxx:349
normalized_string(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
normalized_string(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
normalized_string(const std::basic_string< C > &s)
Initialize an instance with a copy of a standard string.
Definition types.hxx:382
normalized_string(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
normalized_string(const C *s, std::size_t n)
Initialize an instance with a character array.
Definition types.hxx:360
normalized_string & operator=(C c)
Assign a character to the instance.
Definition types.hxx:494
normalized_string()
Default constructor creates an empty normalized_string.
Definition types.hxx:340
normalized_string(std::size_t n, C c)
Initialize an instance with multiple copies of the same character.
Definition types.hxx:372
normalized_string(const std::basic_string< C > &s, std::size_t pos, std::size_t n=std::basic_string< C >::npos)
Initialize an instance with a copy of a substring.
Definition types.hxx:394
Class corresponding to the XML Schema QName built-in type.
Definition types.hxx:2953
qname(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
qname(const qname &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:2995
qname(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
const ncname & name() const
Get XML name.
Definition types.hxx:3100
virtual qname * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
qname(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
bool qualified() const
Determine if the name is qualified.
Definition types.hxx:3078
qname(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
qname(const uri &ns, const ncname &n)
Initialize an instance with a name and a namespace.
Definition types.hxx:2980
qname(const ncname &n)
Initialize an instance with a name only.
Definition types.hxx:2967
const uri & namespace_() const
Get XML namespace.
Definition types.hxx:3089
Class corresponding to the XML Schema string built-in type.
Definition types.hxx:57
string(std::size_t n, C c)
Initialize an instance with multiple copies of the same character.
Definition types.hxx:107
string(const std::basic_string< C > &s)
Initialize an instance with a copy of a standard string.
Definition types.hxx:117
string(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
string(const C *s, std::size_t n)
Initialize an instance with a character array.
Definition types.hxx:95
virtual string * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
string(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
const std::basic_string< C > & base_string() const
Explicitly "cast" to the base string type.
Definition types.hxx:279
string(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
string(const C *s)
Initialize an instance with a copy of a C string.
Definition types.hxx:84
string(const std::basic_string< C > &s, std::size_t pos, std::size_t n=std::basic_string< C >::npos)
Initialize an instance with a copy of a substring.
Definition types.hxx:129
string()
Default constructor creates an empty string.
Definition types.hxx:75
string(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
string(const string &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:146
string & operator=(C c)
Assign a character to the instance.
Definition types.hxx:223
Class corresponding to the XML Schema token built-in type.
Definition types.hxx:567
token(const C *s)
Initialize an instance with a copy of a C string.
Definition types.hxx:594
token(const C *s, std::size_t n)
Initialize an instance with a character array.
Definition types.hxx:605
token(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
token(std::size_t n, C c)
Initialize an instance with multiple copies of the same character.
Definition types.hxx:617
virtual token * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
token(const std::basic_string< C > &s, std::size_t pos, std::size_t n=std::basic_string< C >::npos)
Initialize an instance with a copy of a substring.
Definition types.hxx:639
token(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
token(const std::basic_string< C > &s)
Initialize an instance with a copy of a standard string.
Definition types.hxx:627
token(const token &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:656
token()
Default constructor creates an empty token.
Definition types.hxx:585
token & operator=(C c)
Assign a character to the instance.
Definition types.hxx:733
token(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
token(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
Class corresponding to the XML Schema anyURI built-in type.
Definition types.hxx:2684
uri(const C *s)
Initialize an instance with a copy of a C string.
Definition types.hxx:2704
uri(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
uri(const std::basic_string< C > &s, std::size_t pos, std::size_t n=std::basic_string< C >::npos)
Initialize an instance with a copy of a substring.
Definition types.hxx:2749
uri(const C *s, std::size_t n)
Initialize an instance with a character array.
Definition types.hxx:2715
const std::basic_string< C > & base_string() const
Explicitly "cast" to the base string type.
Definition types.hxx:2899
virtual uri * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
uri(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
uri(const uri &x, flags f=0, container *c=0)
Copy constructor.
Definition types.hxx:2766
uri(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
uri(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
uri(const std::basic_string< C > &s)
Initialize an instance with a copy of a standard string.
Definition types.hxx:2737
uri & operator=(C c)
Assign a character to the instance.
Definition types.hxx:2843
uri(std::size_t n, C c)
Initialize an instance with multiple copies of the same character.
Definition types.hxx:2727
Contains C++ class definitions for the XML Schema date/time types.
Contains C++ class definitions for XML Schema anyType and anySimpleType types as well as supporting c...
bool operator==(const buffer< C > &a, const buffer< C > &b)
buffer comparison operator.
Definition buffer.hxx:311
bool operator!=(const buffer< C > &a, const buffer< C > &b)
buffer comparison operator.
Definition buffer.hxx:325

Copyright © 2005-2023 Code Synthesis.