Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvTimeConverter Class Referenceabstract

Class for converting dates. More...

#include <ilviews/graphics/timeconverter.h>

Inheritance diagram for IlvTimeConverter:
IlvLinearTimeConverter

Public Member Functions

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

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
refTimeThe 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
unitsThe double value to be converted.

Implemented in IlvLinearTimeConverter.

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

Converts the specified IlDate to a double.

Parameters
timeThe 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
dThe 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 2016, 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.