C++/Tree Mapping Runtime Library
date-time.hxx
Go to the documentation of this file.
1// file : xsd/cxx/tree/date-time.hxx
2// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
3
14#ifndef XSD_CXX_TREE_DATE_TIME_HXX
15#define XSD_CXX_TREE_DATE_TIME_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/istream-fwd.hxx>
25
26namespace xsd
27{
28 namespace cxx
29 {
38 namespace tree
39 {
52 {
53 public:
58
66
74 time_zone (short hours, short minutes);
75
77
83 bool
84 zone_present () const;
85
90 void
92
98 short
99 zone_hours () const;
100
106 void
107 zone_hours (short h);
108
109
115 short
116 zone_minutes () const;
117
123 void
124 zone_minutes (short m);
125
126 protected:
127 //@cond
128
129 template <typename C>
130 void
131 zone_parse (const C*, std::size_t);
132
133 template <typename S>
134 void
135 zone_extract (istream<S>&);
136
137 //@endcond
138
139 private:
140 bool present_;
141 short hours_;
142 short minutes_;
143 };
144
151 bool
153
160 bool
162
163
172 template <typename C, typename B>
173 class gday: public B, public time_zone
174 {
175 public:
180
189 explicit
190 gday (unsigned short day);
191
200 gday (unsigned short day, short zone_hours, short zone_minutes);
201
211 gday (const gday& x, flags f = 0, container* c = 0);
212
213#ifdef XSD_CXX11
214 gday&
215 operator= (const gday&) = default;
216#endif
217
229 virtual gday*
230 _clone (flags f = 0, container* c = 0) const;
231
241 template <typename S>
242 gday (istream<S>& s, flags f = 0, container* c = 0);
243
252 gday (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
253
262 gday (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
263
273 gday (const std::basic_string<C>& s,
274 const xercesc::DOMElement* e,
275 flags f = 0,
276 container* c = 0);
278
279 public:
285 unsigned short
286 day () const;
287
293 void
294 day (unsigned short d);
295
296 protected:
297 //@cond
298
299 gday ();
300
301 void
302 parse (const std::basic_string<C>&);
303
304 //@endcond
305
306 private:
307 unsigned short day_;
308 };
309
316 template <typename C, typename B>
317 bool
319
326 template <typename C, typename B>
327 bool
329
338 template <typename C, typename B>
339 class gmonth: public B, public time_zone
340 {
341 public:
346
355 explicit
356 gmonth (unsigned short month);
357
366 gmonth (unsigned short month, short zone_hours, short zone_minutes);
367
377 gmonth (const gmonth& x, flags f = 0, container* c = 0);
378
379#ifdef XSD_CXX11
380 gmonth&
381 operator= (const gmonth&) = default;
382#endif
383
395 virtual gmonth*
396 _clone (flags f = 0, container* c = 0) const;
397
407 template <typename S>
408 gmonth (istream<S>& s, flags f = 0, container* c = 0);
409
418 gmonth (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
419
428 gmonth (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
429
439 gmonth (const std::basic_string<C>& s,
440 const xercesc::DOMElement* e,
441 flags f = 0,
442 container* c = 0);
444
445 public:
451 unsigned short
452 month () const;
453
459 void
460 month (unsigned short m);
461
462 protected:
463 //@cond
464
465 gmonth ();
466
467 void
468 parse (const std::basic_string<C>&);
469
470 //@endcond
471
472 private:
473 unsigned short month_;
474 };
475
482 template <typename C, typename B>
483 bool
485
492 template <typename C, typename B>
493 bool
495
496
504 template <typename C, typename B>
505 class gyear: public B, public time_zone
506 {
507 public:
512
521 explicit
522 gyear (int year);
523
532 gyear (int year, short zone_hours, short zone_minutes);
533
543 gyear (const gyear& x, flags f = 0, container* c = 0);
544
545#ifdef XSD_CXX11
546 gyear&
547 operator= (const gyear&) = default;
548#endif
549
561 virtual gyear*
562 _clone (flags f = 0, container* c = 0) const;
563
573 template <typename S>
574 gyear (istream<S>& s, flags f = 0, container* c = 0);
575
584 gyear (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
585
594 gyear (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
595
605 gyear (const std::basic_string<C>& s,
606 const xercesc::DOMElement* e,
607 flags f = 0,
608 container* c = 0);
610
611 public:
617 int
618 year () const;
619
625 void
626 year (int y);
627
628 protected:
629 //@cond
630
631 gyear ();
632
633 void
634 parse (const std::basic_string<C>&);
635
636 //@endcond
637
638 private:
639 int year_;
640 };
641
648 template <typename C, typename B>
649 bool
651
658 template <typename C, typename B>
659 bool
661
662
671 template <typename C, typename B>
672 class gmonth_day: public B, public time_zone
673 {
674 public:
679
689 gmonth_day (unsigned short month, unsigned short day);
690
700 gmonth_day (unsigned short month, unsigned short day,
701 short zone_hours, short zone_minutes);
702
712 gmonth_day (const gmonth_day& x, flags f = 0, container* c = 0);
713
714#ifdef XSD_CXX11
716 operator= (const gmonth_day&) = default;
717#endif
718
730 virtual gmonth_day*
731 _clone (flags f = 0, container* c = 0) const;
732
742 template <typename S>
743 gmonth_day (istream<S>& s, flags f = 0, container* c = 0);
744
753 gmonth_day (const xercesc::DOMElement& e,
754 flags f = 0,
755 container* c = 0);
756
765 gmonth_day (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
766
776 gmonth_day (const std::basic_string<C>& s,
777 const xercesc::DOMElement* e,
778 flags f = 0,
779 container* c = 0);
781
782 public:
788 unsigned short
789 month () const;
790
796 void
797 month (unsigned short m);
798
804 unsigned short
805 day () const;
806
812 void
813 day (unsigned short d);
814
815 protected:
816 //@cond
817
818 gmonth_day ();
819
820 void
821 parse (const std::basic_string<C>&);
822
823 //@endcond
824
825 private:
826 unsigned short month_;
827 unsigned short day_;
828 };
829
836 template <typename C, typename B>
837 bool
839
846 template <typename C, typename B>
847 bool
849
850
860 template <typename C, typename B>
861 class gyear_month: public B, public time_zone
862 {
863 public:
868
878 gyear_month (int year, unsigned short month);
879
889 gyear_month (int year, unsigned short month,
890 short zone_hours, short zone_minutes);
891
901 gyear_month (const gyear_month& x, flags f = 0, container* c = 0);
902
903#ifdef XSD_CXX11
905 operator= (const gyear_month&) = default;
906#endif
907
919 virtual gyear_month*
920 _clone (flags f = 0, container* c = 0) const;
921
931 template <typename S>
932 gyear_month (istream<S>& s, flags f = 0, container* c = 0);
933
942 gyear_month (const xercesc::DOMElement& e,
943 flags f = 0,
944 container* c = 0);
945
954 gyear_month (const xercesc::DOMAttr& a,
955 flags f = 0,
956 container* c = 0);
957
967 gyear_month (const std::basic_string<C>& s,
968 const xercesc::DOMElement* e,
969 flags f = 0,
970 container* c = 0);
972
973 public:
979 int
980 year () const;
981
987 void
988 year (int y);
989
995 unsigned short
996 month () const;
997
1003 void
1004 month (unsigned short m);
1005
1006 protected:
1007 //@cond
1008
1009 gyear_month ();
1010
1011 void
1012 parse (const std::basic_string<C>&);
1013
1014 //@endcond
1015
1016 private:
1017 int year_;
1018 unsigned short month_;
1019 };
1020
1027 template <typename C, typename B>
1028 bool
1030
1037 template <typename C, typename B>
1038 bool
1040
1041
1050 template <typename C, typename B>
1051 class date: public B, public time_zone
1052 {
1053 public:
1058
1070 date (int year, unsigned short month, unsigned short day);
1071
1082 date (int year, unsigned short month, unsigned short day,
1083 short zone_hours, short zone_minutes);
1084
1094 date (const date& x, flags f = 0, container* c = 0);
1095
1096#ifdef XSD_CXX11
1097 date&
1098 operator= (const date&) = default;
1099#endif
1100
1112 virtual date*
1113 _clone (flags f = 0, container* c = 0) const;
1114
1124 template <typename S>
1125 date (istream<S>& s, flags f = 0, container* c = 0);
1126
1135 date (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
1136
1145 date (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
1146
1156 date (const std::basic_string<C>& s,
1157 const xercesc::DOMElement* e,
1158 flags f = 0,
1159 container* c = 0);
1161
1162 public:
1168 int
1169 year () const;
1170
1176 void
1177 year (int y);
1178
1184 unsigned short
1185 month () const;
1186
1192 void
1193 month (unsigned short m);
1194
1200 unsigned short
1201 day () const;
1202
1208 void
1209 day (unsigned short d);
1210
1211 protected:
1212 //@cond
1213
1214 date ();
1215
1216 void
1217 parse (const std::basic_string<C>&);
1218
1219 //@endcond
1220
1221 private:
1222 int year_;
1223 unsigned short month_;
1224 unsigned short day_;
1225 };
1226
1233 template <typename C, typename B>
1234 bool
1236
1243 template <typename C, typename B>
1244 bool
1246
1247
1256 template <typename C, typename B>
1257 class time: public B, public time_zone
1258 {
1259 public:
1264
1276 time (unsigned short hours, unsigned short minutes, double seconds);
1277
1288 time (unsigned short hours, unsigned short minutes, double seconds,
1289 short zone_hours, short zone_minutes);
1290
1300 time (const time& x, flags f = 0, container* c = 0);
1301
1302#ifdef XSD_CXX11
1303 time&
1304 operator= (const time&) = default;
1305#endif
1306
1318 virtual time*
1319 _clone (flags f = 0, container* c = 0) const;
1320
1330 template <typename S>
1331 time (istream<S>& s, flags f = 0, container* c = 0);
1332
1341 time (const xercesc::DOMElement& e, flags f = 0, container* c = 0);
1342
1351 time (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
1352
1362 time (const std::basic_string<C>& s,
1363 const xercesc::DOMElement* e,
1364 flags f = 0,
1365 container* c = 0);
1367
1368 public:
1374 unsigned short
1375 hours () const;
1376
1382 void
1383 hours (unsigned short h);
1384
1390 unsigned short
1391 minutes () const;
1392
1398 void
1399 minutes (unsigned short m);
1400
1406 double
1407 seconds () const;
1408
1414 void
1415 seconds (double s);
1416
1417 protected:
1418 //@cond
1419
1420 time ();
1421
1422 void
1423 parse (const std::basic_string<C>&);
1424
1425 //@endcond
1426
1427 private:
1428 unsigned short hours_;
1429 unsigned short minutes_;
1430 double seconds_;
1431 };
1432
1439 template <typename C, typename B>
1440 bool
1442
1449 template <typename C, typename B>
1450 bool
1452
1453
1462 template <typename C, typename B>
1463 class date_time: public B, public time_zone
1464 {
1465 public:
1470
1485 date_time (int year, unsigned short month, unsigned short day,
1486 unsigned short hours, unsigned short minutes,
1487 double seconds);
1488
1502 date_time (int year, unsigned short month, unsigned short day,
1503 unsigned short hours, unsigned short minutes,
1504 double seconds, short zone_hours, short zone_minutes);
1505
1515 date_time (const date_time& x, flags f = 0, container* c = 0);
1516
1528 virtual date_time*
1529 _clone (flags f = 0, container* c = 0) const;
1530
1531#ifdef XSD_CXX11
1532 date_time&
1533 operator= (const date_time&) = default;
1534#endif
1535
1545 template <typename S>
1546 date_time (istream<S>& s, flags f = 0, container* c = 0);
1547
1556 date_time (const xercesc::DOMElement& e,
1557 flags f = 0,
1558 container* c = 0);
1559
1568 date_time (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
1569
1579 date_time (const std::basic_string<C>& s,
1580 const xercesc::DOMElement* e,
1581 flags f = 0,
1582 container* c = 0);
1584
1585 public:
1591 int
1592 year () const;
1593
1599 void
1600 year (int y);
1601
1607 unsigned short
1608 month () const;
1609
1615 void
1616 month (unsigned short m);
1617
1623 unsigned short
1624 day () const;
1625
1631 void
1632 day (unsigned short d);
1633
1639 unsigned short
1640 hours () const;
1641
1647 void
1648 hours (unsigned short h);
1649
1655 unsigned short
1656 minutes () const;
1657
1663 void
1664 minutes (unsigned short m);
1665
1671 double
1672 seconds () const;
1673
1679 void
1680 seconds (double s);
1681
1682 protected:
1683 //@cond
1684
1685 date_time ();
1686
1687 void
1688 parse (const std::basic_string<C>&);
1689
1690 //@endcond
1691
1692 private:
1693 int year_;
1694 unsigned short month_;
1695 unsigned short day_;
1696 unsigned short hours_;
1697 unsigned short minutes_;
1698 double seconds_;
1699 };
1700
1707 template <typename C, typename B>
1708 bool
1710
1717 template <typename C, typename B>
1718 bool
1720
1721
1730 template <typename C, typename B>
1731 class duration: public B
1732 {
1733 public:
1752 unsigned int years, unsigned int months, unsigned int days,
1753 unsigned int hours, unsigned int minutes, double seconds);
1754
1764 duration (const duration& x, flags f = 0, container* c = 0);
1765
1766#ifdef XSD_CXX11
1767 duration&
1768 operator= (const duration&) = default;
1769#endif
1770
1782 virtual duration*
1783 _clone (flags f = 0, container* c = 0) const;
1784
1794 template <typename S>
1795 duration (istream<S>& s, flags f = 0, container* c = 0);
1796
1805 duration (const xercesc::DOMElement& e,
1806 flags f = 0,
1807 container* c = 0);
1808
1817 duration (const xercesc::DOMAttr& a, flags f = 0, container* c = 0);
1818
1828 duration (const std::basic_string<C>& s,
1829 const xercesc::DOMElement* e,
1830 flags f = 0,
1831 container* c = 0);
1833
1834 public:
1840 bool
1841 negative () const;
1842
1849 void
1850 negative (bool n);
1851
1857 unsigned int
1858 years () const;
1859
1865 void
1866 years (unsigned int y);
1867
1873 unsigned int
1874 months () const;
1875
1881 void
1882 months (unsigned int m);
1883
1889 unsigned int
1890 days () const;
1891
1897 void
1898 days (unsigned int d);
1899
1905 unsigned int
1906 hours () const;
1907
1913 void
1914 hours (unsigned int h);
1915
1921 unsigned int
1922 minutes () const;
1923
1929 void
1930 minutes (unsigned int m);
1931
1937 double
1938 seconds () const;
1939
1945 void
1946 seconds (double s);
1947
1948 protected:
1949 //@cond
1950
1951 duration ();
1952
1953 void
1954 parse (const std::basic_string<C>&);
1955
1956 //@endcond
1957
1958 private:
1959 bool negative_;
1960 unsigned int years_;
1961 unsigned int months_;
1962 unsigned int days_;
1963 unsigned int hours_;
1964 unsigned int minutes_;
1965 double seconds_;
1966 };
1967
1974 template <typename C, typename B>
1975 bool
1977
1984 template <typename C, typename B>
1985 bool
1987 }
1988 }
1989}
1990
1991#include <xsd/cxx/tree/date-time.ixx>
1992#include <xsd/cxx/tree/date-time.txx>
1993
1994#endif // XSD_CXX_TREE_DATE_TIME_HXX
Class corresponding to the XML Schema anyType built-in type.
Definition elements.hxx:318
Class corresponding to the XML Schema dateTime built-in type.
Definition date-time.hxx:1464
void year(int y)
Set the year component.
unsigned short month() const
Get the month component.
date_time(const date_time &x, flags f=0, container *c=0)
Copy constructor.
int year() const
Get the year component.
unsigned short minutes() const
Get the minutes component.
void month(unsigned short m)
Set the month component.
double seconds() const
Get the seconds component.
void hours(unsigned short h)
Set the hours component.
unsigned short day() const
Get the day component.
void day(unsigned short d)
Set the day component.
date_time(int year, unsigned short month, unsigned short day, unsigned short hours, unsigned short minutes, double seconds, short zone_hours, short zone_minutes)
Initialize an instance with the year, month, day, hours, minutes, and seconds components as well as t...
void seconds(double s)
Set the seconds component.
date_time(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
date_time(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
date_time(int year, unsigned short month, unsigned short day, unsigned short hours, unsigned short minutes, double seconds)
Initialize an instance with the year, month, day, hours, minutes, and seconds components.
date_time(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
virtual date_time * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
unsigned short hours() const
Get the hours component.
void minutes(unsigned short m)
Set the minutes component.
date_time(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
Class corresponding to the XML Schema date built-in type.
Definition date-time.hxx:1052
void year(int y)
Set the year component.
unsigned short month() const
Get the month component.
int year() const
Get the year component.
void month(unsigned short m)
Set the month component.
unsigned short day() const
Get the day component.
date(int year, unsigned short month, unsigned short day, short zone_hours, short zone_minutes)
Initialize an instance with the year, month, and day components as well as time zone.
date(const date &x, flags f=0, container *c=0)
Copy constructor.
date(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
void day(unsigned short d)
Set the day component.
virtual date * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
date(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
date(int year, unsigned short month, unsigned short day)
Initialize an instance with the year, month, and day components.
date(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
date(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
Class corresponding to the XML Schema duration built-in type.
Definition date-time.hxx:1732
unsigned int years() const
Get the years component.
duration(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
double seconds() const
Get the seconds component.
void minutes(unsigned int m)
Set the minutes component.
void negative(bool n)
Change duration sign.
duration(const duration &x, flags f=0, container *c=0)
Copy constructor.
void days(unsigned int d)
Set the days component.
unsigned int minutes() const
Get the minutes component.
void months(unsigned int m)
Set the months component.
unsigned int days() const
Get the days component.
unsigned int months() const
Get the months component.
duration(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
void years(unsigned int y)
Set the years component.
void seconds(double s)
Set the seconds component.
bool negative() const
Determine if duration is negative.
duration(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
duration(bool negative, unsigned int years, unsigned int months, unsigned int days, unsigned int hours, unsigned int minutes, double seconds)
Initialize a potentially negative instance with the years, months, days, hours, minutes,...
unsigned int hours() const
Get the hours component.
duration(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
virtual duration * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
void hours(unsigned int h)
Set the hours component.
Parsing and serialization flags.
Definition elements.hxx:76
Class corresponding to the XML Schema gDay built-in type.
Definition date-time.hxx:174
virtual gday * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
unsigned short day() const
Get the day component.
gday(unsigned short day, short zone_hours, short zone_minutes)
Initialize an instance with the day component and time zone.
void day(unsigned short d)
Set the day component.
gday(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
gday(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
gday(const gday &x, flags f=0, container *c=0)
Copy constructor.
gday(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
gday(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
gday(unsigned short day)
Initialize an instance with the day component.
Class corresponding to the XML Schema gMonthDay built-in type.
Definition date-time.hxx:673
unsigned short month() const
Get the month component.
void month(unsigned short m)
Set the month component.
gmonth_day(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
unsigned short day() const
Get the day component.
gmonth_day(unsigned short month, unsigned short day)
Initialize an instance with the month and day components.
gmonth_day(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
gmonth_day(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
void day(unsigned short d)
Set the day component.
gmonth_day(unsigned short month, unsigned short day, short zone_hours, short zone_minutes)
Initialize an instance with the month and day components as well as time zone.
gmonth_day(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
virtual gmonth_day * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
gmonth_day(const gmonth_day &x, flags f=0, container *c=0)
Copy constructor.
Class corresponding to the XML Schema gMonth built-in type.
Definition date-time.hxx:340
unsigned short month() const
Get the month component.
void month(unsigned short m)
Set the month component.
gmonth(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
gmonth(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
gmonth(const gmonth &x, flags f=0, container *c=0)
Copy constructor.
gmonth(unsigned short month, short zone_hours, short zone_minutes)
Initialize an instance with the month component and time zone.
virtual gmonth * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
gmonth(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
gmonth(unsigned short month)
Initialize an instance with the month component.
gmonth(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
Class corresponding to the XML Schema gYearMonth built-in type.
Definition date-time.hxx:862
void year(int y)
Set the year component.
unsigned short month() const
Get the month component.
gyear_month(int year, unsigned short month, short zone_hours, short zone_minutes)
Initialize an instance with the year and month components as well as time zone.
int year() const
Get the year component.
void month(unsigned short m)
Set the month component.
gyear_month(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
virtual gyear_month * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
gyear_month(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
gyear_month(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
gyear_month(const gyear_month &x, flags f=0, container *c=0)
Copy constructor.
gyear_month(int year, unsigned short month)
Initialize an instance with the year and month components.
gyear_month(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
Class corresponding to the XML Schema gYear built-in type.
Definition date-time.hxx:506
gyear(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
void year(int y)
Set the year component.
int year() const
Get the year component.
gyear(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
gyear(int year)
Initialize an instance with the year component.
gyear(int year, short zone_hours, short zone_minutes)
Initialize an instance with the year component and time zone.
gyear(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
virtual gyear * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
gyear(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
gyear(const gyear &x, flags f=0, container *c=0)
Copy constructor.
Time zone representation.
Definition date-time.hxx:52
time_zone(short hours, short minutes)
Initialize an instance with the hours and minutes components.
bool zone_present() const
Determine if time zone is specified.
time_zone()
Default constructor.
void zone_hours(short h)
Set the hours component of the time zone.
short zone_hours() const
Get the hours component of the time zone.
void zone_reset()
Reset the time zone to the 'not specified' state.
short zone_minutes() const
Get the minutes component of the time zone.
void zone_minutes(short m)
Set the minutes component of the time zone.
Class corresponding to the XML Schema time built-in type.
Definition date-time.hxx:1258
time(const xercesc::DOMAttr &a, flags f=0, container *c=0)
Create an instance from a DOM Attribute.
unsigned short minutes() const
Get the minutes component.
double seconds() const
Get the seconds component.
void hours(unsigned short h)
Set the hours component.
time(istream< S > &s, flags f=0, container *c=0)
Create an instance from a data representation stream.
virtual time * _clone(flags f=0, container *c=0) const
Copy the instance polymorphically.
void seconds(double s)
Set the seconds component.
time(unsigned short hours, unsigned short minutes, double seconds, short zone_hours, short zone_minutes)
Initialize an instance with the hours, minutes, and seconds components as well as time zone.
time(unsigned short hours, unsigned short minutes, double seconds)
Initialize an instance with the hours, minutes, and seconds components.
time(const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
Create an instance from a string fragment.
unsigned short hours() const
Get the hours component.
void minutes(unsigned short m)
Set the minutes component.
time(const xercesc::DOMElement &e, flags f=0, container *c=0)
Create an instance from a DOM element.
time(const time &x, flags f=0, container *c=0)
Copy constructor.
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.