Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Class for converting dates. More...
#include <ilviews/graphics/timeconverter.h>
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. |
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
.
IlvTimeConverter::IlvTimeConverter | ( | IlDate | refTime | ) |
Constructor.
Create an IlvTimeConverter
starting at the specified time
refTime | The reference time for this converter. |
IlDate IlvTimeConverter::getReferenceTime | ( | ) |
Returns the reference time.
setReferenceTime
virtual IlDate IlvTimeConverter::getTime | ( | IlDouble | units | ) | [pure virtual] |
Converts the specified double value to a IlDate
.
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
.
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 | ) |
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.