cmlabs::JTime Class Reference

#include <JTime.h>

Inheritance diagram for cmlabs::JTime:

Inheritance graph
[legend]
Collaboration diagram for cmlabs::JTime:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 JTime ()
 JTime (const JTime &t)
 JTime (struct timeb tb)
 JTime (const JString &text)
 JTime (XMLNode *node)
 JTime (long ms)
 JTime (long sec, int milli)
 ~JTime ()
Objectclone () const
unsigned long getHash () const
bool reset ()
bool perfCountReset ()
bool equals (const Object *o2) const
virtual unsigned long getPayloadSize () const
 Get total size of payload.
bool unitTest ()
JString toXML ()
JString toXML (const JString &tagname, const JString &params="")
bool fromXML (XMLNode *node)
bool setTime (int year, int month, int day, int hour, int min, int sec, int ms=0)
bool setLocalTimeZoneInformation ()
JString getLocalTimeZoneInformation () const
JString getLocalTimeZoneName () const
int getLocalTimeZoneOffset () const
int getLocalTimeZoneDST () const
JString getOriginalTimeZoneName () const
int getOriginalTimeZoneOffset () const
int getOriginalTimeZoneDST () const
int getTimeDifference () const
int getTimeDifference (const JTime &t) const
bool operator> (const JTime &t) const
bool operator>= (const JTime &t) const
bool operator< (const JTime &t) const
bool operator<= (const JTime &t) const
bool operator== (const JTime &t) const
bool operator!= (const JTime &t) const
const JTimeoperator-= (long long millis)
const JTimeoperator+= (long long millis)
int compare (const Object *o2) const
long operator- (const JTime &t) const
JTime operator+ (long long millis) const
JTime operator- (long long millis) const
bool addMilliseconds (long long millis)
long microDifference (const JTime &t) const
long getAge () const
long long getMicroAge () const
bool isOlderThan (long ms) const
JString print ()
 Nice long date and time.
JString printTime () const
 Only time part (hour, minute, second, ms).
JString printTimeSec () const
 Only time part (hour, minute, second).
JString printTimeMS () const
 Only time part (hour, minute, second, ms).
JString printDateShort () const
 Very short date print.
JString printDateSortable () const
 Sortable yyyymmdd.
JString printDateLong () const
 Nice long date.
JString printStamp () const
 Sortable date and time.
JString printDifTime () const
 HH:MM:SS.ms and days, months, years as needed.
JString toHTTP () const
bool fromHTTP (const JString &text)
double ms () const
 Return full time in ms.
JString asText () const
 Returns full time in ms as string.
long seconds () const
 Return sec part of time only.
int milliseconds () const
 Return ms part of time only.
void setInvalid ()
bool isValid () const

Static Public Member Functions

static JTime createInvalid ()

Public Attributes

bool valid
struct timeb timebuffer
JString tzc
unsigned int atomicOffset
struct timeval perfCount


Detailed Description

Definition at line 54 of file JTime.h.


Constructor & Destructor Documentation

cmlabs::JTime::JTime (  ) 

Definition at line 166 of file JTime.cpp.

cmlabs::JTime::JTime ( const JTime t  ) 

Definition at line 191 of file JTime.cpp.

cmlabs::JTime::JTime ( struct timeb  tb  ) 

Definition at line 199 of file JTime.cpp.

cmlabs::JTime::JTime ( const JString text  ) 

Definition at line 231 of file JTime.cpp.

cmlabs::JTime::JTime ( XMLNode node  ) 

Definition at line 274 of file JTime.cpp.

cmlabs::JTime::JTime ( long  ms  ) 

Definition at line 212 of file JTime.cpp.

cmlabs::JTime::JTime ( long  sec,
int  milli 
)

Definition at line 282 of file JTime.cpp.

cmlabs::JTime::~JTime (  ) 

Definition at line 303 of file JTime.cpp.


