QicsTable Documentation Set

QicsDataItemSprintfFormatter Class Reference

Formatter that uses sprintf formatting commands. More...

#include <QicsDataItemFormatter.h>

Inherits QicsDataItemFormatter.

List of all members.

Public Member Functions

 QicsDataItemSprintfFormatter ()
virtual ~QicsDataItemSprintfFormatter ()
virtual QString format (const QicsDataItem &itm) const
void addFormatString (QicsDataItemType type, const char *format_string)
void removeFormatString (QicsDataItemType type)

Protected Types

typedef QVector< QicsFormatPair > QicsFormatPairV

Protected Attributes

QicsFormatPairV myFormats

Detailed Description

Formatter that uses sprintf formatting commands.

QicsDataItemSprintfFormatter is an implementation of the QicsDataItemFormatter interface that uses sprintf-type formatting strings when formatting data items. The programmer provides separate formatting strings for each data type by calling QicsDataItemFormatter::addFormatString. If no formatting string has been added for a type, that type will not be formatted -- its default string representation will be returned.

Constructor & Destructor Documentation

QicsDataItemSprintfFormatter::QicsDataItemSprintfFormatter  ) 

Constructs an empty formatter.

virtual QicsDataItemSprintfFormatter::~QicsDataItemSprintfFormatter  )  [virtual]


Member Function Documentation

void QicsDataItemSprintfFormatter::addFormatString QicsDataItemType  type,
const char *  format_string

Adds the sprintf formatting string format_string to the formatter. This format string will be used when formatting data items of type type.

virtual QString QicsDataItemSprintfFormatter::format const QicsDataItem itm  )  const [virtual]

Returns a formatted string representing the data item itm.

Implements QicsDataItemFormatter.

void QicsDataItemSprintfFormatter::removeFormatString QicsDataItemType  type  ) 

Removes the current formatting string (if any) for type type from the formatter.

The documentation for this class was generated from the following file:

All trademarks and copyrights on this page are properties of their respective owners.
The rest is copyright 1999-2006 Integrated Computer Solutions, Inc.