Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Format a float value into a string. More...
#include <ilviews/protos/useracc.h>
Public Member Functions | |
IlvFormatAccessor (const char *name, const IlvValueTypeClass *type, const char *formatValue, const char *maxCharsValue, const char *subacc) | |
Creates a new formatting accessor of name name and type type. | |
Protected Member Functions | |
virtual IlBoolean | changeValue (IlvAccessorHolder *object, const IlvValue &val) |
Called by the method IlvAccessible::changeValue for each IlvAccessor attached to the IlvAccessorHolder . |
Format a float value into a string.
Library: ilvproto
IlvFormatAccessor
is used to format a value and then assign the formatted value to another accessor.
IlvFormatAccessor::IlvFormatAccessor | ( | const char * | name, | |
const IlvValueTypeClass * | type, | |||
const char * | formatValue, | |||
const char * | maxCharsValue, | |||
const char * | subacc | |||
) |
Creates a new formatting accessor of name name and type type.
When the value specified by name is changed, it is formatted using formatValue, which must contain a formatting string as defined by the printf
C library function. The value is passed to the formatting function as a float
, so the format contained in formatValue should contain a g
or f
specifier. The formatted string is then assigned to the accessor specified by subAccessor. The maxCharsValue specifies the maximum length of the formatted string. If the string is longer, it is replaced by *
(star) characters. formatValue and maxCharsValue can contain a constant value, the name of another accessor, or an arithmetic expression that can contain accessor names and/or constants.
© 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.