rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Data Access Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IliFormatIpl Class Reference

Class. More...

#include <ilviews/dataccess/format.h>

Inheritance diagram for IliFormatIpl:
IliRefCounted

List of all members.

Public Member Functions

 IliFormatIpl (const char *name)
 Initializes a format implementation.
virtual void formatBoolean (IliString &dest, IlBoolean val) const
 Formats Boolean and appends the result to a string.
virtual void formatDate (IliString &dest, const IliDate &val) const
 Formats date and appends the result to a string.
virtual void formatDouble (IliString &dest, IlDouble val) const
 Formats double and appends the result to a string.
virtual void formatFloat (IliString &dest, IlFloat val) const
 Formats float and appends the result to a string.
virtual void formatInteger (IliString &dest, IlInt val) const
 Formats integer and appends the result to a string.
virtual void formatString (IliString &dest, const char *val) const
 Formats string and appends the result to another string.
virtual void formatTime (IliString &dest, const IliTime &val) const
 Formats time and appends the result to a string.
virtual IliFormatType getType () const
 Returns the type of the format implementation.
IlBoolean isEditModeOn () const
 Returns IlTrue if the value currently formatted is being edited by the end user.

Static Public Member Functions

static void AddCustomFormat (IliFormatIpl *ipl)
 Registers a format implementation.
static void RemoveCustomFormat (IliFormatIpl *)
 Unregisters a format implementation.

Friends

class IliFormat

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:
name The 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:
ipl The format implementation.
virtual void IliFormatIpl::formatBoolean ( IliString dest,
IlBoolean  val 
) const [virtual]

Formats Boolean and appends the result to a string.

Parameters:
dest The destination string.
val The value.
virtual void IliFormatIpl::formatDate ( IliString dest,
const IliDate val 
) const [virtual]

Formats date and appends the result to a string.

Parameters:
dest The destination string.
val The value.
virtual void IliFormatIpl::formatDouble ( IliString dest,
IlDouble  val 
) const [virtual]

Formats double and appends the result to a string.

Parameters:
dest The destination string.
val The value.
virtual void IliFormatIpl::formatFloat ( IliString dest,
IlFloat  val 
) const [virtual]

Formats float and appends the result to a string.

Parameters:
dest The destination string.
val The value.
virtual void IliFormatIpl::formatInteger ( IliString dest,
IlInt  val 
) const [virtual]

Formats integer and appends the result to a string.

Parameters:
dest The destination string.
val The value.
virtual void IliFormatIpl::formatString ( IliString dest,
const char *  val 
) const [virtual]

Formats string and appends the result to another string.

Parameters:
dest The destination string.
val The value.
virtual void IliFormatIpl::formatTime ( IliString dest,
const IliTime val 
) const [virtual]

Formats time and appends the result to a string.

Parameters:
dest The destination string.
val The 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  )  [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:
ipl The format implementation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends

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