API Guides > ConceptRT 3.x
Time Class Reference

Time features in hour, minute, secondes, etc. More...

Detailed Description

Time features in hour, minute, secondes, etc.

+ Inheritance diagram for Time:

Public Member Methods

 Time ()
 Default constructor. More...
 
 Time (Int32 hour, Int32 minute, Int32 second=0, Int32 millisecond=0, Int32 microsecond=0)
 Default constructor. More...
 
 Time (const String &text)
 Explicit convertion from String. More...
 
void SetTime (Int32 hour, Int32 minute, Int32 second=0, Int32 millisecond=0, Int32 microsecond=0)
 Sets the time. More...
 
void GetTime (Int32 &hour, Int32 &minute, Int32 &second, Int32 &millisecond, Int32 &microsecond)
 Gets the time. More...
 
Int32 GetHour () const
 Gets the hour part of time structure. More...
 
Int32 GetMinute () const
 Gets the minute part of time structure. More...
 
Int32 GetSecond () const
 Gets the second part of time structure. More...
 
Int32 GetMillisecond () const
 Gets the millisecond part of time structure. More...
 
Int32 GetMicrosecond () const
 Gets the microsecond part of time structure. More...
 
TimeStamp ToTimeStamp () const
 Converts the time to a time stamp. More...
 
void ConvertFrom (PCChar8 text)
 Convert from. More...
 
void ConvertTo (BaseStaticString &text) const
 Convert to. More...
 
Timeoperator+= (const TimeSpan &timeSpan)
 Addition assignment operator. More...
 
Timeoperator-= (const TimeSpan &timeSpan)
 Subtraction assignment operator. More...
 

Constructor & Destructor Documentation

Time ( )

Default constructor.

Time ( Int32  hour,
Int32  minute,
Int32  second = 0,
Int32  millisecond = 0,
Int32  microsecond = 0 
)

Default constructor.

Parameters
hourThe hour.
minuteThe minute.
second(optional) the second.
millisecond(optional) the millisecond.
microsecond(optional) the microsecond.
RT Exceptions:
RT_ERROR_BAD_PARAMETER
Time ( const String text)
explicit

Explicit convertion from String.

Parameters
textThe text containing the time value. ("13:45:21")
RT Exceptions:
RT_ERROR_BAD_PARAMETER

Methods Documentation

void ConvertFrom ( PCChar8  text)
virtual

Convert from.

Parameters
textThe text. Time text format : "0:00:00"
RT Exceptions:
RT_ERROR_BAD_PARAMETER

Implements IStringConvertible.

void ConvertTo ( BaseStaticString text) const
virtual

Convert to.

Parameters
text[in,out] The text.

Implements IStringConvertible.

Int32 GetHour ( ) const

Gets the hour part of time structure.

Returns
The hour.
Int32 GetMicrosecond ( ) const

Gets the microsecond part of time structure.

Returns
The microsecond.
Int32 GetMillisecond ( ) const

Gets the millisecond part of time structure.

Returns
The millisecond.
Int32 GetMinute ( ) const

Gets the minute part of time structure.

Returns
The minute.
Int32 GetSecond ( ) const

Gets the second part of time structure.

Returns
The second.
void GetTime ( Int32 hour,
Int32 minute,
Int32 second,
Int32 millisecond,
Int32 microsecond 
)

Gets the time.

Parameters
hour[in,out] The hour.
minute[in,out] The minute.
second[in,out] The second.
millisecond[in,out] The millisecond.
microsecond[in,out] The microsecond.
Time& operator+= ( const TimeSpan timeSpan)

Addition assignment operator.

Parameters
timeSpanThe time span.
Returns
The result of the operation.
Time& operator-= ( const TimeSpan timeSpan)

Subtraction assignment operator.

Parameters
timeSpanThe time span.
Returns
The result of the operation.
void SetTime ( Int32  hour,
Int32  minute,
Int32  second = 0,
Int32  millisecond = 0,
Int32  microsecond = 0 
)

Sets the time.

Parameters
hourThe hour.
minuteThe minute.
second(optional) the second.
millisecond(optional) the millisecond.
microsecond(optional) the microsecond.
RT Exceptions:
RT_ERROR_BAD_PARAMETER
TimeStamp ToTimeStamp ( ) const

Converts the time to a time stamp.

Returns
The TimeStamp.