Description
The CTTime class represents Time objects.
See Also
CTTimeTime, CTTime
Preconditions
This is one of the basic objects from the c-tree database layer.
CTTime Operators
- operator = : Assignment operator
- operator <, <=, >, >=, ==, != : Comparison operators
CTTime.operator =
Syntax
CTTime operator = (CTTime Time)
CTTime operator = (CTTIME Time)
Parameters
- Time [in] The CTTime object or Time to be assigned to the new CTTime object
Description
These overloaded operators assign a Time or CTTime object to a CTTime object
Return
The new CTTime object
CTTime.operator <, <=, >, >=, ==, !=
Syntax
bool operator < ( CTTime Time)
bool operator <= ( CTTime Time)
bool operator > ( CTTime Time)
bool operator >= ( CTTime Time)
bool operator == ( CTTime Time)
bool operator != ( CTTime Time)
Parameters
- Time [in] The Time to be compared to this CTTime object.
Description
These overloaded operators make comparisons between the CTTime object and Time.
Return
The operators return true or false, depending on the result of the comparison.
CTTime Methods
Constructor / Destructor
- CTTime(): Creates a CTTime object
- ~CTTime(): Destroys a CTTime object and resets all the dependent objects
Time Handling
- GetTime(): Retrieves the Time.
- SetTime(): Sets the Time to the CTTime object.
- Pack(): Packs an hour, minute and second value into a CTTIME object.
- Unpack(): Unpacks a CTTIME object into hour, minute and second values
- Hour(): Retrieves the hour component from a CTTIME object
- Minute(): Retrieves the minute component from a CTTIME object
- Second(): Retrieves the second component from a CTTIME object
- TimeToString(): Converts a packed CTTIME object to a String object
- StringToTime(): Converts a String object to a Time object
- CurrentTime(): Retrieves the current system Time.
CTTime.CTTime
Syntax
CTTime ( )
CTTime(int hour, int minute, int second)
CTTime(CTTIME Time)
CTTime(CTTime Time)
Parameters
- hour [in] The hour to set to the CTTime object.
- minute [in] The minute to set to the CTTime object.
- second [in] The second to set to the CTTime object.
- Time [in] The time to set to the CTTime object
Description
This is the constructor for the CTTime object.
See Also
~CTTime()
CTTime.~CTTime
Syntax
~CTTime
Parameters
This destructor has no parameters.
Description
This is the destructor for the CTTime object.
See Also
CTTime()
CTTime.CurrentTime
Syntax
CTTime CurrentTime( )
Parameters
This method has no parameters.
Description
Retrieves the current system time
Return
CurrentTime() returns a CTTime object with the system current time.
See Also
GetTime()
CTTime.GetTime
Syntax
int GetTime( )
Parameters
This method has no parameters.
Description
Retrieves the time.
Return
GetTime() returns a CTTIME (int) object with the time.
See Also
CurrentTime(), SetTime()
CTTime.Hour
Syntax
int Hour( )
Parameters
This method has no parameters.
Description
Retrieves the hour component from a CTTime object.
Return
Hour returns the unpacked hour.
See Also
Minute(), Pack(), Second(), Unpack()
CTTime.Minute
Syntax
int Minute( )
Parameters
This method has no parameters.
Description
Retrieves the minute component from a CTTime object
Return
Minute returns the unpacked minute.
See Also
Hour(), Pack(), Second(), Unpack()
CTTime.Pack
Syntax
void Pack(int hour, int minute, int second)
Parameters
- hour [in] The hour to pack.
- minute [in] The minute to pack.
- second [in] The second to pack.
Description
Packs an hour, minute and second value into a CTTime object.
Return
None.
See Also
Unpack()
CTTime.Second
Syntax
int Second( )
Parameters
This method has no parameters.
Description
Retrieves the second component from a CTTime object.
Return
Second returns the unpacked second.
See Also
Hour(), Minute(), Pack(), SecondOfWeek(), Unpack()
CTTime.SetTime
Syntax
void SetTime(CTTIME Time)
void SetTime(CTTime Time)
Parameters
- Time [in] The new time to set to the CTTime object.
Description
Sets the time to the CTTime object.
Return
None.
See Also
GetTime()
CTTime.StringToTime
Syntax
void StringToTime( String str, TIME_TYPE TimeType)
Parameters
- str [in] The string object to be converted.
- TimeType [in] The Time type format to be used in the conversion. The valid Time type formats are shown in "Time Types".
Description
Converts a String object to a CTTime object.
Return
None.
See Also
TimeToString()
CTTime.TimeToString
Syntax
String TimeToString(TIME_TYPE TimeType)
Parameters
- TimeType [in] The Time type format used to convert to string. The valid Time type formats are shown in "Time Types".
Description
Converts a packed CTTime object to a String object.
Return
TimeToString() returns a String object with the Time.
See Also
StringToTime()
CTTime.Unpack
Syntax
void Unpack(out int hour, out int minute, out int second)
Parameters
- hour [out] The unpacked hour.
- minute [out] The unpacked minute.
- second [out] The unpacked second.
Description
Unpacks a CTTime object into hour, minute and second values
Return
None.
See Also
DayOfWeek(), Hour(), Minute(), Pack(), Second()