Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_Time Class Reference

A class for dealing with times. More...

List of all members.

Public Member Functions

Constructor / Destructor
 CP_Time ()
 Constructor.
 CP_Time (CP_STD::time_t inTime)
 ~CP_Time ()
 Destructor.
Getters
SInt16 GetHour ()
SInt16 GetMinute ()
SInt16 GetSecond ()
Math
const CP_TimeAddHours (SInt16 inHours)
const CP_TimeSubtractHours (SInt16 inHours)
const CP_TimeAddMinutes (SInt16 inMinutes)
const CP_TimeSubtractMinutes (SInt16 inMinutes)
const CP_TimeAddSeconds (SInt16 inSeconds)
const CP_TimeSubtractSeconds (SInt16 inSeconds)
Format
CP_String Format (char *inFormat)
Setters
void SetTimeNow ()
void SetHour (SInt16 inHour)
void SetMinute (SInt16 inMinute)
void SetSecond (SInt16 inSecond)
Constructor / Destructor
 CP_Time (UInt32 inMacTime, bool inIsMacTime)
 CP_Time (LongDateRec inDateRec)
Getters
void GetTime (LongDateRec &inOutDateRec)
Setters
void SetTime (LongDateRec inDateRec)
Constructor / Destructor
 CP_Time (SYSTEMTIME inWinTime)
Getters
void GetTime (SYSTEMTIME &inOutWinTime)
Setters
void SetTime (SYSTEMTIME inWinTime)

Protected Attributes

CP_STD::time_t fTime
SInt16 fHour
SInt16 fMinute
SInt16 fSecond


Detailed Description

The CP_Times class provides methods for performing math on times.

There are also methods to return the time in a specific formatted way.


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_Time::CP_Time  ) 
 

Constructor. Sets the time to the current time.

Exceptions:
none 

CP_Time::CP_Time CP_STD::time_t  inTime  ) 
 

Constructor. Sets the time from the passed in timte_t.

Parameters:
inTime time_t containing the time to set.
Exceptions:
none 

CP_Time::~CP_Time  ) 
 

Destructor.

Exceptions:
none 

CP_Time::CP_Time UInt32  inMacTime,
bool  inIsMacTime
 

Seconds of the time.

CP_Time::CP_Time LongDateRec  inDateRec  ) 
 

Constructor. Sets the time from the passed in MacOS LongDateRec.

Parameters:
inDateRec MacOS LongDateRec containing the time to set.
Exceptions:
none 

CP_Time::CP_Time SYSTEMTIME  inWinTime  ) 
 

Constructor. Sets the time from a Windows SYSTEMTIME.

Parameters:
inWinTime Windows SYSTEMTIME to set the time from.
Exceptions:
none 


Member Function Documentation

SInt16 CP_Time::GetHour  ) 
 

Returns the hour portion of the time.

Exceptions:
none 
Returns:
SInt16 Hour portion of the time.

SInt16 CP_Time::GetMinute  ) 
 

Returns the minute portion of the time.

Exceptions:
none 
Returns:
SInt16 Minute portion of the time.

SInt16 CP_Time::GetSecond  ) 
 

Returns the seconds portion of the time.

Exceptions:
none 
Returns:
SInt16 Seconds portion of the time.

const CP_Time & CP_Time::AddHours SInt16  inHours  ) 
 

Adds the passed in number of hours to this time.

Parameters:
inHours The number of hours to add to this time.
Exceptions:
none 
Returns:
CP_Time& Returns a reference to ourselves.

const CP_Time & CP_Time::SubtractHours SInt16  inHours  ) 
 

Subtacts the passed in number of hours from this time.

Parameters:
inHours The number of hours subtracted from this time.
Exceptions:
none 
Returns:
CP_Time& Returns a reference to ourselves.

const CP_Time & CP_Time::AddMinutes SInt16  inMinutes  ) 
 

Adds the passed in number of minutes to this time.

Parameters:
inMinutes The number of minutes added to this time.
Exceptions:
none 
Returns:
CP_Time& Returns a reference to ourselves.

const CP_Time & CP_Time::SubtractMinutes SInt16  inMinutes  ) 
 

Subtacts the passed in number of minutes from this time.

Parameters:
inHours The number of minutes subtracted from this time.
Exceptions:
none 
Returns:
CP_Time& Returns a reference to ourselves.

const CP_Time & CP_Time::AddSeconds SInt16  inSeconds  ) 
 

Adds the passed in number of seconds to this time.

Parameters:
inSeconds The number of seconds added to this time.
Exceptions:
none 
Returns:
CP_Time& Returns a reference to ourselves.

const CP_Time & CP_Time::SubtractSeconds SInt16  inSeconds  ) 
 

Subtacts the passed in number of seconds from this time.

Parameters:
inHours The number of seconds subtracted from this time.
Exceptions:
none 
Returns:
CP_Time& Returns a reference to ourselves.

CP_String CP_Time::Format char *  inFormat  ) 
 

Formats the time and returns a time based on the passed in char * format.

Parameters:
inFormat Contains the format to return the string in.
Exceptions:
none 
Returns:
void

void CP_Time::SetTimeNow  ) 
 

Sets this object to the current time.

Exceptions:
none 
Returns:
void

void CP_Time::SetHour SInt16  inHour  ) 
 

Sets the hour portion of the time.

Parameters:
inHour The hour portion of the time.
Exceptions:
none 
Returns:
void

void CP_Time::SetMinute SInt16  inMinute  ) 
 

Sets the minute portion of the time.

Parameters:
inMinute The minute portion of the time.
Exceptions:
none 
Returns:
void

void CP_Time::SetSecond SInt16  inSecond  ) 
 

Sets the seconds portion of the time.

Parameters:
inSecond The seconds portion of the time.
Exceptions:
none 
Returns:
void

void CP_Time::GetTime LongDateRec &  inOutDateRec  ) 
 

Returns the time in the passed in MacOS LongDateRec.

Parameters:
inOutDateRec MacOS LongDateRec containing the location to return the result in.
Exceptions:
none 
Returns:
void

void CP_Time::SetTime LongDateRec  inDateRec  ) 
 

Sets the time from the passed in MacOS LongDateRec.

Parameters:
inDateRec MacOS LongDateRec containing the time to set.
Exceptions:
none 
Returns:
void

void CP_Time::GetTime SYSTEMTIME &  inOutWinTime  ) 
 

Gets the time, and returns in a Windows SYSTEMTIME.

Parameters:
inOutWinTime Windows SYSTEMTIME to return the result.
Exceptions:
none 
Returns:
void

void CP_Time::SetTime SYSTEMTIME  inWinTime  ) 
 

Sets the time from a Windows SYSTEMTIME.

Parameters:
inWinTime Windows SYSTEMTIME to set the time from.
Exceptions:
none 
Returns:
void


Member Data Documentation

CP_STD::time_t CP_Time::fTime [protected]
 

SInt16 CP_Time::fHour [protected]
 

time_t representation of time.

SInt16 CP_Time::fMinute [protected]
 

Hour of the time.

SInt16 CP_Time::fSecond [protected]
 

Minute of the time.


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:02:21 2005 for CPLAT by  doxygen 1.4.0