rwlogo

Rogue Wave Views
Data Access Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator
List of all members | Public Member Functions | Static Public Member Functions | Friends
IliFormatIpl Class Reference

Class. More...

#include <ilviews/dataccess/format.h>

Inheritance diagram for IliFormatIpl:
IliRefCounted

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

Detailed Description

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.

See Also
IliFormat

Constructor & Destructor Documentation

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.

Parameters
nameThe name.

Member Function Documentation

static void IliFormatIpl::AddCustomFormat ( IliFormatIpl ipl)
static

Registers a format implementation.

This static member function is usually called at initialization time to register user defined format implementations.

Parameters
iplThe format implementation.
virtual void IliFormatIpl::formatBoolean ( IliString dest,
IlBoolean  val 
) const
virtual

Formats Boolean and appends the result to a string.

Parameters
destThe destination string.
valThe value.
virtual void IliFormatIpl::formatDate ( IliString dest,
const IliDate val 
) const
virtual

Formats date and appends the result to a string.

Parameters
destThe destination string.
valThe value.
virtual void IliFormatIpl::formatDouble ( IliString dest,
IlDouble  val 
) const
virtual

Formats double and appends the result to a string.

Parameters
destThe destination string.
valThe value.
virtual void IliFormatIpl::formatFloat ( IliString dest,
IlFloat  val 
) const
virtual

Formats float and appends the result to a string.

Parameters
destThe destination string.
valThe value.
virtual void IliFormatIpl::formatInteger ( IliString dest,
IlInt  val 
) const
virtual

Formats integer and appends the result to a string.

Parameters
destThe destination string.
valThe value.
virtual void IliFormatIpl::formatString ( IliString dest,
const char *  val 
) const
virtual

Formats string and appends the result to another string.

Parameters
destThe destination string.
valThe value.
virtual void IliFormatIpl::formatTime ( IliString dest,
const IliTime val 
) const
virtual

Formats time and appends the result to a string.

Parameters
destThe destination string.
valThe value.
virtual IliFormatType IliFormatIpl::getType ( ) const
virtual

Returns the type of the format implementation.

It should be one of the following:

  • IliStringFormatType
  • IliNumberFormatType
  • IliDateFormatType
Returns
The type.
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.

Returns
IlTrue if the value currently formatted is being edited by the end user.
static void IliFormatIpl::RemoveCustomFormat ( IliFormatIpl ipl)
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.

Parameters
iplThe format implementation.

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