Public Member Functions

KeyReduceStatus Class Reference

Search for all occurrences

Detailed Description

See also:
Function ApplyKeyReduction.

Description:
A callback object so the progress of key reduction can be checked and controlled. This class is used in conjunction with function ApplyKeyReduction.

#include <keyreduc.h>

Inheritance diagram for KeyReduceStatus:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual  ~KeyReduceStatus ()
virtual void  Init (int total)=0
virtual int  Progress (int p)=0

Constructor & Destructor Documentation

virtual ~KeyReduceStatus ( ) [inline, virtual]
{}

Member Function Documentation

virtual void Init ( int  total ) [pure virtual]
Remarks:
This method is called once before key reduction starts. It passes in the total number of keys that may potentially be reduced.
Parameters:
int total

The total number of reduction candidate keys.
virtual int Progress ( int  p ) [pure virtual]
Remarks:
This is called every so often during key reduction. The number of keys process so far is passed in, so the percentage complete can be calculated as p/total * 100. This method should return a value to indicate if processing should proceed.
Parameters:
int p

The number of keys processed so far.
Returns:
Return one of the following values to indicate if processing should continue.

KEYREDUCE_ABORT

Stops processing and undoes any key reduction.

KEYREDUCE_STOP

Stops processing, but keeps any reduction done so far.

KEYREDUCE_CONTINUE

Keeps going.

KeyReduceStatus KeyReduceStatus KeyReduceStatus KeyReduceStatus KeyReduceStatus KeyReduceStatus KeyReduceStatus KeyReduceStatus KeyReduceStatus KeyReduceStatus
KeyReduceStatus KeyReduceStatus KeyReduceStatus KeyReduceStatus KeyReduceStatus KeyReduceStatus KeyReduceStatus KeyReduceStatus KeyReduceStatus KeyReduceStatus