- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Exponent::Host::CTime Class Reference

List of all members.

## Detailed Description

Stores the current time.

Date:
  15/09/2004

Author:
  Paul Chana

Version:
  1.0.0 Initial version

  1.1.0 Removed virtual from function definitions

  1.1.1 Added object description

  1.1.2 Improved const correctness

Note:
  All contents of this source code are copyright 2005 Exp Digital Uk.
  This source file is covered by the licence conditions of the Infinity API. You should have recieved a copy
  with the source code. If you didnt, please refer to http://www.expdigital.co.uk All content is the Intellectual property of Exp Digital Uk.
  Certain sections of this code may come from other sources. They are credited where applicable.
  If you have comments, suggestions or bug reports please visit http://support.expdigital.co.uk

Id
  CTime.hpp,v 1.4 2007/02/08 21:06:44 paul Exp

Definition at line 33 of file CTime.hpp.

## Public Member Functions

- CTime (const CTime &time)
- CTime (DateTimeRec &time)
- CTime (FILETIME &fileTime)
- CTime ()
- unsigned short getDay () const
- unsigned short getDayOfWeek () const
- CString getDayYearString (const bool stringFormat=true) const
- DateTimeRec * getFileTime ()
- FILETIME * getFileTime ()
- unsigned short getHour () const
- unsigned short getMilliseconds () const
- unsigned short getMinutes () const
- unsigned short getMonth () const
- virtual void getObjectDescription (char *string, const long size) const
- unsigned short getSeconds () const
- CString getTimeOnly () const
- unsigned short getYear () const
- virtual CTime & operator= (const CTime &time)
- void setDay (const unsigned short day)
- void setDayOfWeek (const unsigned short dayOfWeek)
- void setHour (const unsigned short hour)
- void setMilliseconds (const unsigned short milliseconds)
- void setMinutes (const unsigned short minutes)
- void setMonth (const unsigned short month)
- void setSeconds (const unsigned short seconds)
- void setTime (DateTimeRec &time)
- void setTime (FILETIME &fileTime)
- void setToCurrentTime ()
- void setYear (const unsigned short year)
- virtual ~CTime ()

## Static Public Attributes

- static const char * CTIME_DAY_OF_THE_WEEK []
- static const char * CTIME_MONTH_OF_THE_YEAR []

## Protected Member Functions

- void setTime (SYSTEMTIME &time)

## Protected Attributes

- unsigned short m_day
- unsigned short m_dayOfWeek
- unsigned short m_hour
- unsigned short m_milliseconds
- unsigned short m_minutes
- unsigned short m_month
- unsigned short m_seconds
- unsigned short m_year

## Constructor & Destructor Documentation

Exponent::Host::CTime::CTime | ( |  | ) |

Construction -> sets to current time

Exponent::Host::CTime::CTime | ( | FILETIME & | fileTime | ) |

Construction from a time

Parameters:

  | fileTime | Window file time

Exponent::Host::CTime::CTime | ( | DateTimeRec & | time | ) |

Construction from a time

Parameters:

  | time | Mac file time

Exponent::Host::CTime::CTime | ( | const CTime & | time | ) |

Copy construction

Parameters:

  | time | The time to copy

virtual Exponent::Host::CTime::~CTime | ( |  | ) | `[virtual]`

Destructor

## Member Function Documentation

unsigned short Exponent::Host::CTime::getDay | ( |  | ) | const`[inline]`

Get the day of the month

Return values:

  | unsigned | short The day

Definition at line 144 of file CTime.hpp.

References m_day.

unsigned short Exponent::Host::CTime::getDayOfWeek | ( |  | ) | const`[inline]`

Get hte day of the week

Return values:

  | unsigned | short The day of the week

Definition at line 138 of file CTime.hpp.

References m_dayOfWeek.

CString Exponent::Host::CTime::getDayYearString | ( | const bool | stringFormat = `true` | ) | const

Get the day and year string eg - either 12 SEptember 2004 or 12/09/04 if stringFormat = false

Parameters:

  | stringFormat | If true string is format Date Month Year as strings. If false is formated as dd/mm/yy

Return values:

  | CString | The day year string. Up to you to delete string returned

DateTimeRec* Exponent::Host::CTime::getFileTime | ( |  | ) |

Get the time as a macos datetimerec MAC ONLY

Return values:

  | DateTimeRect* | The date as a DatTimeRec for mac - you are responsible for pointer deletion

FILETIME* Exponent::Host::CTime::getFileTime | ( |  | ) |

Get the time as a filetime structure WIN32 ONLY

Return values:

  | FILETIME | The date as a FILETIMNE for win - you are responsible for pointer deletion

unsigned short Exponent::Host::CTime::getHour | ( |  | ) | const`[inline]`

Get the hour

Return values:

  | unsigned | short The hour

Definition at line 150 of file CTime.hpp.

References m_hour.

unsigned short Exponent::Host::CTime::getMilliseconds | ( |  | ) | const`[inline]`

Get the milliseconds

Return values:

  | unsigned | short The milliseconds

Definition at line 168 of file CTime.hpp.

References m_milliseconds.

unsigned short Exponent::Host::CTime::getMinutes | ( |  | ) | const`[inline]`

Get the minute

Return values:

  | unsigned | short The minute

Definition at line 156 of file CTime.hpp.

References m_minutes.

unsigned short Exponent::Host::CTime::getMonth | ( |  | ) | const`[inline]`

Get the months

