rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvTimeConverter Class Reference

Class for converting dates. More...

#include <ilviews/graphics/timeconverter.h>

Inheritance diagram for IlvTimeConverter:
IlvLinearTimeConverter

List of all members.

Public Member Functions

 IlvTimeConverter (const IlvTimeConverter &)
 Copy Constructor.
 IlvTimeConverter (IlDate refTime)
 Constructor.
IlDate getReferenceTime ()
 Returns the reference time.
virtual IlDate getTime (IlDouble units)=0
 Converts the specified double value to a IlDate.
virtual IlDouble getUnits (IlDate time)=0
 Converts the specified IlDate to a double.
void lock ()
 Locks the time converter.
IlUInt refCount () const
 Get the time converter reference count.
void setReferenceTime (IlDate d)
 Sets the reference time.
virtual void unLock ()
 Unlocks the resource.

Detailed Description

Class for converting dates.

Library: views

An interface capable of converting double to a IlDate and a IlDate to a double. A time converter is used in the library by components that need to display time related information like the IlvTimeScale.


Constructor & Destructor Documentation

IlvTimeConverter::IlvTimeConverter ( IlDate  refTime  ) 

Constructor.

Create an IlvTimeConverter starting at the specified time

Parameters:
refTime The reference time for this converter.

Member Function Documentation

IlDate IlvTimeConverter::getReferenceTime (  ) 

Returns the reference time.

See also:
setReferenceTime
virtual IlDate IlvTimeConverter::getTime ( IlDouble  units  )  [pure virtual]

Converts the specified double value to a IlDate.

Parameters:
units The double value to be converted.

Implemented in IlvLinearTimeConverter.

virtual IlDouble IlvTimeConverter::getUnits ( IlDate  time  )  [pure virtual]

Converts the specified IlDate to a double.

Parameters:
time The IlDate to be converted.

Implemented in IlvLinearTimeConverter.

void IlvTimeConverter::lock (  ) 

Locks the time converter.

Ensures that your time converter will not be destroyed before it is unlocked.
This function increments a reference count initially set to 0. When you keep a pointer on a time converter (because you store it in the field of an object or it is in a variable), you should lock it for the duration of its use so that it is not destroyed by some other object or component. When you do not need the time converter any more, you should release it with a call to unLock; if the lock you just removed was the last one, Rogue Wave Views will free the time converter.

void IlvTimeConverter::setReferenceTime ( IlDate  d  ) 

Sets the reference time.

Parameters:
d The new reference time.
See also:
getReferenceTime
virtual void IlvTimeConverter::unLock (  )  [virtual]

Unlocks the resource.

This function decrements the reference count of the object, and deletes it if this count becomes 0. Resource management is closely concerned with the way resources are locked and unlocked.


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