NumberWrapper Class Template Reference

#include <C:/Work/specialnumbers_svn/NumberLib/NumbersLib/NumberWrapper.h>

Inheritance diagram for NumberWrapper:

UpdateableNumber

List of all members.


Detailed Description

template<class T>
class luma::numbers::NumberWrapper< T >

This class is a drop-in substitute for RangedNumbers, except that it has no logic wrapped around it's value - that is, gertValue will always returned the last value passed to setValue.

This class is useful for debugging purposes (for example, testing something without filtering), and should not be used in production code.

It might be removed in the future.

Definition at line 25 of file NumberWrapper.h.


Public Member Functions

getValue () const
 Returns the value of this NumberWrapper, that is either the last value passed to setValue, or if it has not been called, the value passed to the constructor.
 NumberWrapper (T value, T min, T max, T increment)
 Constructs a new NumberWrapper with the given initial value.
 NumberWrapper (T value)
 Constructs a new NumberWrapper with the given initial value.
void setValue (T value, float elapsedTime=1.0f)
 Sets the value of this NumberWrapper to the given value.

Private Attributes

mValue

Constructor & Destructor Documentation

NumberWrapper ( value  )  [inline]

Constructs a new NumberWrapper with the given initial value.

Definition at line 58 of file NumberWrapper.h.

NumberWrapper ( value,
min,
max,
increment 
) [inline]

Constructs a new NumberWrapper with the given initial value.

Other parameters are ignored.

Definition at line 64 of file NumberWrapper.h.


Member Function Documentation

T getValue (  )  const [inline, virtual]

Returns the value of this NumberWrapper, that is either the last value passed to setValue, or if it has not been called, the value passed to the constructor.

Implements UpdateableNumber.

Definition at line 76 of file NumberWrapper.h.

References NumberWrapper::mValue.

void setValue ( value,
float  elapsedTime = 1.0f 
) [inline, virtual]

Sets the value of this NumberWrapper to the given value.

The elapsedTime parameter is ignored.

Implements UpdateableNumber.

Definition at line 70 of file NumberWrapper.h.

References NumberWrapper::mValue.


Member Data Documentation

T mValue [private]

Definition at line 54 of file NumberWrapper.h.

Referenced by NumberWrapper::getValue(), and NumberWrapper::setValue().


The documentation for this class was generated from the following file:

Generated on Sun Sep 21 20:49:08 2008 for Numbers by  doxygen 1.5.6