Member Function Documentation

JTime cmlabs::JTime::createInvalid (  )  [static]

Definition at line 155 of file JTime.cpp.

Object * cmlabs::JTime::clone (  )  const [virtual]

Implements cmlabs::Object.

Definition at line 429 of file JTime.cpp.

unsigned long cmlabs::JTime::getHash (  )  const [virtual]

Reimplemented from cmlabs::Object.

Definition at line 434 of file JTime.cpp.

bool cmlabs::JTime::reset (  ) 

Definition at line 395 of file JTime.cpp.

bool cmlabs::JTime::perfCountReset (  ) 

Definition at line 386 of file JTime.cpp.

bool cmlabs::JTime::equals ( const Object o2  )  const [virtual]

Reimplemented from cmlabs::Object.

Definition at line 1025 of file JTime.cpp.

unsigned long cmlabs::JTime::getPayloadSize (  )  const [virtual]

Get total size of payload.

Reimplemented from cmlabs::Object.

Definition at line 310 of file JTime.cpp.

bool cmlabs::JTime::unitTest (  )  [virtual]

Reimplemented from cmlabs::Object.

Definition at line 1218 of file JTime.cpp.

JString cmlabs::JTime::toXML (  )  [virtual]

Reimplemented from cmlabs::Object.

Definition at line 1056 of file JTime.cpp.

JString cmlabs::JTime::toXML ( const JString tagname,
const JString params = "" 
)

Definition at line 1062 of file JTime.cpp.

bool cmlabs::JTime::fromXML ( XMLNode node  )  [virtual]

Reimplemented from cmlabs::Object.

Definition at line 1078 of file JTime.cpp.

bool cmlabs::JTime::setTime ( int  year,
int  month,
int  day,
int  hour,
int  min,
int  sec,
int  ms = 0 
)

Definition at line 706 of file JTime.cpp.

bool cmlabs::JTime::setLocalTimeZoneInformation (  ) 

Definition at line 352 of file JTime.cpp.

JString cmlabs::JTime::getLocalTimeZoneInformation (  )  const

Definition at line 314 of file JTime.cpp.

JString cmlabs::JTime::getLocalTimeZoneName (  )  const

Definition at line 357 of file JTime.cpp.

int cmlabs::JTime::getLocalTimeZoneOffset (  )  const

Definition at line 360 of file JTime.cpp.

int cmlabs::JTime::getLocalTimeZoneDST (  )  const

Definition at line 363 of file JTime.cpp.

JString cmlabs::JTime::getOriginalTimeZoneName (  )  const

Definition at line 366 of file JTime.cpp.

int cmlabs::JTime::getOriginalTimeZoneOffset (  )  const

Definition at line 369 of file JTime.cpp.

int cmlabs::JTime::getOriginalTimeZoneDST (  )  const

Definition at line 372 of file JTime.cpp.

int cmlabs::JTime::getTimeDifference (  )  const

Definition at line 376 of file JTime.cpp.

int cmlabs::JTime::getTimeDifference ( const JTime t  )  const

Definition at line 381 of file JTime.cpp.

bool cmlabs::JTime::operator> ( const JTime t  )  const

Definition at line 871 of file JTime.cpp.

bool cmlabs::JTime::operator>= ( const JTime t  )  const

Definition at line 884 of file JTime.cpp.

bool cmlabs::JTime::operator< ( const JTime t  )  const

Definition at line 898 of file JTime.cpp.

bool cmlabs::JTime::operator<= ( const JTime t  )  const

Definition at line 911 of file JTime.cpp.

bool cmlabs::JTime::operator== ( const JTime t  )  const

Definition at line 925 of file JTime.cpp.

bool cmlabs::JTime::operator!= ( const JTime t  )  const

Definition at line 935 of file JTime.cpp.

const JTime & cmlabs::JTime::operator-= ( long long  millis  ) 

