Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CL_DateTime Class Reference

#include <datetime.h>

List of all members.

Public Member Functions

 CL_DateTime ()
 Construction:.
 CL_DateTime (time_t unix_time)
 CL_DateTime (const CL_DateTime &other)
 ~CL_DateTime ()
time_t get_unix_time () const
 Attributes:.
int get_seconds_local () const
int get_seconds_utc () const
int get_minutes_local () const
int get_minutes_utc () const
int get_hours_local () const
int get_hours_utc () const
int get_month_day_local () const
int get_month_day_utc () const
int get_month_local () const
int get_month_utc () const
int get_year_local () const
int get_year_utc () const
int get_week_day_local () const
int get_week_day_utc () const
int get_year_day_local () const
int get_year_day_utc () const
int get_daylight_saving_time_local () const
CL_String get_zone_abbreviation () const
void set_unix_time (time_t t)
 Operations:.
void set_seconds_local (int seconds)
void set_minutes_local (int minutes)
void set_hours_local (int hours)
void set_month_day_local (int day)
void set_month_local (int month)
void set_year_local (int year)
void save_local ()
CL_DateTimeoperator= (const CL_DateTime &other)
bool operator< (const CL_DateTime &other) const
bool operator<= (const CL_DateTime &other) const
bool operator> (const CL_DateTime &other) const
bool operator>= (const CL_DateTime &other) const
bool operator== (const CL_DateTime &other) const
bool operator!= (const CL_DateTime &other) const

Static Public Member Functions

static CL_DateTime get_system_time ()

Private Member Functions

void load_local () const
 Implementation:.
void load_utc () const

Private Attributes

time_t unix_time
tm * tm_local
tm * tm_utc


Constructor & Destructor Documentation

CL_DateTime::CL_DateTime  ) 
 

Construction:.

Definition at line 37 of file datetime.cpp.

Referenced by get_system_time().

CL_DateTime::CL_DateTime time_t  unix_time  ) 
 

Definition at line 42 of file datetime.cpp.

CL_DateTime::CL_DateTime const CL_DateTime other  ) 
 

Definition at line 47 of file datetime.cpp.

CL_DateTime::~CL_DateTime  ) 
 

Definition at line 52 of file datetime.cpp.

References tm_local, and tm_utc.


Member Function Documentation

int CL_DateTime::get_daylight_saving_time_local  )  const
 

Definition at line 167 of file datetime.cpp.

References load_local(), and tm_local.

int CL_DateTime::get_hours_local  )  const
 

Definition at line 95 of file datetime.cpp.

References load_local(), and tm_local.

Referenced by CL_FileLogger::log().

int CL_DateTime::get_hours_utc  )  const
 

Definition at line 101 of file datetime.cpp.

References load_utc(), and tm_utc.

int CL_DateTime::get_minutes_local  )  const
 

Definition at line 83 of file datetime.cpp.

References load_local(), and tm_local.

Referenced by CL_FileLogger::log().

int CL_DateTime::get_minutes_utc  )  const
 

Definition at line 89 of file datetime.cpp.

References load_utc(), and tm_utc.

int CL_DateTime::get_month_day_local  )  const
 

Definition at line 107 of file datetime.cpp.

References load_local(), and tm_local.

Referenced by CL_FileLogger::log().

int CL_DateTime::get_month_day_utc  )  const
 

Definition at line 113 of file datetime.cpp.

References load_utc(), and tm_utc.

int CL_DateTime::get_month_local  )  const
 

Definition at line 119 of file datetime.cpp.

References load_local(), and tm_local.

Referenced by CL_FileLogger::log().

int CL_DateTime::get_month_utc  )  const
 

Definition at line 125 of file datetime.cpp.

References load_utc(), and tm_utc.

int CL_DateTime::get_seconds_local  )  const
 

Definition at line 71 of file datetime.cpp.

References load_local(), and tm_local.

Referenced by CL_FileLogger::log().

int CL_DateTime::get_seconds_utc  )  const
 

Definition at line 77 of file datetime.cpp.

References load_utc(), and tm_utc.

CL_DateTime CL_DateTime::get_system_time  )  [static]
 

Definition at line 58 of file datetime.cpp.

References CL_DateTime().

Referenced by CL_FileLogger::log().

time_t CL_DateTime::get_unix_time  )  const
 

Attributes:.

Definition at line 66 of file datetime.cpp.

References unix_time.

int CL_DateTime::get_week_day_local  )  const
 

Definition at line 143 of file datetime.cpp.

References load_local(), and tm_local.

Referenced by CL_FileLogger::log().

int CL_DateTime::get_week_day_utc  )  const
 

Definition at line 149 of file datetime.cpp.

References load_utc(), and tm_utc.

int CL_DateTime::get_year_day_local  )  const
 

Definition at line 155 of file datetime.cpp.

References load_local(), and tm_local.

int CL_DateTime::get_year_day_utc  )  const
 

Definition at line 161 of file datetime.cpp.

References load_utc(), and tm_utc.

