Rogue Wave Views Data Access Package API Reference Guide |
Rogue Wave Views Documentation Home |
Class. More...
#include <ilviews/dataccess/format.h>
Public Member Functions | |
IliFormatIpl (const char *name) | |
Initializes a format implementation. More... | |
virtual void | formatBoolean (IliString &dest, IlBoolean val) const |
Formats Boolean and appends the result to a string. More... | |
virtual void | formatDate (IliString &dest, const IliDate &val) const |
Formats date and appends the result to a string. More... | |
virtual void | formatDouble (IliString &dest, IlDouble val) const |
Formats double and appends the result to a string. More... | |
virtual void | formatFloat (IliString &dest, IlFloat val) const |
Formats float and appends the result to a string. More... | |
virtual void | formatInteger (IliString &dest, IlInt val) const |
Formats integer and appends the result to a string. More... | |
virtual void | formatString (IliString &dest, const char *val) const |
Formats string and appends the result to another string. More... | |
virtual void | formatTime (IliString &dest, const IliTime &val) const |
Formats time and appends the result to a string. More... | |
virtual IliFormatType | getType () const |
Returns the type of the format implementation. More... | |
IlBoolean | isEditModeOn () const |
Returns IlTrue if the value currently formatted is being edited by the end user. More... | |
Public Member Functions inherited from IliRefCounted | |
IlInt | getRefCount () const |
Returns the reference count of the object. Initially, this property is set to 0 . More... | |
void | lock () const |
Increments the reference count of the object. | |
void | unLock () const |
Decrements the reference count of the object. More... | |
Static Public Member Functions | |
static void | AddCustomFormat (IliFormatIpl *ipl) |
Registers a format implementation. More... | |
static void | RemoveCustomFormat (IliFormatIpl *ipl) |
Unregisters a format implementation. More... | |
Friends | |
class | IliFormat |
Additional Inherited Members | |
Protected Member Functions inherited from IliRefCounted | |
virtual | ~IliRefCounted () |
This is the virtual destructor of the IliRefCounted class. More... | |
Class.
Library: dataccess
This class defines objects that implement formats. Each IliFormat
object holds a pointer to an IliFormatIpl
object to which it delegates all formatting tasks. It is thus possible to code new formats in C++ by subclassing IliFormatIpl
and creating one instance of this subclass at initialization time.
IliFormatIpl::IliFormatIpl | ( | const char * | name | ) |
Initializes a format implementation.
Once a format implementation has been created, it can be registered in the system by calling the AddCustomFormat
static member function.
name | The name. |
|
static |
Registers a format implementation.
This static member function is usually called at initialization time to register user defined format implementations.
ipl | The format implementation. |
Formats Boolean and appends the result to a string.
dest | The destination string. |
val | The value. |
Formats date and appends the result to a string.
dest | The destination string. |
val | The value. |
Formats double and appends the result to a string.
dest | The destination string. |
val | The value. |
Formats float and appends the result to a string.
dest | The destination string. |
val | The value. |
Formats integer and appends the result to a string.
dest | The destination string. |
val | The value. |
|
virtual |
Formats string and appends the result to another string.
dest | The destination string. |
val | The value. |
Formats time and appends the result to a string.
dest | The destination string. |
val | The value. |
|
virtual |
Returns the type of the format implementation.
It should be one of the following:
IliStringFormatType
IliNumberFormatType
IliDateFormatType
IlBoolean IliFormatIpl::isEditModeOn | ( | ) | const |
Returns IlTrue
if the value currently formatted is being edited by the end user.
This member function can be called from one of the formatXXX
virtual member functions.
When the edit mode is on, the format member functions may want to ensure that the maximum precision is included in the formatted result so that end user does not inadvertantly truncate the value.
IlTrue
if the value currently formatted is being edited by the end user.
|
static |
Unregisters a format implementation.
This static member function is seldom called by user code since all format implementations are automatically unregistered at program termination time.
ipl | The format implementation. |
© Copyright 2018, 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.