Rogue Wave Views |
Rogue Wave Views Documentation Home |
Class for converting dates. More...
#include <ilviews/graphics/timeconverter.h>
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... | |
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
|
pure virtual |
Converts the specified double value to a IlDate
.
units | The double value to be converted. |
Implemented in IlvLinearTimeConverter.
|
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 |
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 2015, 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.