/*
********************************************************************************
* *
* COPYRIGHT: *
* (C) Copyright Taligent, Inc., 1997 *
* (C) Copyright International Business Machines Corporation, 1997 *
* Licensed Material - Program-Property of IBM - All Rights Reserved. *
* US Government Users Restricted Rights - Use, duplication, or disclosure *
* restricted by GSA ADP Schedule Contract with IBM Corp. *
* *
********************************************************************************
*
* File FIELDPOS.H
*
* Modification History:
*
* Date Name Description
* 02/25/97 aliu Converted from java.
* 03/17/97 clhuang Updated per Format implementation.
********************************************************************************
*/
// *****************************************************************************
// This file was generated from the java source file FieldPosition.java
// *****************************************************************************
#ifndef _FIELDPOS
#define _FIELDPOS
#include "ptypes.h"
/**
* FieldPosition
is a simple class used by Format
* and its subclasses to identify fields in formatted output. Fields are
* identified by constants, whose names typically end with _FIELD
,
* defined in the various subclasses of Format
. See
* ERA_FIELD
and its friends in DateFormat
for
* an example.
*
*
* FieldPosition
keeps track of the position of the
* field within the formatted output with two indices: the index
* of the first character of the field and the index of the last
* character of the field.
*
*
* One version of the format
method in the various
* Format
classes requires a FieldPosition
* object as an argument. You use this format
method
* to perform partial formatting or to get information about the
* formatted output (such as the position of a field).
*
*
* Below is an example of using FieldPosition
to aid
* alignment of an array of formatted floating-point numbers on
* their decimal points:
*
* double doubleNum[] = {123456789.0, -12345678.9, 1234567.89, -123456.789,
* 12345.6789, -1234.56789, 123.456789, -12.3456789, 1.23456789};
* int dNumSize = (int)(sizeof(doubleNum)/sizeof(double));
*
* ErrorCode status = ZERO_ERROR;
* DecimalFormat* fmt = (DecimalFormat*) NumberFormat::createInstance(status);
* fmt->setDecimalSeparatorAlwaysShown(true);
*
* const int tempLen = 20;
* char temp[tempLen];
*
* for (int i=0; i