int CL_DateTime::get_year_local  )  const
 

Definition at line 131 of file datetime.cpp.

References load_local(), and tm_local.

Referenced by CL_FileLogger::log().

int CL_DateTime::get_year_utc  )  const
 

Definition at line 137 of file datetime.cpp.

References load_utc(), and tm_utc.

CL_String CL_DateTime::get_zone_abbreviation  )  const
 

Definition at line 173 of file datetime.cpp.

References CL_String, load_local(), CL_StringHelp::local8_to_text(), and tm_local.

Referenced by CL_FileLogger::log().

void CL_DateTime::load_local  )  const [private]
 

Implementation:.

Definition at line 292 of file datetime.cpp.

References TEXT, tm_local, and unix_time.

Referenced by get_daylight_saving_time_local(), get_hours_local(), get_minutes_local(), get_month_day_local(), get_month_local(), get_seconds_local(), get_week_day_local(), get_year_day_local(), get_year_local(), get_zone_abbreviation(), set_hours_local(), set_minutes_local(), set_month_day_local(), set_month_local(), set_seconds_local(), and set_year_local().

void CL_DateTime::load_utc  )  const [private]
 

Definition at line 325 of file datetime.cpp.

References TEXT, tm_utc, and unix_time.

Referenced by get_hours_utc(), get_minutes_utc(), get_month_day_utc(), get_month_utc(), get_seconds_utc(), get_week_day_utc(), get_year_day_utc(), and get_year_utc().

bool CL_DateTime::operator!= const CL_DateTime other  )  const
 

Definition at line 280 of file datetime.cpp.

References unix_time.

bool CL_DateTime::operator< const CL_DateTime other  )  const
 

Definition at line 255 of file datetime.cpp.

References unix_time.

bool CL_DateTime::operator<= const CL_DateTime other  )  const
 

Definition at line 260 of file datetime.cpp.

References unix_time.

CL_DateTime & CL_DateTime::operator= const CL_DateTime other  ) 
 

Definition at line 245 of file datetime.cpp.

References tm_local, tm_utc, and unix_time.

bool CL_DateTime::operator== const CL_DateTime other  )  const
 

Definition at line 275 of file datetime.cpp.

References unix_time.

bool CL_DateTime::operator> const CL_DateTime other  )  const
 

Definition at line 265 of file datetime.cpp.

References unix_time.

bool CL_DateTime::operator>= const CL_DateTime other  )  const
 

Definition at line 270 of file datetime.cpp.

References unix_time.

void CL_DateTime::save_local  ) 
 

Definition at line 227 of file datetime.cpp.

References TEXT, tm_local, tm_utc, and unix_time.

void CL_DateTime::set_hours_local int  hours  ) 
 

Definition at line 203 of file datetime.cpp.

References load_local(), and tm_local.

void CL_DateTime::set_minutes_local int  minutes  ) 
 

Definition at line 197 of file datetime.cpp.

References load_local(), and tm_local.

void CL_DateTime::set_month_day_local int  day  ) 
 

Definition at line 209 of file datetime.cpp.

References load_local(), and tm_local.

void CL_DateTime::set_month_local int  month  ) 
 

Definition at line 215 of file datetime.cpp.

References load_local(), and tm_local.

void CL_DateTime::set_seconds_local int  seconds  ) 
 

Definition at line 191 of file datetime.cpp.

References load_local(), and tm_local.

void CL_DateTime::set_unix_time time_t  t  ) 
 

Operations:.

Definition at line 186 of file datetime.cpp.

References unix_time.

void CL_DateTime::set_year_local int  year  ) 
 

Definition at line 221 of file datetime.cpp.

References load_local(), and tm_local.


Member Data Documentation

struct tm* CL_DateTime::tm_local [mutable, private]
 

Definition at line 160 of file datetime.h.

Referenced by get_daylight_saving_time_local(), get_hours_local(), get_minutes_local(), get_month_day_local(), get_month_local(), get_seconds_local(), get_week_day_local(), get_year_day_local(), get_year_local(), get_zone_abbreviation(), load_local(), operator=(), save_local(), set_hours_local(), set_minutes_local(), set_month_day_local(), set_month_local(), set_seconds_local(), set_year_local(), and ~CL_DateTime().

struct tm* CL_DateTime::tm_utc [mutable, private]
 

Definition at line 162 of file datetime.h.

Referenced by get_hours_utc(), get_minutes_utc(), get_month_day_utc(), get_month_utc(), get_seconds_utc(), get_week_day_utc(), get_year_day_utc(), get_year_utc(), load_utc(), operator=(), save_local(), and ~CL_DateTime().

time_t CL_DateTime::unix_time [private]
 

Definition at line 158 of file datetime.h.

Referenced by get_unix_time(), load_local(), load_utc(), operator!=(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), save_local(), and set_unix_time().


The documentation for this class was generated from the following files:
Generated on Sat Feb 19 22:51:17 2005 for npcore by  doxygen 1.4.1