22#if !defined(XERCESC_INCLUDE_GUARD_XML_DATETIME_HPP)
23#define XERCESC_INCLUDE_GUARD_XML_DATETIME_HPP
74 inline void setBuffer(
const XMLCh*
const);
139 int getYear()
const {
return fValue[CentYear];}
169 static int compareResult(
int
183 static inline int getRetVal(
int,
int);
191 inline void assertBuffer()
const;
196 inline bool initParser();
198 inline bool isNormalized()
const;
212 void parseTimeZone();
222 ,
const XMLCh ch)
const;
227 int parseIntYear(
const XMLSize_t end)
const;
229 double parseMiliSecond(
const XMLSize_t start
236 void validateDateTime()
const;
242 int fillYearString(
XMLCh*& ptr,
int value)
const;
244 void searchMiliSeconds(
XMLCh*& miliStartPtr,
XMLCh*& miliEndPtr)
const;
249 bool operator==(
const XMLDateTime& toCompare)
const;
269 int fValue[TOTAL_SIZE];
270 int fTimeZone[TIMEZONE_ARRAYSIZE];
290 for (; fEnd > 0; fEnd--)
298 if (fEnd > fBufferMaxLen)
301 fBufferMaxLen = fEnd + 8;
305 memcpy(fBuffer, aString, (fEnd) *
sizeof(
XMLCh));
306 fBuffer[fEnd] =
'\0';
310inline void XMLDateTime::reset()
317 fTimeZone[hh] = fTimeZone[mm] = 0;
324inline void XMLDateTime::copy(
const XMLDateTime& rhs)
327 fValue[i] = rhs.fValue[i];
329 fMilliSecond = rhs.fMilliSecond;
330 fHasTime = rhs.fHasTime;
331 fTimeZone[hh] = rhs.fTimeZone[hh];
332 fTimeZone[mm] = rhs.fTimeZone[mm];
338 if (fEnd > fBufferMaxLen)
341 fBufferMaxLen = rhs.fBufferMaxLen;
345 memcpy(fBuffer, rhs.fBuffer, (fEnd+1) *
sizeof(
XMLCh));
349inline bool XMLDateTime::initParser()
351 if (!fBuffer || fBuffer[0] ==
chNull)
360inline bool XMLDateTime::isNormalized()
const
362 return ( fValue[
utc] ==
UTC_STD ?
true : false );
365inline int XMLDateTime::getRetVal(
int c1,
int c2)
XERCES_CPP_NAMESPACE_BEGIN const XMLCh chNull
Definition XMLUniDefs.hpp:37
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
#define XMLUTIL_EXPORT
Definition XercesDefs.hpp:162
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
size_t XMLSize_t
Definition Xerces_autoconf_config.hpp:112
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
Configurable memory manager.
Definition MemoryManager.hpp:40
virtual void * allocate(XMLSize_t size)=0
This method allocates requested memory.
virtual void deallocate(void *p)=0
This method deallocates memory.
static bool isWhitespace(const XMLCh toCheck)
Definition XMLChar.hpp:242
Definition XMLDateTime.hpp:39
int getHour() const
Definition XMLDateTime.hpp:142
XMLDateTime(MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
XMLCh * getDateTimeCanonicalRepresentation(MemoryManager *const memMgr) const
static int compare(const XMLDateTime *const, const XMLDateTime *const, bool)
utcType
Definition XMLDateTime.hpp:56
@ UTC_POS
Definition XMLDateTime.hpp:59
@ UTC_STD
Definition XMLDateTime.hpp:58
int getMinute() const
Definition XMLDateTime.hpp:143
XMLDateTime & operator=(const XMLDateTime &)
int getDay() const
Definition XMLDateTime.hpp:141
int getMonth() const
Definition XMLDateTime.hpp:140
static int compare(const XMLDateTime *const, const XMLDateTime *const)
virtual int getSign() const
Returns the sign of this number.
void setBuffer(const XMLCh *const)
Definition XMLDateTime.hpp:284
virtual XMLCh * getRawData() const
Return string representation of the decimal value.
XMLCh * getDateCanonicalRepresentation(MemoryManager *const memMgr) const
int getYear() const
Definition XMLDateTime.hpp:139
time_t getEpoch(bool duration=false) const
XMLDateTime(const XMLDateTime &)
valueIndex
Definition XMLDateTime.hpp:43
@ MiliSecond
Definition XMLDateTime.hpp:50
@ Hour
Definition XMLDateTime.hpp:47
@ Day
Definition XMLDateTime.hpp:46
@ Minute
Definition XMLDateTime.hpp:48
@ utc
Definition XMLDateTime.hpp:51
@ Second
Definition XMLDateTime.hpp:49
@ TOTAL_SIZE
Definition XMLDateTime.hpp:52
@ Month
Definition XMLDateTime.hpp:45
int getSecond() const
Definition XMLDateTime.hpp:144
XMLCh * getTimeCanonicalRepresentation(MemoryManager *const memMgr) const
static int compareOrder(const XMLDateTime *const, const XMLDateTime *const)
XMLDateTime(const XMLCh *const, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
XMLDateTime(time_t epoch, bool duration, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
virtual const XMLCh * getFormattedString() const
Return the original and converted value of the original data.
Definition XMLNumber.hpp:31
@ GREATER_THAN
Definition XMLNumber.hpp:38
@ INDETERMINATE
Definition XMLNumber.hpp:39
@ LESS_THAN
Definition XMLNumber.hpp:36
static XMLSize_t stringLen(const char *const src)
Get the length of the string.
Definition XSValue.hpp:33