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::DynamicStat< T > Class Template Reference

#include <windowmanager.hpp>

Collaboration diagram for MWMechanics::DynamicStat< T >:

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
 
getCurrentModified () const
 
const T & getCurrent () const
 
void set (const T &value)
 Set base, modified and current 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 setCurrent (const T &value, bool allowDecreaseBelowZero=false, bool allowIncreaseAboveModified=false)
 
void setModifier (const T &modifier, bool allowCurrentToDecreaseBelowZero=false)
 
void setCurrentModifier (const T &modifier, bool allowCurrentToDecreaseBelowZero=false)
 
void writeState (ESM::StatState< T > &state) const
 
void readState (const ESM::StatState< T > &state)
 

Private Attributes

Stat< T > mStatic
 
mCurrent
 

Member Typedef Documentation

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

Constructor & Destructor Documentation

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

Member Function Documentation

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

Here is the caller graph for this function:

template<typename T >
const T & MWMechanics::DynamicStat< T >::getCurrent ( ) const

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Set base, modified and current to value.

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

Set base and adjust modified accordingly.

Here is the caller graph for this function:

template<typename T>
void MWMechanics::DynamicStat< T >::setCurrent ( const T &  value,
bool  allowDecreaseBelowZero = false,
bool  allowIncreaseAboveModified = false 
)

Here is the caller graph for this function:

template<typename T>
void MWMechanics::DynamicStat< T >::setCurrentModified ( 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::DynamicStat< T >::setCurrentModifier ( const T &  modifier,
bool  allowCurrentToDecreaseBelowZero = false 
)

Here is the caller graph for this function:

template<typename T>
void MWMechanics::DynamicStat< T >::setModified ( 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::DynamicStat< T >::setModifier ( const T &  modifier,
bool  allowCurrentToDecreaseBelowZero = false 
)

Here is the caller graph for this function:

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

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 files: