rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlTimeUnit Class Reference

Base class representing a time unit (second, hour, year...). More...

#include <ilog/date.h>

Inheritance diagram for IlTimeUnit:
IlTimeUnitDay IlTimeUnitHour IlTimeUnitMilliSecond IlTimeUnitMinute IlTimeUnitMonth IlTimeUnitQuarter IlTimeUnitSecond IlTimeUnitWeek IlTimeUnitYear

List of all members.

Public Member Functions

 IlTimeUnit ()
 Constructor.
virtual void addTimeUnit (IlCalendar &date) const =0
 Increments the given IlCalendar date by the time unit.
virtual IlTimeUnitcopy () const =0
 Returns an IlTimeUnit of the same type as the current object.
virtual IlDouble getMillis () const =0
 Returns the duration of this time unit in milliseconds.
virtual void snapToPreviousTimeUnit (IlCalendar &cal) const =0
 Snaps the given IlCalendar date to the previous time unit.
virtual char * toString (IlDouble date) const =0
 Returns a string representing the date according to this unit.

Detailed Description

Base class representing a time unit (second, hour, year...).

Library: ilog

IlTimeUnit is the base class from which time unit classes are derived (seconds, minutes, days, weeks, and so on).

See also:
IlvTimeScaleStepsUpdater

Member Function Documentation

virtual void IlTimeUnit::addTimeUnit ( IlCalendar date  )  const [pure virtual]

Increments the given IlCalendar date by the time unit.

For instance, if the unit is minutes, adds one minute to the date.

Implemented in IlTimeUnitMilliSecond, IlTimeUnitSecond, IlTimeUnitMinute, IlTimeUnitHour, IlTimeUnitDay, IlTimeUnitWeek, IlTimeUnitMonth, IlTimeUnitQuarter, and IlTimeUnitYear.

virtual void IlTimeUnit::snapToPreviousTimeUnit ( IlCalendar cal  )  const [pure virtual]

Snaps the given IlCalendar date to the previous time unit.

For instance, if the unit is minutes, seconds and milliseconds will be set to 0.

Implemented in IlTimeUnitMilliSecond, IlTimeUnitSecond, IlTimeUnitMinute, IlTimeUnitHour, IlTimeUnitDay, IlTimeUnitWeek, IlTimeUnitMonth, IlTimeUnitQuarter, and IlTimeUnitYear.

virtual char* IlTimeUnit::toString ( IlDouble  date  )  const [pure virtual]

Returns a string representing the date according to this unit.

Returns an allocated string, which should be deleted with delete[].

Parameters:
date : the date to convert.

© 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.