NLMISC::IProgressCallback Class Reference

#include <progress_callback.h>


Detailed Description

Progress callback interface
Author:
Cyril 'Hulud' Corvazier

Nevrax France

Date:
2002

Definition at line 41 of file progress_callback.h.

Public Member Functions

float getCropedValue (float value) const
 IProgressCallback ()
void popCropedValues ()
virtual void progress (float progressValue)
void pushCropedValues (float min, float max)
virtual ~IProgressCallback ()

Data Fields

std::string DisplayString
 Display string.


Private Attributes

std::vector< CCropedValues_CropedValues


Constructor & Destructor Documentation

NLMISC::IProgressCallback::IProgressCallback  ) 
 

Definition at line 40 of file progress_callback.cpp.

References _CropedValues.

00041 {
00042         _CropedValues.push_back (CCropedValues (0, 1));
00043 }

virtual NLMISC::IProgressCallback::~IProgressCallback  )  [inline, virtual]
 

Definition at line 46 of file progress_callback.h.

00046 {}


Member Function Documentation

float NLMISC::IProgressCallback::getCropedValue float  value  )  const
 

Get croped value

Definition at line 33 of file progress_callback.cpp.

References _CropedValues, NLMISC::IProgressCallback::CCropedValues::Max, NLMISC::IProgressCallback::CCropedValues::Min, nlassert, and value.

Referenced by pushCropedValues().

00034 {
00035         nlassert (_CropedValues.size ()>0);
00036         const CCropedValues &values = _CropedValues.back ();
00037         return value*(values.Max-values.Min)+values.Min;
00038 }

void NLMISC::IProgressCallback::popCropedValues  ) 
 

Push crop values

Definition at line 52 of file progress_callback.cpp.

References _CropedValues, and nlassert.

00053 {
00054         nlassert (_CropedValues.size ()>1);
00055         _CropedValues.pop_back ();
00056 }

void NLMISC::IProgressCallback::progress float  progressValue  )  [virtual]
 

Call back

progressValue should be 0 ~ 1

Definition at line 58 of file progress_callback.cpp.

Referenced by NL3D::CLandscapeUser::flushTiles(), NLSOUND::CAudioMixerUser::init(), NL3D::CShapeBank::preLoadShapes(), and NL3D::CLandscapeUser::refreshAllZonesAround().

00059 {
00060 }

void NLMISC::IProgressCallback::pushCropedValues float  min,
float  max
 

Push crop values

Definition at line 45 of file progress_callback.cpp.

References _CropedValues, getCropedValue(), min, and nlassert.

00046 {
00047         nlassert (_CropedValues.size ()>0);
00048         //const CCropedValues &values = _CropedValues.back ();
00049         _CropedValues.push_back (CCropedValues (getCropedValue (min), getCropedValue (max)));
00050 }


Field Documentation

std::vector<CCropedValues> NLMISC::IProgressCallback::_CropedValues [private]
 

Definition at line 89 of file progress_callback.h.

Referenced by getCropedValue(), IProgressCallback(), popCropedValues(), and pushCropedValues().

std::string NLMISC::IProgressCallback::DisplayString
 

Display string.

Definition at line 73 of file progress_callback.h.


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 13:46:59 2004 for NeL by doxygen 1.3.6