Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

CTBtimeParsed Class Reference

Time represented as Year-Month-Day Hour-Minute-Second. **. More...

#include "CTBtime.hxx"

List of all members.

Public Methods

 CTBtimeParsed ()
 CTBtimeParsed (const CTBtime &time)
int Year () const
int Month () const
int Day () const
int WeekDay () const
int YearDay () const
int Hour () const
int Minute () const
int Second () const
int Microsecond () const
int TimeZoneOffset () const
const char * TimeZoneName () const
bool DaylightSavingTime () const
void Date (int i_year, int i_month, int i_day)
void Time (int i_hour, int i_min=0, int i_sec=0, int i_usec=0, int i_dst=-1)
void DateTime (int i_year, int i_month, int i_day, int i_hour=0, int i_min=0, int i_sec=0, int i_usec=0, int i_dst=-1)
bool Valid () const
void ParseTime (const CTBtime &time)
CTBtime MakeTime ()
void ToStream (ostream &os) const
void FromStream (istream &is)
void Dump (int i_indent=0, ostream &os=cout, const char *p_text=0) const
bool operator! () const
CTBtimeParsed & operator= (const CTBtime &time)
 operator void * () const
 operator CTBtime () const

Private Methods

void Init ()

Private Attributes

int mi_year
int mi_month
int mi_day
int mi_wday
int mi_yday
int mi_hour
int mi_min
int mi_sec
int mi_usec
int mi_tzoffset
char mc_tzname [8]
int mi_dst

Related Functions

(Note that these are not member functions.)

ostream & operator<< (ostream &os, const CTBtimeParsed &obj)
istream & operator>> (istream &is, CTBtimeParsed &obj)


Detailed Description

Time represented as Year-Month-Day Hour-Minute-Second. **.

Definition at line 70 of file CTBtime.hxx.


Constructor & Destructor Documentation

CTBtimeParsed::CTBtimeParsed [inline]
 

Default constructor (sets time to invalid).

Definition at line 183 of file CTBtime.icc.

CTBtimeParsed::CTBtimeParsed const CTBtime & time [inline]
 

Construct from calendar time.

Definition at line 191 of file CTBtime.icc.


Member Function Documentation

int CTBtimeParsed::Year const [inline]
 

Returns year (with century, like 1998).

Definition at line 199 of file CTBtime.icc.

int CTBtimeParsed::Month const [inline]
 

Returns month of year (1=jan,..,12=dec).

Definition at line 207 of file CTBtime.icc.

int CTBtimeParsed::Day const [inline]
 

Returns day of the month (1,...,31).

Definition at line 215 of file CTBtime.icc.

int CTBtimeParsed::WeekDay const [inline]
 

Returns day of the week (0=sun, 6=sat).

Definition at line 223 of file CTBtime.icc.

int CTBtimeParsed::YearDay const [inline]
 

Returns day of the year (0,...,365).

Definition at line 231 of file CTBtime.icc.

int CTBtimeParsed::Hour const [inline]
 

Returns hour (0,...,23).

Definition at line 239 of file CTBtime.icc.

int CTBtimeParsed::Minute const [inline]
 

Returns minute (0,...,59).

Definition at line 247 of file CTBtime.icc.

int CTBtimeParsed::Second const [inline]
 

Returns second (0,...,59; 60 in case of leap second).

Definition at line 255 of file CTBtime.icc.

int CTBtimeParsed::Microsecond const [inline]
 

Returns microsecond (0,...,999999).

Definition at line 263 of file CTBtime.icc.

int CTBtimeParsed::TimeZoneOffset const [inline]
 

Returns timezone offset between local and UTC in seconds.

Definition at line 271 of file CTBtime.icc.

const char * CTBtimeParsed::TimeZoneName const [inline]
 

Returns timezone offset between local and UTC in seconds.

Definition at line 279 of file CTBtime.icc.

bool CTBtimeParsed::DaylightSavingTime const [inline]
 

Returns true if daylight savings time is effective.

Definition at line 287 of file CTBtime.icc.

void CTBtimeParsed::Date int i_year,
int i_month,
int i_day
[inline]
 

Sets the date fields.

Definition at line 295 of file CTBtime.icc.

Referenced by DateTime().

void CTBtimeParsed::Time int i_hour,
int i_min = 0,
int i_sec = 0,
int i_usec = 0,
int i_dst = -1
[inline]
 

Sets the time of day fields.

Definition at line 308 of file CTBtime.icc.

Referenced by DateTime().

void CTBtimeParsed::DateTime int i_year,
int i_month,
int i_day,
int i_hour = 0,
int i_min = 0,
int i_sec = 0,
int i_usec = 0,
int i_dst = -1
[inline]
 

