rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Data Access Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IliTime Class Reference

User interface class. More...

#include <ilviews/dataccess/date.h>

List of all members.

Public Member Functions

 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.
 IliTime ()
 This constructor creates an IliTime object corresponding to 0h00.
IlInt getHour () const
 Returns the hours of the time object as an integer between 0 and 23.
IlInt getMilliseconds () const
 Returns the milliseconds of the time object as an integer between 0 and 999.
IlInt getMinutes () const
 Returns the minutes of the time object as an integer between 0 and 59.
IlInt getSeconds () const
 Returns the seconds of the time object as an integer between 0 and 59.
int operator!= (const IliTime &time) const
 This operator compares two times.
int operator< (const IliTime &time) const
 This operator compares two times.
int operator<= (const IliTime &time) const
 This operator compares two times.
IliTimeoperator= (const IliTime &time)
 This operator lets you copy one time into another.
int operator== (const IliTime &time) const
 This operator compares two times.
int operator> (const IliTime &time) const
 This operator compares two times.
int operator>= (const IliTime &time) const
 This operator compares two times.
void read (IL_STDPREF istream &input)
 Reads a time object from an input stream.
void setHour (IlInt h)
 Sets the hour of a time object.
void setMilliseconds (IlInt ms)
 Sets the milliseconds of a time object.
void setMinutes (IlInt m)
 Sets the minutes of a time object.
void setSeconds (IlInt s)
 Sets the seconds of a time object.
void write (IL_STDPREF 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.

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 ( IlInt  hour,
IlInt  minu,
IlInt  sec 
)

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

Parameters:
hour The hours.
minu The minutes.
sec The seconds.

Member Function Documentation

IlInt IliTime::getHour (  )  const

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

Returns:
The hours.
IlInt IliTime::getMilliseconds (  )  const

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

Returns:
The milliseconds.
IlInt IliTime::getMinutes (  )  const

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

Returns:
The minutes.
IlInt IliTime::getSeconds (  )  const

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

Returns:
The seconds.
int IliTime::operator!= ( const IliTime time  )  const

This operator compares two times.

Parameters:
time The second time.
Returns:
1 if the times are not equal, otherwise 0 .
int IliTime::operator< ( const IliTime time  )  const

This operator compares two times.

Parameters:
time The second time.
Returns:
1 if the first time is smaller than the second, otherwise 0.
int IliTime::operator<= ( const IliTime time  )  const

This operator compares two times.

Parameters:
time The second time.
Returns:
1 if the first time is equal or smaller than the second, otherwise 0.
IliTime& IliTime::operator= ( const IliTime time  ) 

This operator lets you copy one time into another.

Parameters:
time The new time.
Returns:
The modified object.
int IliTime::operator== ( const IliTime time  )  const

This operator compares two times.

Parameters:
time The second time.
Returns:
1 if the times are equal, otherwise 0.
int IliTime::operator> ( const IliTime time  )  const

This operator compares two times.

Parameters:
time The second time.
Returns:
1 if the first time is bigger than the second, otherwise 0.
int IliTime::operator>= ( const IliTime time  )  const

This operator compares two times.

Parameters:
time The second time.
Returns:
1 if the first time is equal or bigger than the second, otherwise 0.
void IliTime::read ( IL_STDPREF istream &  input  ) 

Reads a time object from an input stream.

Parameters:
input The input stream.
void IliTime::setHour ( IlInt  h  ) 

Sets the hour of a time object.

Parameters:
h The hours (an integer between 0 and 23).
void IliTime::setMilliseconds ( IlInt  ms  ) 

Sets the milliseconds of a time object.

Parameters:
ms The milliseconds (an integer between 0 and 999).
void IliTime::setMinutes ( IlInt  m  ) 

Sets the minutes of a time object.

Parameters:
m The minutes (an integer between 0 and 59).
void IliTime::setSeconds ( IlInt  s  ) 

Sets the seconds of a time object.

Parameters:
s The seconds (an integer between 0 and 59).
void IliTime::write ( IL_STDPREF 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:
output The output stream.

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.