By default, the xsd:dateTime, xsd:date,
and xsd:time
types are
mapped to character string variables. However, if the -numDateTime command line option is selected, or a <ctype>numeric</ ctype> configuration item is associated with a
date/time type, then a reference to the following numeric structure is used:
typedef struct OSXSDDateTime { OSINT32 year; OSUINT8 mon; /* 1 <= mon <= 12 */ OSUINT8 day; /* 1 <= day <= 31 */ OSUINT8 hour; /* 0 <= hour <= 23 */ OSUINT8 min; /* 0 <= min <= 59*/ OSREAL sec; OSBOOL tz_flag; /* is tzo explicitely set? */ OSINT32 tzo; /* -1440 <= tzo <= 1440 */ } OSXSDDateTime;
For C++, a class is derived from this type (OSXSDDateTimeClass) which provide constructors and helper methods to manipulate date/time values. For example, conversions to and from system time types such as time_t and struct tm are supported. See the XBinder C/C++ Run-time Reference Manual for more details.
The general mapping is as follows:
XSD type:
<xsd:simpleType name="TypeName"> <xsd:restriction base="xsd:dateTime"/> </xsd:simpleType>
Generated C code:
typedef OSXSDDateTime TypeName;
Generated C++ code:
class TypeName : public OSXSDDateTimeClass { ... } ;