OpenMW
Public Types | Public Member Functions | Private Attributes
MWMechanics::DynamicStat< T > Class Template Reference

#include <stat.hpp>

List of all members.

Public Types

typedef T Type

Public Member Functions

 DynamicStat ()
 DynamicStat (T base)
 DynamicStat (T base, T modified, T current)
 DynamicStat (const Stat< T > &stat, T current)
const T & getBase () const
getModified () const
const T & getCurrent () const
void set (const T &value)
 Set base, modified and current to value.
void setBase (const T &value)
 Set base and adjust modified accordingly.
void setModified (T value, const T &min, const T &max=std::numeric_limits< T >::max())
 Set modified value an adjust base accordingly.
void modify (const T &diff)
 Change modified relatively.
void setCurrent (const T &value, bool allowDecreaseBelowZero=false)
void setModifier (const T &modifier)

Private Attributes

Stat< T > mStatic
mCurrent

template<typename T>
class MWMechanics::DynamicStat< T >


Member Typedef Documentation

template<typename T>
typedef T MWMechanics::DynamicStat< T >::Type

Constructor & Destructor Documentation

template<typename T>
MWMechanics::DynamicStat< T >::DynamicStat ( ) [inline]
template<typename T>
MWMechanics::DynamicStat< T >::DynamicStat ( base) [inline]
template<typename T>
MWMechanics::DynamicStat< T >::DynamicStat ( base,
modified,
current 
) [inline]
template<typename T>
MWMechanics::DynamicStat< T >::DynamicStat ( const Stat< T > &  stat,
current 
) [inline]

Member Function Documentation

template<typename T>
const T& MWMechanics::DynamicStat< T >::getBase ( ) const [inline]
template<typename T>
const T& MWMechanics::DynamicStat< T >::getCurrent ( ) const [inline]
template<typename T>
T MWMechanics::DynamicStat< T >::getModified ( ) const [inline]
template<typename T>
void MWMechanics::DynamicStat< T >::modify ( const T &  diff) [inline]

Change modified relatively.

template<typename T>
void MWMechanics::DynamicStat< T >::set ( const T &  value) [inline]

Set base, modified and current to value.

template<typename T>
void MWMechanics::DynamicStat< T >::setBase ( const T &  value) [inline]

Set base and adjust modified accordingly.

template<typename T>
void MWMechanics::DynamicStat< T >::setCurrent ( const T &  value,
bool  allowDecreaseBelowZero = false 
) [inline]
template<typename T>
void MWMechanics::DynamicStat< T >::setModified ( value,
const T &  min,
const T &  max = std::numeric_limits<T>::max() 
) [inline]

Set modified value an adjust base accordingly.

template<typename T>
void MWMechanics::DynamicStat< T >::setModifier ( const T &  modifier) [inline]

Member Data Documentation

template<typename T>
T MWMechanics::DynamicStat< T >::mCurrent [private]
template<typename T>
Stat<T> MWMechanics::DynamicStat< T >::mStatic [private]

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