rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Prototypes Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvCounterAccessor Class Reference

Defines a counter. More...

#include <ilviews/protos/useracc.h>

Inheritance diagram for IlvCounterAccessor:
IlvUserAccessor IlvAccessor

List of all members.

Public Member Functions

 IlvCounterAccessor (const char *name, const IlvValueTypeClass *type, const char *counterValue, const char *maxValue)
 Creates a counter 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.

Detailed Description

Defines a counter.

Library: ilvproto

The IlvCounterAccessor class lets you define a counter. Modifying the value of this accessor causes another value to be incremented or the current value to be reset to 0 (if a maximum is reached).

Warning:
The undo/redo mechanism is implemented by storing attribute values before changing them, and then restoring them if the user has asked the previous operation to be undone. Because the side effect of the counter accessor is not reversible, it may affect correct behavior of undo/redo. It is not recommended to implement counters in prototypes or keep any other state information that should belong to the prototype model rather than to its presentation.

Constructor & Destructor Documentation

IlvCounterAccessor::IlvCounterAccessor ( const char *  name,
const IlvValueTypeClass type,
const char *  counterValue,
const char *  maxValue 
)

Creates a counter accessor of name name and type type.

counterValue is the name of the value to be incremented. maxValue is the maximum value. maxValue can contain a constant value, the name of another accessor, or an arithmetic expression that can contain accessor names and/or constants (see IlvUserAccessor::getValue).


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