C++/Tree Mapping Runtime Library
List of all members
gmonth_day< C, B > Class Template Reference

Class corresponding to the XML Schema gMonthDay built-in type. More...

#include <date-time.hxx>

Inheritance diagram for gmonth_day< C, B >:
time_zone

Constructors

 gmonth_day (unsigned short month, unsigned short day)
 Initialize an instance with the month and day components.
 
 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 gmonth_day &x, flags f=0, container *c=0)
 Copy constructor.
 
virtual gmonth_day_clone (flags f=0, container *c=0) const
 Copy the instance polymorphically.
 
template<typename S >
 gmonth_day (istream< S > &s, flags f=0, container *c=0)
 Create an instance from a data representation stream.
 
 gmonth_day (const xercesc::DOMElement &e, flags f=0, container *c=0)
 Create an instance from a DOM element.
 
 gmonth_day (const xercesc::DOMAttr &a, flags f=0, container *c=0)
 Create an instance from a DOM Attribute.
 
 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.
 
unsigned short month () const
 Get the month component.
 
void month (unsigned short m)
 Set the month component.
 
unsigned short day () const
 Get the day component.
 
void day (unsigned short d)
 Set the day component.
 

Additional Inherited Members

- Public Member Functions inherited from time_zone
 time_zone ()
 Default constructor.
 
 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.
 
void zone_reset ()
 Reset the time zone to the 'not specified' state.
 
short zone_hours () const
 Get the hours component of the time zone.
 
void zone_hours (short h)
 Set the hours component of the time zone.
 
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.
 

Detailed Description

template<typename C, typename B>
class xsd::cxx::tree::gmonth_day< C, B >

Class corresponding to the XML Schema gMonthDay built-in type.

The gmonth_day class represents day and month of the year with an optional time zone.

Constructor & Destructor Documentation

◆ gmonth_day() [1/7]

template<typename C , typename B >
gmonth_day ( unsigned short  month,
unsigned short  day 
)

Initialize an instance with the month and day components.

When this constructor is used, the time zone is left unspecified.

Parameters
monthThe month component.
dayThe day component.

◆ gmonth_day() [2/7]

template<typename C , typename B >
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.

Parameters
monthThe month component.
dayThe day component.
zone_hoursThe time zone hours component.
zone_minutesThe time zone minutes component.

◆ gmonth_day() [3/7]

template<typename C , typename B >
gmonth_day ( const gmonth_day< C, B > &  x,
flags  f = 0,
container c = 0 
)

Copy constructor.

Parameters
xAn instance to make a copy of.
fFlags to create the copy with.
cA pointer to the object that will contain the copy.

For polymorphic object models use the _clone function instead.

◆ gmonth_day() [4/7]

template<typename C , typename B >
template<typename S >
gmonth_day ( istream< S > &  s,
flags  f = 0,
container c = 0 
)

Create an instance from a data representation stream.

Parameters
sA stream to extract the data from.
fFlags to create the new instance with.
cA pointer to the object that will contain the new instance.

◆ gmonth_day() [5/7]

template<typename C , typename B >
gmonth_day ( const xercesc::DOMElement &  e,
flags  f = 0,
container c = 0 
)

Create an instance from a DOM element.

Parameters
eA DOM element to extract the data from.
fFlags to create the new instance with.
cA pointer to the object that will contain the new instance.

◆ gmonth_day() [6/7]

template<typename C , typename B >
gmonth_day ( const xercesc::DOMAttr &  a,
flags  f = 0,
container c = 0 
)

Create an instance from a DOM Attribute.

Parameters
aA DOM attribute to extract the data from.
fFlags to create the new instance with.
cA pointer to the object that will contain the new instance.

◆ gmonth_day() [7/7]

template<typename C , typename B >
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.

Parameters
sA string fragment to extract the data from.
eA pointer to DOM element containing the string fragment.
fFlags to create the new instance with.
cA pointer to the object that will contain the new instance.

Member Function Documentation

◆ _clone()

template<typename C , typename B >
virtual gmonth_day * _clone ( flags  f = 0,
container c = 0 
) const
virtual

Copy the instance polymorphically.

Parameters
fFlags to create the copy with.
cA pointer to the object that will contain the copy.
Returns
A pointer to the dynamically allocated copy.

This function ensures that the dynamic type of the instance is used for copying and should be used for polymorphic object models instead of the copy constructor.

◆ month() [1/2]

template<typename C , typename B >
unsigned short month ( ) const

Get the month component.

Returns
The month component.

◆ month() [2/2]

template<typename C , typename B >
void month ( unsigned short  m)

Set the month component.

Parameters
mThe new month component.

◆ day() [1/2]

template<typename C , typename B >
unsigned short day ( ) const

Get the day component.

Returns
The day component.

◆ day() [2/2]

template<typename C , typename B >
void day ( unsigned short  d)

Set the day component.

Parameters
dThe new day component.

The documentation for this class was generated from the following file:

Copyright © 2005-2023 Code Synthesis.