Sets the date and time fields.

Definition at line 322 of file CTBtime.icc.

bool CTBtimeParsed::Valid const [inline]
 

Returns true if parsed time is valid.

Definition at line 334 of file CTBtime.icc.

Referenced by ToStream(), operator void *(), and operator!().

void CTBtimeParsed::ParseTime const CTBtime & time
 

Parse calendar time time expressed relative to the local time zone.

Definition at line 280 of file CTBtime.cxx.

Referenced by operator=().

CTBtime CTBtimeParsed::MakeTime
 

Convert the parsed time into a calendar time, interpreting it as local time.

Definition at line 322 of file CTBtime.cxx.

Referenced by CTBtime::FromStream(), and operator CTBtime().

void CTBtimeParsed::ToStream ostream & os const
 

ostream insertion.

Represents the time in the format

  yyyy-mm-dd hh:mm:ss tzoff              ! if even second
  yyyy-mm-dd hh:mm:ss.uuuuuu tzoff       ! if fractional second

  2000-03-26 03:30:00 +0200
  

Definition at line 374 of file CTBtime.cxx.

Referenced by CTBtime::ToStream(), and operator<<().

void CTBtimeParsed::FromStream istream & is
 

istream extraction.

Reads the time in the format

  yyyy-mm-dd hh:mm:ss.uuuuuu tzoff       ! if fractional second

  2000-03-26 03:30:00 +0200
  

Definition at line 409 of file CTBtime.cxx.

Referenced by CTBtime::FromStream(), and operator>>().

void CTBtimeParsed::Dump int i_indent = 0,
ostream & os = cout,
const char * p_text = 0
const
 

Dump.

Definition at line 443 of file CTBtime.cxx.

bool CTBtimeParsed::operator! const [inline]
 

Returns true if parsed time is not valid.

Definition at line 342 of file CTBtime.icc.

CTBtimeParsed & CTBtimeParsed::operator= const CTBtime & time [inline]
 

Parse time as local time.

Definition at line 350 of file CTBtime.icc.

Referenced by CTBtimeParsed().

CTBtimeParsed::operator void * const [inline]
 

Returns non-zero pointer if parsed time is valid.

Definition at line 359 of file CTBtime.icc.

CTBtimeParsed::operator CTBtime const
 

Definition at line 468 of file CTBtime.cxx.

void CTBtimeParsed::Init [private]
 

Set time to invalid.

Definition at line 477 of file CTBtime.cxx.

Referenced by CTBtimeParsed(), FromStream(), and ParseTime().


Friends And Related Function Documentation

ostream & operator<< ostream & os,
const CTBtimeParsed & obj
[related]
 

ostream insertion operator, forwards to ToStream() .

Definition at line 370 of file CTBtime.icc.

istream & operator>> istream & is,
CTBtimeParsed & obj
[related]
 

istream extraction operator, forwards to FromStream() .

Definition at line 382 of file CTBtime.icc.


Member Data Documentation

int CTBtimeParsed::mi_year [private]
 

year (with century, like 1998).

Definition at line 117 of file CTBtime.hxx.

int CTBtimeParsed::mi_month [private]
 

month (0=jan,..,11=dec).

Definition at line 118 of file CTBtime.hxx.

int CTBtimeParsed::mi_day [private]
 

day of the month (1,...,31).

Definition at line 119 of file CTBtime.hxx.

int CTBtimeParsed::mi_wday [private]
 

day of the week (0=sun, 6=sat).

Definition at line 120 of file CTBtime.hxx.

int CTBtimeParsed::mi_yday [private]
 

day of the year (0,...,365).

Definition at line 121 of file CTBtime.hxx.

int CTBtimeParsed::mi_hour [private]
 

hour (0,..,23).

Definition at line 122 of file CTBtime.hxx.

int CTBtimeParsed::mi_min [private]
 

minute (0,..,59).

Definition at line 123 of file CTBtime.hxx.

int CTBtimeParsed::mi_sec [private]
 

second (0,..,60).

Definition at line 124 of file CTBtime.hxx.

int CTBtimeParsed::mi_usec [private]
 

microsecond (0,...,999999).

Definition at line 125 of file CTBtime.hxx.

int CTBtimeParsed::mi_tzoffset [private]
 

timezone: seconds west of UTC.

Definition at line 126 of file CTBtime.hxx.

char CTBtimeParsed::mc_tzname[8] [private]
 

timezone name.

Definition at line 127 of file CTBtime.hxx.

int CTBtimeParsed::mi_dst [private]
 

daylight saving time (-1=unkn).

Definition at line 128 of file CTBtime.hxx.


The documentation for this class was generated from the following files:
Generated at Fri Oct 24 18:14:11 2003 for CTBbase by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001