1 | <HTML><HEAD><SCRIPT language="JavaScript" src="../resources/script.js" type="text/javascript"></SCRIPT><TITLE>XMLDateTime.hpp Source File</TITLE><link href="XercesApi.css" rel="stylesheet" type="text/css"></HEAD><BODY alink="#ff0000" bgcolor="#ffffff" leftmargin="4" link="#0000ff" marginheight="4" marginwidth="4" text="#000000" topmargin="4" vlink="#0000aa"><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" height="60" rowspan="3" valign="top" width="135"><IMG border="0" height="60" hspace="0" src="../resources/logo.gif" vspace="0" width="135"></TD><TD align="left" colspan="4" height="5" valign="top" width="456"><IMG border="0" height="5" hspace="0" src="../resources/line.gif" vspace="0" width="456"></TD><TD align="left" height="60" rowspan="3" valign="top" width="29"><IMG border="0" height="60" hspace="0" src="../resources/right.gif" vspace="0" width="29"></TD></TR><TR><TD align="left" bgcolor="#0086b2" colspan="4" height="35" valign="top" width="456"><IMG alt="" border="0" height="35" hspace="0" src="../graphics/api-header.jpg" vspace="0" width="456"></TD></TR><TR><TD align="left" height="20" valign="top" width="168"><IMG border="0" height="20" hspace="0" src="../resources/bottom.gif" vspace="0" width="168"></TD><TD align="left" height="20" valign="top" width="96"><A href="http://xml.apache.org/" onMouseOut="rolloverOff('xml');" onMouseOver="rolloverOn('xml');" target="new"><IMG alt="http://xml.apache.org/" border="0" height="20" hspace="0" name="xml" onLoad="rolloverLoad('xml','../resources/button-xml-hi.gif','../resources/button-xml-lo.gif');" src="../resources/button-xml-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.apache.org/" onMouseOut="rolloverOff('asf');" onMouseOver="rolloverOn('asf');" target="new"><IMG alt="http://www.apache.org/" border="0" height="20" hspace="0" name="asf" onLoad="rolloverLoad('asf','../resources/button-asf-hi.gif','../resources/button-asf-lo.gif');" src="../resources/button-asf-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.w3.org/" onMouseOut="rolloverOff('w3c');" onMouseOver="rolloverOn('w3c');" target="new"><IMG alt="http://www.w3.org/" border="0" height="20" hspace="0" name="w3c" onLoad="rolloverLoad('w3c','../resources/button-w3c-hi.gif','../resources/button-w3c-lo.gif');" src="../resources/button-w3c-lo.gif" vspace="0" width="96"></A></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" valign="top" width="120"><IMG border="0" height="14" hspace="0" src="../resources/join.gif" vspace="0" width="120"><BR>
|
---|
2 | <A href="../../index.html" onMouseOut="rolloverOff('side-ext-2');" onMouseOver="rolloverOn('side-ext-2');"><IMG alt="Home" border="0" height="12" hspace="0" name="side-ext-2" onLoad="rolloverLoad('side-ext-2','../graphics/ext-2-label-2.jpg','../graphics/ext-2-label-3.jpg');" src="../graphics/ext-2-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
3 |
|
---|
4 | <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
|
---|
5 |
|
---|
6 | <A href="../index.html" onMouseOut="rolloverOff('side-index');" onMouseOver="rolloverOn('side-index');"><IMG alt="Readme" border="0" height="12" hspace="0" name="side-index" onLoad="rolloverLoad('side-index','../graphics/index-label-2.jpg','../graphics/index-label-3.jpg');" src="../graphics/index-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
7 | <A href="../releases.html" onMouseOut="rolloverOff('side-releases');" onMouseOver="rolloverOn('side-releases');"><IMG alt="Release Info" border="0" height="12" hspace="0" name="side-releases" onLoad="rolloverLoad('side-releases','../graphics/releases-label-2.jpg','../graphics/releases-label-3.jpg');" src="../graphics/releases-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
8 | <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
|
---|
9 | <A href="../install.html" onMouseOut="rolloverOff('side-install');" onMouseOver="rolloverOn('side-install');"><IMG alt="Installation" border="0" height="12" hspace="0" name="side-install" onLoad="rolloverLoad('side-install','../graphics/install-label-2.jpg','../graphics/install-label-3.jpg');" src="../graphics/install-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
10 | <A href="http://xml.apache.org/dist/xerces-c/" onMouseOut="rolloverOff('side-ext-18');" onMouseOver="rolloverOn('side-ext-18');"><IMG alt="Download" border="0" height="12" hspace="0" name="side-ext-18" onLoad="rolloverLoad('side-ext-18','../graphics/ext-18-label-2.jpg','../graphics/ext-18-label-3.jpg');" src="../graphics/ext-18-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
11 | <A href="../build.html" onMouseOut="rolloverOff('side-build');" onMouseOver="rolloverOn('side-build');"><IMG alt="Build" border="0" height="12" hspace="0" name="side-build" onLoad="rolloverLoad('side-build','../graphics/build-label-2.jpg','../graphics/build-label-3.jpg');" src="../graphics/build-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
12 |
|
---|
13 | <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
|
---|
14 | <A href="../faqs.html" onMouseOut="rolloverOff('side-faqs');" onMouseOver="rolloverOn('side-faqs');"><IMG alt="FAQs" border="0" height="12" hspace="0" name="side-faqs" onLoad="rolloverLoad('side-faqs','../graphics/faqs-label-2.jpg','../graphics/faqs-label-3.jpg');" src="../graphics/faqs-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
15 | <A href="../samples.html" onMouseOut="rolloverOff('side-samples');" onMouseOver="rolloverOn('side-samples');"><IMG alt="Samples" border="0" height="12" hspace="0" name="side-samples" onLoad="rolloverLoad('side-samples','../graphics/samples-label-2.jpg','../graphics/samples-label-3.jpg');" src="../graphics/samples-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
16 | <A href="../api.html" onMouseOut="rolloverOff('side-api');" onMouseOver="rolloverOn('side-api');"><IMG alt="API Docs" border="0" height="12" hspace="0" name="side-api" onLoad="rolloverLoad('side-api','../graphics/api-label-2.jpg','../graphics/api-label-3.jpg');" src="../graphics/api-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
17 |
|
---|
18 | <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
|
---|
19 | <A href="../ApacheDOMC++Binding.html" onMouseOut="rolloverOff('side-ext-68');" onMouseOver="rolloverOn('side-ext-68');"><IMG alt="DOM C++ Binding" border="0" height="12" hspace="0" name="side-ext-68" onLoad="rolloverLoad('side-ext-68','../graphics/ext-68-label-2.jpg','../graphics/ext-68-label-3.jpg');" src="../graphics/ext-68-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
20 |
|
---|
21 | <A href="../program.html" onMouseOut="rolloverOff('side-program');" onMouseOver="rolloverOn('side-program');"><IMG alt="Programming" border="0" height="12" hspace="0" name="side-program" onLoad="rolloverLoad('side-program','../graphics/program-label-2.jpg','../graphics/program-label-3.jpg');" src="../graphics/program-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
22 | <A href="../migrate.html" onMouseOut="rolloverOff('side-migrate');" onMouseOver="rolloverOn('side-migrate');"><IMG alt="Migration Guide" border="0" height="12" hspace="0" name="side-migrate" onLoad="rolloverLoad('side-migrate','../graphics/migrate-label-2.jpg','../graphics/migrate-label-3.jpg');" src="../graphics/migrate-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
23 |
|
---|
24 | <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
|
---|
25 |
|
---|
26 | <A href="../feedback.html" onMouseOut="rolloverOff('side-feedback');" onMouseOver="rolloverOn('side-feedback');"><IMG alt="Feedback" border="0" height="12" hspace="0" name="side-feedback" onLoad="rolloverLoad('side-feedback','../graphics/feedback-label-2.jpg','../graphics/feedback-label-3.jpg');" src="../graphics/feedback-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
27 | <A href="../bug-report.html" onMouseOut="rolloverOff('side-bug-report');" onMouseOver="rolloverOn('side-bug-report');"><IMG alt="Bug-Reporting" border="0" height="12" hspace="0" name="side-bug-report" onLoad="rolloverLoad('side-bug-report','../graphics/bug-report-label-2.jpg','../graphics/bug-report-label-3.jpg');" src="../graphics/bug-report-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
28 | <A href="../pdf.html" onMouseOut="rolloverOff('side-pdf');" onMouseOver="rolloverOn('side-pdf');"><IMG alt="PDF Document" border="0" height="12" hspace="0" name="side-pdf" onLoad="rolloverLoad('side-pdf','../graphics/pdf-label-2.jpg','../graphics/pdf-label-3.jpg');" src="../graphics/pdf-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
29 |
|
---|
30 | <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
|
---|
31 |
|
---|
32 | <A href="http://xml.apache.org/websrc/cvsweb.cgi/xml-xerces/c/" onMouseOut="rolloverOff('side-ext-100');" onMouseOver="rolloverOn('side-ext-100');"><IMG alt="CVS Repository" border="0" height="12" hspace="0" name="side-ext-100" onLoad="rolloverLoad('side-ext-100','../graphics/ext-100-label-2.jpg','../graphics/ext-100-label-3.jpg');" src="../graphics/ext-100-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
33 |
|
---|
34 | <A href="http://marc.theaimsgroup.com/?l=xerces-c-dev" onMouseOut="rolloverOff('side-ext-102');" onMouseOver="rolloverOn('side-ext-102');"><IMG alt="Mail Archive" border="0" height="12" hspace="0" name="side-ext-102" onLoad="rolloverLoad('side-ext-102','../graphics/ext-102-label-2.jpg','../graphics/ext-102-label-3.jpg');" src="../graphics/ext-102-label-3.jpg" vspace="0" width="120"></A><BR>
|
---|
35 |
|
---|
36 |
|
---|
37 | <IMG border="0" height="14" hspace="0" src="../resources/close.gif" vspace="0" width="120"><BR></TD><TD align="left" valign="top" width="500"><TABLE border="0" cellpadding="3" cellspacing="0"><TR><TD>
|
---|
38 | <TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#FFFFFF" colspan="2" width="494"><TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#039acc" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#039acc" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#039acc" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" width="492"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="2" hspace="0" src="../resources/void.gif" vspace="0" width="2"><B>API Docs for SAX and DOM</B></FONT></TD><TD bgcolor="#017299" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#017299" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#017299" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></TD></TR><TR><TD width="10"> </TD><TD width="484"><FONT color="#000000" face="arial,helvetica,sanserif">
|
---|
39 |
|
---|
40 | <P>
|
---|
41 | <!-- Generated by Doxygen 1.2.14 -->
|
---|
42 | <center>
|
---|
43 | <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
---|
44 | <hr><h1>XMLDateTime.hpp</h1><a href="XMLDateTime_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>
|
---|
45 | 00002 <font class="comment"> * Copyright 2001,2004 The Apache Software Foundation.</font>
|
---|
46 | 00003 <font class="comment"> * </font>
|
---|
47 | 00004 <font class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</font>
|
---|
48 | 00005 <font class="comment"> * you may not use this file except in compliance with the License.</font>
|
---|
49 | 00006 <font class="comment"> * You may obtain a copy of the License at</font>
|
---|
50 | 00007 <font class="comment"> * </font>
|
---|
51 | 00008 <font class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</font>
|
---|
52 | 00009 <font class="comment"> * </font>
|
---|
53 | 00010 <font class="comment"> * Unless required by applicable law or agreed to in writing, software</font>
|
---|
54 | 00011 <font class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</font>
|
---|
55 | 00012 <font class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</font>
|
---|
56 | 00013 <font class="comment"> * See the License for the specific language governing permissions and</font>
|
---|
57 | 00014 <font class="comment"> * limitations under the License.</font>
|
---|
58 | 00015 <font class="comment"> */</font>
|
---|
59 | 00016
|
---|
60 | 00017 <font class="comment">/*</font>
|
---|
61 | 00018 <font class="comment"> * $Id: XMLDateTime.hpp,v 1.20 2004/09/08 13:56:24 peiyongz Exp $</font>
|
---|
62 | 00019 <font class="comment"> * $Log: XMLDateTime.hpp,v $</font>
|
---|
63 | 00020 <font class="comment"> * Revision 1.20 2004/09/08 13:56:24 peiyongz</font>
|
---|
64 | 00021 <font class="comment"> * Apache License Version 2.0</font>
|
---|
65 | 00022 <font class="comment"> *</font>
|
---|
66 | 00023 <font class="comment"> * Revision 1.19 2004/08/31 20:50:50 peiyongz</font>
|
---|
67 | 00024 <font class="comment"> * Parse/keep milisecond as double to retain precision.</font>
|
---|
68 | 00025 <font class="comment"> *</font>
|
---|
69 | 00026 <font class="comment"> * Revision 1.18 2004/08/11 16:48:55 peiyongz</font>
|
---|
70 | 00027 <font class="comment"> * Allow XSValue access</font>
|
---|
71 | 00028 <font class="comment"> *</font>
|
---|
72 | 00029 <font class="comment"> * Revision 1.17 2004/01/29 11:48:47 cargilld</font>
|
---|
73 | 00030 <font class="comment"> * Code cleanup changes to get rid of various compiler diagnostic messages.</font>
|
---|
74 | 00031 <font class="comment"> *</font>
|
---|
75 | 00032 <font class="comment"> * Revision 1.16 2004/01/13 19:50:56 peiyongz</font>
|
---|
76 | 00033 <font class="comment"> * remove parseContent()</font>
|
---|
77 | 00034 <font class="comment"> *</font>
|
---|
78 | 00035 <font class="comment"> * Revision 1.14 2003/12/31 02:34:11 neilg</font>
|
---|
79 | 00036 <font class="comment"> * enable production of canonical representations for dates with negative years, or years >9999</font>
|
---|
80 | 00037 <font class="comment"> *</font>
|
---|
81 | 00038 <font class="comment"> * Revision 1.13 2003/12/17 20:00:49 cargilld</font>
|
---|
82 | 00039 <font class="comment"> * Update for memory management so that the static memory manager (one</font>
|
---|
83 | 00040 <font class="comment"> * used to call Initialize) is only for static data.</font>
|
---|
84 | 00041 <font class="comment"> *</font>
|
---|
85 | 00042 <font class="comment"> * Revision 1.12 2003/12/17 00:18:35 cargilld</font>
|
---|
86 | 00043 <font class="comment"> * Update to memory management so that the static memory manager (one used to call Initialize) is only for static data.</font>
|
---|
87 | 00044 <font class="comment"> *</font>
|
---|
88 | 00045 <font class="comment"> * Revision 1.11 2003/12/11 21:38:12 peiyongz</font>
|
---|
89 | 00046 <font class="comment"> * support for Canonical Representation for Datatype</font>
|
---|
90 | 00047 <font class="comment"> *</font>
|
---|
91 | 00048 <font class="comment"> * Revision 1.10 2003/09/23 18:16:07 peiyongz</font>
|
---|
92 | 00049 <font class="comment"> * Inplementation for Serialization/Deserialization</font>
|
---|
93 | 00050 <font class="comment"> *</font>
|
---|
94 | 00051 <font class="comment"> * Revision 1.9 2003/08/14 02:57:27 knoaman</font>
|
---|
95 | 00052 <font class="comment"> * Code refactoring to improve performance of validation.</font>
|
---|
96 | 00053 <font class="comment"> *</font>
|
---|
97 | 00054 <font class="comment"> * Revision 1.8 2003/05/18 14:02:05 knoaman</font>
|
---|
98 | 00055 <font class="comment"> * Memory manager implementation: pass per instance manager.</font>
|
---|
99 | 00056 <font class="comment"> *</font>
|
---|
100 | 00057 <font class="comment"> * Revision 1.7 2003/05/15 19:07:46 knoaman</font>
|
---|
101 | 00058 <font class="comment"> * Partial implementation of the configurable memory manager.</font>
|
---|
102 | 00059 <font class="comment"> *</font>
|
---|
103 | 00060 <font class="comment"> * Revision 1.6 2003/05/09 15:13:46 peiyongz</font>
|
---|
104 | 00061 <font class="comment"> * Deprecated toString() in XMLNumber family</font>
|
---|
105 | 00062 <font class="comment"> *</font>
|
---|
106 | 00063 <font class="comment"> * Revision 1.5 2003/03/10 20:55:58 peiyongz</font>
|
---|
107 | 00064 <font class="comment"> * Schema Errata E2-40 double/float</font>
|
---|
108 | 00065 <font class="comment"> *</font>
|
---|
109 | 00066 <font class="comment"> * Revision 1.4 2003/02/02 23:54:43 peiyongz</font>
|
---|
110 | 00067 <font class="comment"> * getFormattedString() added to return original and converted value.</font>
|
---|
111 | 00068 <font class="comment"> *</font>
|
---|
112 | 00069 <font class="comment"> * Revision 1.3 2003/01/30 21:55:22 tng</font>
|
---|
113 | 00070 <font class="comment"> * Performance: create getRawData which is similar to toString but return the internal data directly, user is not required to delete the returned memory.</font>
|
---|
114 | 00071 <font class="comment"> *</font>
|
---|
115 | 00072 <font class="comment"> * Revision 1.2 2002/11/04 15:22:05 tng</font>
|
---|
116 | 00073 <font class="comment"> * C++ Namespace Support.</font>
|
---|
117 | 00074 <font class="comment"> *</font>
|
---|
118 | 00075 <font class="comment"> * Revision 1.1.1.1 2002/02/01 22:22:14 peiyongz</font>
|
---|
119 | 00076 <font class="comment"> * sane_include</font>
|
---|
120 | 00077 <font class="comment"> *</font>
|
---|
121 | 00078 <font class="comment"> * Revision 1.4 2001/11/22 20:23:00 peiyongz</font>
|
---|
122 | 00079 <font class="comment"> * _declspec(dllimport) and inline warning C4273</font>
|
---|
123 | 00080 <font class="comment"> *</font>
|
---|
124 | 00081 <font class="comment"> * Revision 1.3 2001/11/12 20:36:54 peiyongz</font>
|
---|
125 | 00082 <font class="comment"> * SchemaDateTimeException defined</font>
|
---|
126 | 00083 <font class="comment"> *</font>
|
---|
127 | 00084 <font class="comment"> * Revision 1.2 2001/11/09 20:41:45 peiyongz</font>
|
---|
128 | 00085 <font class="comment"> * Fix: compilation error on Solaris and AIX.</font>
|
---|
129 | 00086 <font class="comment"> *</font>
|
---|
130 | 00087 <font class="comment"> * Revision 1.1 2001/11/07 19:16:03 peiyongz</font>
|
---|
131 | 00088 <font class="comment"> * DateTime Port</font>
|
---|
132 | 00089 <font class="comment"> *</font>
|
---|
133 | 00090 <font class="comment"> */</font>
|
---|
134 | 00091
|
---|
135 | 00092 <font class="preprocessor">#ifndef XML_DATETIME_HPP</font>
|
---|
136 | 00093 <font class="preprocessor"></font><font class="preprocessor">#define XML_DATETIME_HPP</font>
|
---|
137 | 00094 <font class="preprocessor"></font>
|
---|
138 | 00095 <font class="preprocessor">#include <<a class="code" href="XMLNumber_8hpp.html">xercesc/util/XMLNumber.hpp</a>></font>
|
---|
139 | 00096 <font class="preprocessor">#include <<a class="code" href="PlatformUtils_8hpp.html">xercesc/util/PlatformUtils.hpp</a>></font>
|
---|
140 | 00097 <font class="preprocessor">#include <<a class="code" href="XMLString_8hpp.html">xercesc/util/XMLString.hpp</a>></font>
|
---|
141 | 00098 <font class="preprocessor">#include <<a class="code" href="XMLUniDefs_8hpp.html">xercesc/util/XMLUniDefs.hpp</a>></font>
|
---|
142 | 00099 <font class="preprocessor">#include <<a class="code" href="SchemaDateTimeException_8hpp.html">xercesc/util/SchemaDateTimeException.hpp</a>></font>
|
---|
143 | 00100
|
---|
144 | 00101 <a class="code" href="XercesDefs_8hpp.html#a2">XERCES_CPP_NAMESPACE_BEGIN</a>
|
---|
145 | 00102
|
---|
146 | <a name="l00103"></a><a class="code" href="XMLDateTime_8hpp.html#a0">00103</a> <font class="keyword">class </font><a class="code" href="classXSValue.html">XSValue</a>;
|
---|
147 | 00104
|
---|
148 | <a name="l00105"></a><a class="code" href="classXMLDateTime.html">00105</a> <font class="keyword">class </font><a class="code" href="XercesDefs_8hpp.html#a8"></a> <a class="code" href="classXMLDateTime.html">XMLDateTime</a> : <font class="keyword">public</font> <a class="code" href="classXMLNumber.html">XMLNumber</a>
|
---|
149 | 00106 {
|
---|
150 | 00107 <font class="keyword">public</font>:
|
---|
151 | 00108
|
---|
152 | <a name="l00109"></a><a class="code" href="classXMLDateTime.html#s13">00109</a> <font class="keyword">enum</font> valueIndex
|
---|
153 | 00110 {
|
---|
154 | 00111 CentYear = 0,
|
---|
155 | 00112 Month ,
|
---|
156 | 00113 Day ,
|
---|
157 | 00114 Hour ,
|
---|
158 | 00115 Minute ,
|
---|
159 | 00116 Second ,
|
---|
160 | 00117 MiliSecond , <font class="comment">//not to be used directly</font>
|
---|
161 | 00118 utc ,
|
---|
162 | 00119 TOTAL_SIZE
|
---|
163 | 00120 };
|
---|
164 | 00121
|
---|
165 | <a name="l00122"></a><a class="code" href="classXMLDateTime.html#s14">00122</a> <font class="keyword">enum</font> utcType
|
---|
166 | 00123 {
|
---|
167 | 00124 UTC_UNKNOWN = 0,
|
---|
168 | 00125 UTC_STD , <font class="comment">// set in parse() or normalize()</font>
|
---|
169 | 00126 UTC_POS , <font class="comment">// set in parse()</font>
|
---|
170 | 00127 UTC_NEG <font class="comment">// set in parse()</font>
|
---|
171 | 00128 };
|
---|
172 | 00129
|
---|
173 | 00130 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
174 | 00131 <font class="comment">// ctors and dtor</font>
|
---|
175 | 00132 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
176 | 00133
|
---|
177 | 00134 <a class="code" href="classXMLDateTime.html">XMLDateTime</a>(<a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
|
---|
178 | 00135 <a class="code" href="classXMLDateTime.html">XMLDateTime</a>(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font>,
|
---|
179 | 00136 <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
|
---|
180 | 00137 ~<a class="code" href="classXMLDateTime.html">XMLDateTime</a>();
|
---|
181 | 00138
|
---|
182 | 00139 <font class="keyword">inline</font> <font class="keywordtype">void</font> setBuffer(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font>);
|
---|
183 | 00140
|
---|
184 | 00141 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
185 | 00142 <font class="comment">// Copy ctor and Assignment operators</font>
|
---|
186 | 00143 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
187 | 00144
|
---|
188 | 00145 <a class="code" href="classXMLDateTime.html">XMLDateTime</a>(<font class="keyword">const</font> <a class="code" href="classXMLDateTime.html">XMLDateTime</a>&);
|
---|
189 | 00146
|
---|
190 | 00147 <a class="code" href="classXMLDateTime.html">XMLDateTime</a>& operator=(<font class="keyword">const</font> <a class="code" href="classXMLDateTime.html">XMLDateTime</a>&);
|
---|
191 | 00148
|
---|
192 | 00149 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
193 | 00150 <font class="comment">// Implementation of Abstract Interface</font>
|
---|
194 | 00151 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
195 | 00152
|
---|
196 | 00158 <font class="keyword">virtual</font> XMLCh* <a class="code" href="classXMLNumber.html#a1">toString</a>() <font class="keyword">const</font>;
|
---|
197 | 00159
|
---|
198 | 00160 <font class="keyword">virtual</font> XMLCh* <a class="code" href="classXMLNumber.html#a2">getRawData</a>() <font class="keyword">const</font>;
|
---|
199 | 00161
|
---|
200 | 00162 <font class="keyword">virtual</font> <font class="keyword">const</font> XMLCh* <a class="code" href="classXMLNumber.html#a3">getFormattedString</a>() <font class="keyword">const</font>;
|
---|
201 | 00163
|
---|
202 | 00164 <font class="keyword">virtual</font> <font class="keywordtype">int</font> <a class="code" href="classXMLNumber.html#a4">getSign</a>() <font class="keyword">const</font>;
|
---|
203 | 00165
|
---|
204 | 00166 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
205 | 00167 <font class="comment">// Canonical Representation</font>
|
---|
206 | 00168 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
207 | 00169
|
---|
208 | 00170 XMLCh* getDateTimeCanonicalRepresentation(<a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> memMgr) <font class="keyword">const</font>;
|
---|
209 | 00171
|
---|
210 | 00172 XMLCh* getTimeCanonicalRepresentation(<a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> memMgr) <font class="keyword">const</font>;
|
---|
211 | 00173
|
---|
212 | 00174 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
213 | 00175 <font class="comment">// parsers</font>
|
---|
214 | 00176 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
215 | 00177
|
---|
216 | 00178 <font class="keywordtype">void</font> parseDateTime(); <font class="comment">//DateTime</font>
|
---|
217 | 00179
|
---|
218 | 00180 <font class="keywordtype">void</font> parseDate(); <font class="comment">//Date</font>
|
---|
219 | 00181
|
---|
220 | 00182 <font class="keywordtype">void</font> parseTime(); <font class="comment">//Time</font>
|
---|
221 | 00183
|
---|
222 | 00184 <font class="keywordtype">void</font> parseDay(); <font class="comment">//gDay</font>
|
---|
223 | 00185
|
---|
224 | 00186 <font class="keywordtype">void</font> parseMonth(); <font class="comment">//gMonth</font>
|
---|
225 | 00187
|
---|
226 | 00188 <font class="keywordtype">void</font> parseYear(); <font class="comment">//gYear</font>
|
---|
227 | 00189
|
---|
228 | 00190 <font class="keywordtype">void</font> parseMonthDay(); <font class="comment">//gMonthDay</font>
|
---|
229 | 00191
|
---|
230 | 00192 <font class="keywordtype">void</font> parseYearMonth(); <font class="comment">//gYearMonth</font>
|
---|
231 | 00193
|
---|
232 | 00194 <font class="keywordtype">void</font> parseDuration(); <font class="comment">//duration</font>
|
---|
233 | 00195
|
---|
234 | 00196 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
235 | 00197 <font class="comment">// Comparison</font>
|
---|
236 | 00198 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
237 | 00199 <font class="keyword">static</font> <font class="keywordtype">int</font> compare(<font class="keyword">const</font> <a class="code" href="classXMLDateTime.html">XMLDateTime</a>* <font class="keyword">const</font>
|
---|
238 | 00200 , <font class="keyword">const</font> <a class="code" href="classXMLDateTime.html">XMLDateTime</a>* <font class="keyword">const</font>);
|
---|
239 | 00201
|
---|
240 | 00202 <font class="keyword">static</font> <font class="keywordtype">int</font> compare(<font class="keyword">const</font> <a class="code" href="classXMLDateTime.html">XMLDateTime</a>* <font class="keyword">const</font>
|
---|
241 | 00203 , <font class="keyword">const</font> <a class="code" href="classXMLDateTime.html">XMLDateTime</a>* <font class="keyword">const</font>
|
---|
242 | 00204 , <font class="keywordtype">bool</font> );
|
---|
243 | 00205
|
---|
244 | 00206 <font class="keyword">static</font> <font class="keywordtype">int</font> compareOrder(<font class="keyword">const</font> <a class="code" href="classXMLDateTime.html">XMLDateTime</a>* <font class="keyword">const</font>
|
---|
245 | 00207 , <font class="keyword">const</font> <a class="code" href="classXMLDateTime.html">XMLDateTime</a>* <font class="keyword">const</font>);
|
---|
246 | 00208
|
---|
247 | 00209 <font class="comment">/***</font>
|
---|
248 | 00210 <font class="comment"> * Support for Serialization/De-serialization</font>
|
---|
249 | 00211 <font class="comment"> ***/</font>
|
---|
250 | 00212 DECL_XSERIALIZABLE(<a class="code" href="classXMLDateTime.html">XMLDateTime</a>)
|
---|
251 | 00213
|
---|
252 | 00214 <font class="keyword">private</font>:
|
---|
253 | 00215
|
---|
254 | 00216 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
255 | 00217 <font class="comment">// Constant data</font>
|
---|
256 | 00218 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
257 | 00219 <font class="comment">//</font>
|
---|
258 | 00220
|
---|
259 | 00221 <font class="keyword">enum</font> timezoneIndex
|
---|
260 | 00222 {
|
---|
261 | 00223 hh = 0,
|
---|
262 | 00224 mm ,
|
---|
263 | 00225 TIMEZONE_ARRAYSIZE
|
---|
264 | 00226 };
|
---|
265 | 00227
|
---|
266 | 00228 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
267 | 00229 <font class="comment">// Comparison</font>
|
---|
268 | 00230 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
269 | 00231 <font class="keyword">static</font> <font class="keywordtype">int</font> compareResult(<font class="keywordtype">int</font>
|
---|
270 | 00232 , <font class="keywordtype">int</font>
|
---|
271 | 00233 , <font class="keywordtype">bool</font>);
|
---|
272 | 00234
|
---|
273 | 00235 <font class="keyword">static</font> <font class="keywordtype">void</font> addDuration(<a class="code" href="classXMLDateTime.html">XMLDateTime</a>* pDuration
|
---|
274 | 00236 , <font class="keyword">const</font> <a class="code" href="classXMLDateTime.html">XMLDateTime</a>* <font class="keyword">const</font> pBaseDate
|
---|
275 | 00237 , <font class="keywordtype">int</font> index);
|
---|
276 | 00238
|
---|
277 | 00239
|
---|
278 | 00240 <font class="keyword">static</font> <font class="keywordtype">int</font> compareResult(<font class="keyword">const</font> <a class="code" href="classXMLDateTime.html">XMLDateTime</a>* <font class="keyword">const</font>
|
---|
279 | 00241 , <font class="keyword">const</font> <a class="code" href="classXMLDateTime.html">XMLDateTime</a>* <font class="keyword">const</font>
|
---|
280 | 00242 , <font class="keywordtype">bool</font>
|
---|
281 | 00243 , <font class="keywordtype">int</font>);
|
---|
282 | 00244
|
---|
283 | 00245 <font class="keyword">static</font> <font class="keyword">inline</font> <font class="keywordtype">int</font> getRetVal(<font class="keywordtype">int</font>, <font class="keywordtype">int</font>);
|
---|
284 | 00246
|
---|
285 | 00247 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
286 | 00248 <font class="comment">// helper</font>
|
---|
287 | 00249 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
288 | 00250
|
---|
289 | 00251 <font class="keyword">inline</font> <font class="keywordtype">void</font> reset();
|
---|
290 | 00252
|
---|
291 | 00253 <font class="keyword">inline</font> <font class="keywordtype">void</font> assertBuffer() <font class="keyword">const</font>;
|
---|
292 | 00254
|
---|
293 | 00255 <font class="keyword">inline</font> <font class="keywordtype">void</font> copy(<font class="keyword">const</font> <a class="code" href="classXMLDateTime.html">XMLDateTime</a>&);
|
---|
294 | 00256
|
---|
295 | 00257 <font class="comment">// allow multiple parsing</font>
|
---|
296 | 00258 <font class="keyword">inline</font> <font class="keywordtype">void</font> initParser();
|
---|
297 | 00259
|
---|
298 | 00260 <font class="keyword">inline</font> <font class="keywordtype">bool</font> isNormalized() <font class="keyword">const</font>;
|
---|
299 | 00261
|
---|
300 | 00262 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
301 | 00263 <font class="comment">// scaners</font>
|
---|
302 | 00264 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
303 | 00265
|
---|
304 | 00266 <font class="keywordtype">void</font> getDate();
|
---|
305 | 00267
|
---|
306 | 00268 <font class="keywordtype">void</font> getTime();
|
---|
307 | 00269
|
---|
308 | 00270 <font class="keywordtype">void</font> getYearMonth();
|
---|
309 | 00271
|
---|
310 | 00272 <font class="keywordtype">void</font> getTimeZone(<font class="keyword">const</font> <font class="keywordtype">int</font>);
|
---|
311 | 00273
|
---|
312 | 00274 <font class="keywordtype">void</font> parseTimeZone();
|
---|
313 | 00275
|
---|
314 | 00276 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
315 | 00277 <font class="comment">// locator and converter</font>
|
---|
316 | 00278 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
317 | 00279
|
---|
318 | 00280 <font class="keywordtype">int</font> findUTCSign(<font class="keyword">const</font> <font class="keywordtype">int</font> start);
|
---|
319 | 00281
|
---|
320 | 00282 <font class="keywordtype">int</font> indexOf(<font class="keyword">const</font> <font class="keywordtype">int</font> start
|
---|
321 | 00283 , <font class="keyword">const</font> <font class="keywordtype">int</font> end
|
---|
322 | 00284 , <font class="keyword">const</font> XMLCh ch) <font class="keyword">const</font>;
|
---|
323 | 00285
|
---|
324 | 00286 <font class="keywordtype">int</font> parseInt(<font class="keyword">const</font> <font class="keywordtype">int</font> start
|
---|
325 | 00287 , <font class="keyword">const</font> <font class="keywordtype">int</font> end) <font class="keyword">const</font>;
|
---|
326 | 00288
|
---|
327 | 00289 <font class="keywordtype">int</font> parseIntYear(<font class="keyword">const</font> <font class="keywordtype">int</font> end) <font class="keyword">const</font>;
|
---|
328 | 00290
|
---|
329 | 00291 <font class="keywordtype">double</font> parseMiliSecond(<font class="keyword">const</font> <font class="keywordtype">int</font> start
|
---|
330 | 00292 , <font class="keyword">const</font> <font class="keywordtype">int</font> end) <font class="keyword">const</font>;
|
---|
331 | 00293
|
---|
332 | 00294 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
333 | 00295 <font class="comment">// validator and normalizer</font>
|
---|
334 | 00296 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
335 | 00297
|
---|
336 | 00298 <font class="keywordtype">void</font> validateDateTime() <font class="keyword">const</font>;
|
---|
337 | 00299
|
---|
338 | 00300 <font class="keywordtype">void</font> normalize();
|
---|
339 | 00301
|
---|
340 | 00302 <font class="keywordtype">void</font> fillString(XMLCh*& ptr, valueIndex ind, <font class="keywordtype">int</font> expLen) <font class="keyword">const</font>;
|
---|
341 | 00303
|
---|
342 | 00304 <font class="keywordtype">int</font> fillYearString(XMLCh*& ptr, valueIndex ind) <font class="keyword">const</font>;
|
---|
343 | 00305
|
---|
344 | 00306 <font class="keywordtype">void</font> searchMiliSeconds(XMLCh*& miliStartPtr, XMLCh*& miliEndPtr) <font class="keyword">const</font>;
|
---|
345 | 00307
|
---|
346 | 00308 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
347 | 00309 <font class="comment">// Unimplemented operator ==</font>
|
---|
348 | 00310 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
349 | 00311 <font class="keywordtype">bool</font> operator==(<font class="keyword">const</font> <a class="code" href="classXMLDateTime.html">XMLDateTime</a>& toCompare) <font class="keyword">const</font>;
|
---|
350 | 00312
|
---|
351 | 00313
|
---|
352 | 00314 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
353 | 00315 <font class="comment">// Private data members</font>
|
---|
354 | 00316 <font class="comment">//</font>
|
---|
355 | 00317 <font class="comment">// fValue[]</font>
|
---|
356 | 00318 <font class="comment">// object representation of date time.</font>
|
---|
357 | 00319 <font class="comment">//</font>
|
---|
358 | 00320 <font class="comment">// fTimeZone[]</font>
|
---|
359 | 00321 <font class="comment">// temporary storage for normalization</font>
|
---|
360 | 00322 <font class="comment">//</font>
|
---|
361 | 00323 <font class="comment">// fStart, fEnd</font>
|
---|
362 | 00324 <font class="comment">// pointers to the portion of fBuffer being parsed</font>
|
---|
363 | 00325 <font class="comment">//</font>
|
---|
364 | 00326 <font class="comment">// fBuffer</font>
|
---|
365 | 00327 <font class="comment">// raw data to be parsed, own it.</font>
|
---|
366 | 00328 <font class="comment">//</font>
|
---|
367 | 00329 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
368 | 00330
|
---|
369 | 00331 <font class="keywordtype">int</font> fValue[TOTAL_SIZE];
|
---|
370 | 00332 <font class="keywordtype">int</font> fTimeZone[TIMEZONE_ARRAYSIZE];
|
---|
371 | 00333 <font class="keywordtype">int</font> fStart;
|
---|
372 | 00334 <font class="keywordtype">int</font> fEnd;
|
---|
373 | 00335 <font class="keywordtype">int</font> fBufferMaxLen;
|
---|
374 | 00336 XMLCh* fBuffer;
|
---|
375 | 00337
|
---|
376 | 00338 <font class="keywordtype">double</font> fMiliSecond;
|
---|
377 | 00339 <font class="keywordtype">bool</font> fHasTime;
|
---|
378 | 00340
|
---|
379 | 00341 <a class="code" href="classMemoryManager.html">MemoryManager</a>* fMemoryManager;
|
---|
380 | 00342
|
---|
381 | <a name="l00343"></a><a class="code" href="classXMLDateTime.html#l0">00343</a> <font class="keyword">friend</font> <font class="keyword">class </font><a class="code" href="classXSValue.html">XSValue</a>;
|
---|
382 | 00344 };
|
---|
383 | 00345
|
---|
384 | <a name="l00346"></a><a class="code" href="classXMLDateTime.html#a3">00346</a> <font class="keyword">inline</font> <font class="keywordtype">void</font> <a class="code" href="classXMLDateTime.html#a3">XMLDateTime::setBuffer</a>(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> aString)
|
---|
385 | 00347 {
|
---|
386 | 00348 reset();
|
---|
387 | 00349
|
---|
388 | 00350 fEnd = <a class="code" href="classXMLString.html#z519_8">XMLString::stringLen</a>(aString);
|
---|
389 | 00351 <font class="keywordflow">if</font> (fEnd > 0) {
|
---|
390 | 00352
|
---|
391 | 00353 <font class="keywordflow">if</font> (fEnd > fBufferMaxLen)
|
---|
392 | 00354 {
|
---|
393 | 00355 fMemoryManager-><a class="code" href="classMemoryManager.html#z221_1">deallocate</a>(fBuffer);
|
---|
394 | 00356 fBufferMaxLen = fEnd + 8;
|
---|
395 | 00357 fBuffer = (XMLCh*) fMemoryManager-><a class="code" href="classMemoryManager.html#z221_0">allocate</a>((fBufferMaxLen+1) * <font class="keyword">sizeof</font>(XMLCh));
|
---|
396 | 00358 }
|
---|
397 | 00359
|
---|
398 | 00360 memcpy(fBuffer, aString, (fEnd+1) * <font class="keyword">sizeof</font>(XMLCh));
|
---|
399 | 00361 }
|
---|
400 | 00362 }
|
---|
401 | 00363
|
---|
402 | 00364 <font class="keyword">inline</font> <font class="keywordtype">void</font> XMLDateTime::reset()
|
---|
403 | 00365 {
|
---|
404 | 00366 <font class="keywordflow">for</font> ( <font class="keywordtype">int</font> i=0; i < <a class="code" href="classXMLDateTime.html#s13s8">TOTAL_SIZE</a>; i++ )
|
---|
405 | 00367 fValue[i] = 0;
|
---|
406 | 00368
|
---|
407 | 00369 fMiliSecond = 0;
|
---|
408 | 00370 fHasTime = <font class="keyword">false</font>;
|
---|
409 | 00371 fTimeZone[hh] = fTimeZone[mm] = 0;
|
---|
410 | 00372 fStart = fEnd = 0;
|
---|
411 | 00373
|
---|
412 | 00374 <font class="keywordflow">if</font> (fBuffer)
|
---|
413 | 00375 *fBuffer = 0;
|
---|
414 | 00376 }
|
---|
415 | 00377
|
---|
416 | 00378 <font class="keyword">inline</font> <font class="keywordtype">void</font> XMLDateTime::copy(<font class="keyword">const</font> <a class="code" href="classXMLDateTime.html">XMLDateTime</a>& rhs)
|
---|
417 | 00379 {
|
---|
418 | 00380 <font class="keywordflow">for</font> ( <font class="keywordtype">int</font> i = 0; i < <a class="code" href="classXMLDateTime.html#s13s8">TOTAL_SIZE</a>; i++ )
|
---|
419 | 00381 fValue[i] = rhs.<a class="code" href="classXMLDateTime.html#o0">fValue</a>[i];
|
---|
420 | 00382
|
---|
421 | 00383 fMiliSecond = rhs.<a class="code" href="classXMLDateTime.html#o6">fMiliSecond</a>;
|
---|
422 | 00384 fHasTime = rhs.<a class="code" href="classXMLDateTime.html#o7">fHasTime</a>;
|
---|
423 | 00385 fTimeZone[hh] = rhs.<a class="code" href="classXMLDateTime.html#o1">fTimeZone</a>[hh];
|
---|
424 | 00386 fTimeZone[mm] = rhs.<a class="code" href="classXMLDateTime.html#o1">fTimeZone</a>[mm];
|
---|
425 | 00387 fStart = rhs.<a class="code" href="classXMLDateTime.html#o2">fStart</a>;
|
---|
426 | 00388 fEnd = rhs.<a class="code" href="classXMLDateTime.html#o3">fEnd</a>;
|
---|
427 | 00389
|
---|
428 | 00390 <font class="keywordflow">if</font> (fEnd > 0)
|
---|
429 | 00391 {
|
---|
430 | 00392 <font class="keywordflow">if</font> (fEnd > fBufferMaxLen)
|
---|
431 | 00393 {
|
---|
432 | 00394 fMemoryManager-><a class="code" href="classMemoryManager.html#z221_1">deallocate</a>(fBuffer);<font class="comment">//delete[] fBuffer;</font>
|
---|
433 | 00395 fBufferMaxLen = rhs.<a class="code" href="classXMLDateTime.html#o4">fBufferMaxLen</a>;
|
---|
434 | 00396 fBuffer = (XMLCh*) fMemoryManager-><a class="code" href="classMemoryManager.html#z221_0">allocate</a>((fBufferMaxLen+1) * <font class="keyword">sizeof</font>(XMLCh));
|
---|
435 | 00397 }
|
---|
436 | 00398
|
---|
437 | 00399 memcpy(fBuffer, rhs.<a class="code" href="classXMLDateTime.html#o5">fBuffer</a>, (fEnd+1) * <font class="keyword">sizeof</font>(XMLCh));
|
---|
438 | 00400 }
|
---|
439 | 00401 }
|
---|
440 | 00402
|
---|
441 | 00403 <font class="keyword">inline</font> <font class="keywordtype">void</font> XMLDateTime::assertBuffer()<font class="keyword"> const</font>
|
---|
442 | 00404 <font class="keyword"></font>{
|
---|
443 | 00405 <font class="keywordflow">if</font> ( ( !fBuffer ) ||
|
---|
444 | 00406 ( fBuffer[0] == <a class="code" href="XMLUniDefs_8hpp.html#a1">chNull</a> ) )
|
---|
445 | 00407 {
|
---|
446 | 00408 <a class="code" href="XMLException_8hpp.html#a7">ThrowXMLwithMemMgr</a>(SchemaDateTimeException
|
---|
447 | 00409 , XMLExcepts::DateTime_Assert_Buffer_Fail
|
---|
448 | 00410 , fMemoryManager);
|
---|
449 | 00411 }
|
---|
450 | 00412
|
---|
451 | 00413 }
|
---|
452 | 00414
|
---|
453 | 00415 <font class="keyword">inline</font> <font class="keywordtype">void</font> XMLDateTime::initParser()
|
---|
454 | 00416 {
|
---|
455 | 00417 assertBuffer();
|
---|
456 | 00418 fStart = 0; <font class="comment">// to ensure scan from the very first beginning</font>
|
---|
457 | 00419 <font class="comment">// in case the pointer is updated accidentally by someone else.</font>
|
---|
458 | 00420 }
|
---|
459 | 00421
|
---|
460 | 00422 <font class="keyword">inline</font> <font class="keywordtype">bool</font> XMLDateTime::isNormalized()<font class="keyword"> const</font>
|
---|
461 | 00423 <font class="keyword"></font>{
|
---|
462 | 00424 <font class="keywordflow">return</font> ( fValue[<a class="code" href="classXMLDateTime.html#s13s7">utc</a>] == <a class="code" href="classXMLDateTime.html#s14s10">UTC_STD</a> ? <font class="keyword">true</font> : <font class="keyword">false</font> );
|
---|
463 | 00425 }
|
---|
464 | 00426
|
---|
465 | 00427 <font class="keyword">inline</font> <font class="keywordtype">int</font> XMLDateTime::getRetVal(<font class="keywordtype">int</font> c1, <font class="keywordtype">int</font> c2)
|
---|
466 | 00428 {
|
---|
467 | 00429 <font class="keywordflow">if</font> ((c1 == <a class="code" href="classXMLNumber.html#s9s0">LESS_THAN</a> && c2 == <a class="code" href="classXMLNumber.html#s9s2">GREATER_THAN</a>) ||
|
---|
468 | 00430 (c1 == <a class="code" href="classXMLNumber.html#s9s2">GREATER_THAN</a> && c2 == <a class="code" href="classXMLNumber.html#s9s0">LESS_THAN</a>) )
|
---|
469 | 00431 {
|
---|
470 | 00432 <font class="keywordflow">return</font> <a class="code" href="classXMLNumber.html#s9s3">INDETERMINATE</a>;
|
---|
471 | 00433 }
|
---|
472 | 00434
|
---|
473 | 00435 <font class="keywordflow">return</font> ( c1 != <a class="code" href="classXMLNumber.html#s9s3">INDETERMINATE</a> ) ? c1 : c2;
|
---|
474 | 00436 }
|
---|
475 | 00437
|
---|
476 | 00438 <a class="code" href="XercesDefs_8hpp.html#a3">XERCES_CPP_NAMESPACE_END</a>
|
---|
477 | 00439
|
---|
478 | 00440 <font class="preprocessor">#endif</font>
|
---|
479 | </pre></div> </FONT></TD></TR></TABLE><BR>
|
---|
480 | </TD></TR></TABLE></TD></TR></TABLE><BR><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD bgcolor="#0086b2"><IMG height="1" src="images/dot.gif" width="1" alt=""></TD></TR><TR><TD align="center"><FONT color="#0086b2" size="-1"><I>
|
---|
481 | Copyright © 1994-2004 The Apache Software Foundation.
|
---|
482 | All Rights Reserved.
|
---|
483 | </I></FONT></TD></TR></TABLE></BODY></HTML>
|
---|