Go to the documentation of this file.
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';
310 inline void XMLDateTime::reset()
317 fTimeZone[hh] = fTimeZone[mm] = 0;
324 inline 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));
349 inline bool XMLDateTime::initParser()
351 if (!fBuffer || fBuffer[0] ==
chNull)
360 inline bool XMLDateTime::isNormalized()
const
362 return ( fValue[
utc] ==
UTC_STD ?
true :
false );
365 inline int XMLDateTime::getRetVal(
int c1,
int c2)
XMLDateTime(MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
static int compare(const XMLDateTime *const, const XMLDateTime *const)
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XMLDateTime(time_t epoch, bool duration, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
int getMinute() const
Definition: XMLDateTime.hpp:143
char16_t XMLCh
Definition: Xerces_autoconf_config.hpp:120
@ INDETERMINATE
Definition: XMLNumber.hpp:39
void setBuffer(const XMLCh *const)
Definition: XMLDateTime.hpp:284
XMLCh * getDateCanonicalRepresentation(MemoryManager *const memMgr) const
virtual void * allocate(XMLSize_t size)=0
This method allocates requested memory.
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
@ TOTAL_SIZE
Definition: XMLDateTime.hpp:52
Definition: XMLDateTime.hpp:39
@ UTC_STD
Definition: XMLDateTime.hpp:58
#define XMLUTIL_EXPORT
Definition: XercesDefs.hpp:162
virtual XMLCh * getRawData() const
Return string representation of the decimal value.
@ utc
Definition: XMLDateTime.hpp:51
@ Minute
Definition: XMLDateTime.hpp:48
static int compareOrder(const XMLDateTime *const, const XMLDateTime *const)
@ GREATER_THAN
Definition: XMLNumber.hpp:38
XMLCh * getDateTimeCanonicalRepresentation(MemoryManager *const memMgr) const
static bool isWhitespace(const XMLCh toCheck)
Definition: XMLChar.hpp:242
virtual int getSign() const
Returns the sign of this number.
@ Second
Definition: XMLDateTime.hpp:49
@ LESS_THAN
Definition: XMLNumber.hpp:36
int getDay() const
Definition: XMLDateTime.hpp:141
size_t XMLSize_t
Definition: Xerces_autoconf_config.hpp:112
XMLCh * getTimeCanonicalRepresentation(MemoryManager *const memMgr) const
@ Month
Definition: XMLDateTime.hpp:45
static int compare(const XMLDateTime *const, const XMLDateTime *const, bool)
XERCES_CPP_NAMESPACE_BEGIN const XMLCh chNull
Definition: XMLUniDefs.hpp:37
static XMLSize_t stringLen(const char *const src)
Get the length of the string.
virtual void deallocate(void *p)=0
This method deallocates memory.
int getMonth() const
Definition: XMLDateTime.hpp:140
Definition: XSValue.hpp:33
@ Hour
Definition: XMLDateTime.hpp:47
int getSecond() const
Definition: XMLDateTime.hpp:144
int getYear() const
Definition: XMLDateTime.hpp:139
utcType
Definition: XMLDateTime.hpp:56
Configurable memory manager.
Definition: MemoryManager.hpp:40
int getHour() const
Definition: XMLDateTime.hpp:142
XMLDateTime(const XMLCh *const, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
Definition: XMLNumber.hpp:31
virtual const XMLCh * getFormattedString() const
Return the original and converted value of the original data.
time_t getEpoch(bool duration=false) const
valueIndex
Definition: XMLDateTime.hpp:43
XMLDateTime & operator=(const XMLDateTime &)
@ UTC_POS
Definition: XMLDateTime.hpp:59
@ Day
Definition: XMLDateTime.hpp:46
XMLDateTime(const XMLDateTime &)
@ MiliSecond
Definition: XMLDateTime.hpp:50