OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
MWMechanics::Stat< T > Class Template Reference

#include <stat.hpp>

Collaboration diagram for MWMechanics::Stat< T >:

Public Types

typedef T Type
 

Public Member Functions

 Stat ()
 
 Stat (T base)
 
 Stat (T base, T modified)
 
const TgetBase () const
 
T getModified () const
 
T getCurrentModified () const
 
T getModifier () const
 
T getCurrentModifier () const
 
void set (const T &value)
 Set base and modified to value. More...
 
void setBase (const T &value)
 Set base and adjust modified accordingly. More...
 
void setModified (T value, const T &min, const T &max=std::numeric_limits< T >::max())
 Set modified value and adjust base accordingly. More...
 
void setCurrentModified (T value)
 
void setModifier (const T &modifier)
 
void setCurrentModifier (const T &modifier)
 
void writeState (ESM::StatState< T > &state) const
 
void readState (const ESM::StatState< T > &state)
 

Private Attributes

T mBase
 
T mModified
 
T mCurrentModified
 

Member Typedef Documentation

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

Constructor & Destructor Documentation

template<typename T >
MWMechanics::Stat< T >::Stat ( )
template<typename T>
MWMechanics::Stat< T >::Stat ( T  base)
template<typename T>
MWMechanics::Stat< T >::Stat ( T  base,
T  modified 
)

Member Function Documentation

template<typename T >
const T & MWMechanics::Stat< T >::getBase ( ) const

Here is the caller graph for this function:

template<typename T >
T MWMechanics::Stat< T >::getCurrentModified ( ) const
template<typename T >
T MWMechanics::Stat< T >::getCurrentModifier ( ) const
template<typename T >
T MWMechanics::Stat< T >::getModified ( ) const

Here is the caller graph for this function:

template<typename T >
T MWMechanics::Stat< T >::getModifier ( ) const
template<typename T>
void MWMechanics::Stat< T >::readState ( const ESM::StatState< T > &  state)
template<typename T>
void MWMechanics::Stat< T >::set ( const T value)

Set base and modified to value.

template<typename T>
void MWMechanics::Stat< T >::setBase ( const T value)

Set base and adjust modified accordingly.

Here is the caller graph for this function:

template<typename T>
void MWMechanics::Stat< T >::setCurrentModified ( T  value)

Set "current modified," used for drain and fortify. Unlike the regular modifier this just adds and subtracts from the current value without changing the maximum.

template<typename T>
void MWMechanics::Stat< T >::setCurrentModifier ( const T modifier)
template<typename T>
void MWMechanics::Stat< T >::setModified ( T  value,
const T min,
const T max = std::numeric_limits<T>::max() 
)

Set modified value and adjust base accordingly.

Here is the caller graph for this function:

template<typename T>
void MWMechanics::Stat< T >::setModifier ( const T modifier)

Here is the caller graph for this function:

template<typename T>
void MWMechanics::Stat< T >::writeState ( ESM::StatState< T > &  state) const

Member Data Documentation

template<typename T>
T MWMechanics::Stat< T >::mBase
private
template<typename T>
T MWMechanics::Stat< T >::mCurrentModified
private
template<typename T>
T MWMechanics::Stat< T >::mModified
private

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