Return values:

  | unsigned | short The months

Definition at line 132 of file CTime.hpp.

References m_month.

virtual void Exponent::Host::CTime::getObjectDescription | ( | char * | string,
|  | const long | size |
| ) |  |  | const`[virtual]`

Get a description of the object

Parameters:

  | string | On return is filled with the description
  | size | The size of the stirng

unsigned short Exponent::Host::CTime::getSeconds | ( |  | ) | const`[inline]`

Get the seconds

Return values:

  | unsigned | short The seconds

Definition at line 162 of file CTime.hpp.

References m_seconds.

CString Exponent::Host::CTime::getTimeOnly | ( |  | ) | const

Get the time as a string eg - hh:mm:sec:msec

Return values:

  | CString | The time string, up to you to delete string returned

unsigned short Exponent::Host::CTime::getYear | ( |  | ) | const`[inline]`

Get the year

Return values:

  | unsigned | short The year

Definition at line 126 of file CTime.hpp.

References m_year.

virtual CTime& Exponent::Host::CTime::operator= | ( | const CTime & | time | ) | `[virtual]`

Assignment opertor

Parameters:

  | time | The time to copy

Return values:

  | CTime& | A reference to this

void Exponent::Host::CTime::setDay | ( | const unsigned short | day | ) | `[inline]`

Set the day

Parameters:

  | day | The day

Definition at line 194 of file CTime.hpp.

References m_day.

void Exponent::Host::CTime::setDayOfWeek | ( | const unsigned short | dayOfWeek | ) | `[inline]`

Set the day of the week

Parameters:

  | dayOfWeek | The day of the week

Definition at line 188 of file CTime.hpp.

References m_dayOfWeek.

void Exponent::Host::CTime::setHour | ( | const unsigned short | hour | ) | `[inline]`

Set the hour

Parameters:

  | hour | The hour

Definition at line 200 of file CTime.hpp.

References m_hour.

void Exponent::Host::CTime::setMilliseconds | ( | const unsigned short | milliseconds | ) | `[inline]`

Set the milliseconds

Parameters:

  | milliseconds | The milliseconds

Definition at line 218 of file CTime.hpp.

References m_milliseconds.

void Exponent::Host::CTime::setMinutes | ( | const unsigned short | minutes | ) | `[inline]`

Set the minutes

Parameters:

  | minutes | The minutes

Definition at line 206 of file CTime.hpp.

References m_minutes.

void Exponent::Host::CTime::setMonth | ( | const unsigned short | month | ) | `[inline]`

Set the month

Parameters:

  | month | The month

Definition at line 182 of file CTime.hpp.

References m_month.

void Exponent::Host::CTime::setSeconds | ( | const unsigned short | seconds | ) | `[inline]`

Set the seconds

Parameters:

  | seconds | The seconds

Definition at line 212 of file CTime.hpp.

References m_seconds.

void Exponent::Host::CTime::setTime | ( | SYSTEMTIME & | time | ) | `[protected]`

Set the time

Parameters:

  | time | The windows system time

void Exponent::Host::CTime::setTime | ( | DateTimeRec & | time | ) |

Construction from a time

Parameters:

  | time | Mac file time

void Exponent::Host::CTime::setTime | ( | FILETIME & | fileTime | ) |

Set the time from a windows filetime structure

Parameters:

  | fileTime | The window file time

void Exponent::Host::CTime::setToCurrentTime | ( |  | ) |

Set to the current time when called

void Exponent::Host::CTime::setYear | ( | const unsigned short | year | ) | `[inline]`

Set the year

Parameters:

  | year | The year

Definition at line 176 of file CTime.hpp.

References m_year.

## Member Data Documentation

const char* Exponent::Host::CTime::CTIME_DAY_OF_THE_WEEK[]`[static]`

The days of the week

Definition at line 45 of file CTime.hpp.

const char* Exponent::Host::CTime::CTIME_MONTH_OF_THE_YEAR[]`[static]`

The months of the year

Definition at line 46 of file CTime.hpp.

unsigned short Exponent::Host::CTime::m_day`[protected]`

The day

Definition at line 285 of file CTime.hpp.

Referenced by getDay(), and setDay().

unsigned short Exponent::Host::CTime::m_dayOfWeek`[protected]`

The day of the week

Definition at line 284 of file CTime.hpp.

Referenced by getDayOfWeek(), and setDayOfWeek().

unsigned short Exponent::Host::CTime::m_hour`[protected]`

The hour

Definition at line 286 of file CTime.hpp.

Referenced by getHour(), and setHour().

unsigned short Exponent::Host::CTime::m_milliseconds`[protected]`

The milliseconds

Definition at line 289 of file CTime.hpp.

Referenced by getMilliseconds(), and setMilliseconds().

unsigned short Exponent::Host::CTime::m_minutes`[protected]`

The minutes

Definition at line 287 of file CTime.hpp.

Referenced by getMinutes(), and setMinutes().

unsigned short Exponent::Host::CTime::m_month`[protected]`

The month

Definition at line 283 of file CTime.hpp.

Referenced by getMonth(), and setMonth().

unsigned short Exponent::Host::CTime::m_seconds`[protected]`

The seconds

Definition at line 288 of file CTime.hpp.

Referenced by getSeconds(), and setSeconds().

unsigned short Exponent::Host::CTime::m_year`[protected]`

The year

Definition at line 282 of file CTime.hpp.

Referenced by getYear(), and setYear().