Definition at line 984 of file JTime.cpp.

const JTime & cmlabs::JTime::operator+= ( long long  millis  ) 

Definition at line 1018 of file JTime.cpp.

int cmlabs::JTime::compare ( const Object o2  )  const [virtual]

Reimplemented from cmlabs::Object.

Definition at line 1031 of file JTime.cpp.

long cmlabs::JTime::operator- ( const JTime t  )  const

Definition at line 946 of file JTime.cpp.

JTime cmlabs::JTime::operator+ ( long long  millis  )  const

Definition at line 1001 of file JTime.cpp.

JTime cmlabs::JTime::operator- ( long long  millis  )  const

Definition at line 967 of file JTime.cpp.

bool cmlabs::JTime::addMilliseconds ( long long  millis  ) 

Definition at line 1136 of file JTime.cpp.

long cmlabs::JTime::microDifference ( const JTime t  )  const

Definition at line 1174 of file JTime.cpp.

long cmlabs::JTime::getAge (  )  const

Definition at line 805 of file JTime.cpp.

long long cmlabs::JTime::getMicroAge (  )  const

Definition at line 809 of file JTime.cpp.

bool cmlabs::JTime::isOlderThan ( long  ms  )  const

Definition at line 864 of file JTime.cpp.

JString cmlabs::JTime::print (  )  [virtual]

Nice long date and time.

Reimplemented from cmlabs::Object.

Definition at line 580 of file JTime.cpp.

JString cmlabs::JTime::printTime (  )  const

Only time part (hour, minute, second, ms).

Definition at line 455 of file JTime.cpp.

JString cmlabs::JTime::printTimeSec (  )  const

Only time part (hour, minute, second).

Definition at line 459 of file JTime.cpp.

JString cmlabs::JTime::printTimeMS (  )  const

Only time part (hour, minute, second, ms).

Definition at line 474 of file JTime.cpp.

JString cmlabs::JTime::printDateShort (  )  const

Very short date print.

Definition at line 529 of file JTime.cpp.

JString cmlabs::JTime::printDateSortable (  )  const

Sortable yyyymmdd.

Definition at line 540 of file JTime.cpp.

JString cmlabs::JTime::printDateLong (  )  const

Nice long date.

Definition at line 551 of file JTime.cpp.

JString cmlabs::JTime::printStamp (  )  const

Sortable date and time.

Definition at line 571 of file JTime.cpp.

JString cmlabs::JTime::printDifTime (  )  const

HH:MM:SS.ms and days, months, years as needed.

Definition at line 480 of file JTime.cpp.

JString cmlabs::JTime::toHTTP (  )  const

Definition at line 589 of file JTime.cpp.

bool cmlabs::JTime::fromHTTP ( const JString text  ) 

Definition at line 649 of file JTime.cpp.

double cmlabs::JTime::ms (  )  const

Return full time in ms.

Definition at line 772 of file JTime.cpp.

JString cmlabs::JTime::asText (  )  const

Returns full time in ms as string.

Definition at line 780 of file JTime.cpp.

long cmlabs::JTime::seconds (  )  const

Return sec part of time only.

Definition at line 792 of file JTime.cpp.

int cmlabs::JTime::milliseconds (  )  const

Return ms part of time only.

Definition at line 798 of file JTime.cpp.

void cmlabs::JTime::setInvalid (  ) 

Definition at line 415 of file JTime.cpp.

bool cmlabs::JTime::isValid (  )  const

Definition at line 424 of file JTime.cpp.


Member Data Documentation

Definition at line 160 of file JTime.h.

Definition at line 162 of file JTime.h.

Definition at line 163 of file JTime.h.

Definition at line 164 of file JTime.h.

struct timeval cmlabs::JTime::perfCount [read]

Definition at line 169 of file JTime.h.


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

Generated on Tue Jul 7 16:22:58 2009 for CoreLibrary by  doxygen 1.5.6