Views
Data Access Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Friends
IliTime Class Reference

User interface class. More...

#include <ilviews/dataccess/date.h>

Public Member Functions

 IliTime ()
 This constructor creates an IliTime object corresponding to 0h00.
 
 IliTime (const IliTime &time)
 This is the copy constructor of class IliTime.
 
 IliTime (IlInt hour, IlInt minu, IlInt sec)
 This constructor creates a time object whereby time is provided by the parameters hour, minutes and seconds. More...
 
IlInt getHour () const
 Returns the hours of the time object as an integer between 0 and 23. More...
 
IlInt getMilliseconds () const
 Returns the milliseconds of the time object as an integer between 0 and 999. More...
 
IlInt getMinutes () const
 Returns the minutes of the time object as an integer between 0 and 59. More...
 
IlInt getSeconds () const
 Returns the seconds of the time object as an integer between 0 and 59. More...
 
int operator!= (const IliTime &time) const
 This operator compares two times. More...
 
int operator< (const IliTime &time) const
 This operator compares two times. More...
 
int operator<= (const IliTime &time) const
 This operator compares two times. More...
 
IliTimeoperator= (const IliTime &time)
 This operator lets you copy one time into another. More...
 
int operator== (const IliTime &time) const
 This operator compares two times. More...
 
int operator> (const IliTime &time) const
 This operator compares two times. More...
 
int operator>= (const IliTime &time) const
 This operator compares two times. More...
 
void read (std::istream &input)
 Reads a time object from an input stream. More...
 
void setHour (IlInt h)
 Sets the hour of a time object. More...
 
void setMilliseconds (IlInt ms)
 Sets the milliseconds of a time object. More...
 
void setMinutes (IlInt m)
 Sets the minutes of a time object. More...
 
void setSeconds (IlInt s)
 Sets the seconds of a time object. More...
 
void write (std::ostream &output) const
 Writes a time object to an output stream in a format that allows the time to be read back by the read member function. More...
 

Friends

class IliDate
 

Detailed Description

User interface class.

Library: dataccess

The IliTime class is used to hold time information. This information may be represented by hh:mm:ss. This class can manage the milliseconds, however some databases does not support the milliseconds.

See also
IliFormat

Constructor & Destructor Documentation

◆ IliTime()

IliTime::IliTime ( IlInt  hour,
IlInt  minu,
IlInt  sec 
)

This constructor creates a time object whereby time is provided by the parameters hour, minutes and seconds.

Parameters
hourThe hours.
minuThe minutes.
secThe seconds.

Member Function Documentation

◆ getHour()

IlInt IliTime::getHour ( ) const

Returns the hours of the time object as an integer between 0 and 23.

Returns
The hours.

◆ getMilliseconds()

IlInt IliTime::getMilliseconds ( ) const

Returns the milliseconds of the time object as an integer between 0 and 999.

Returns
The milliseconds.

◆ getMinutes()

IlInt IliTime::getMinutes ( ) const

Returns the minutes of the time object as an integer between 0 and 59.

Returns
The minutes.

◆ getSeconds()

IlInt IliTime::getSeconds ( ) const

Returns the seconds of the time object as an integer between 0 and 59.

Returns
The seconds.

◆ operator!=()

int IliTime::operator!= ( const IliTime time) const

This operator compares two times.

Parameters
timeThe second time.
Returns
1 if the times are not equal, otherwise 0 .

◆ operator<()

int IliTime::operator< ( const IliTime time) const

This operator compares two times.

Parameters
timeThe second time.
Returns
1 if the first time is smaller than the second, otherwise 0.

◆ operator<=()

int IliTime::operator<= ( const IliTime time) const

This operator compares two times.

Parameters
timeThe second time.
Returns
1 if the first time is equal or smaller than the second, otherwise 0.

◆ operator=()

IliTime& IliTime::operator= ( const IliTime time)

This operator lets you copy one time into another.

Parameters
timeThe new time.
Returns
The modified object.

◆ operator==()

int IliTime::operator== ( const IliTime time) const

This operator compares two times.

Parameters
timeThe second time.
Returns
1 if the times are equal, otherwise 0.

◆ operator>()

int IliTime::operator> ( const IliTime time) const

This operator compares two times.

Parameters
timeThe second time.
Returns
1 if the first time is bigger than the second, otherwise 0.

◆ operator>=()

int IliTime::operator>= ( const IliTime time) const

This operator compares two times.

Parameters
timeThe second time.
Returns
1 if the first time is equal or bigger than the second, otherwise 0.

◆ read()

void IliTime::read ( std::istream &  input)

Reads a time object from an input stream.

Parameters
inputThe input stream.

◆ setHour()

void IliTime::setHour ( IlInt  h)

Sets the hour of a time object.

Parameters
hThe hours (an integer between 0 and 23).

◆ setMilliseconds()

void IliTime::setMilliseconds ( IlInt  ms)

Sets the milliseconds of a time object.

Parameters
msThe milliseconds (an integer between 0 and 999).

◆ setMinutes()

void IliTime::setMinutes ( IlInt  m)

Sets the minutes of a time object.

Parameters
mThe minutes (an integer between 0 and 59).

◆ setSeconds()

void IliTime::setSeconds ( IlInt  s)

Sets the seconds of a time object.

Parameters
sThe seconds (an integer between 0 and 59).

◆ write()

void IliTime::write ( std::ostream &  output) const

Writes a time object to an output stream in a format that allows the time to be read back by the read member function.

Parameters
outputThe output stream.