OpenWareLaboratory
SimpleValue< T > Class Template Reference

Base class for a value that can be set, updated and retrieved (get). More...

Inheritance diagram for SimpleValue< T >:

Public Member Functions

const float DEFAULT_DELTA
 
const int DEFAULT_DELTA
 
const float DEFAULT_DELTA
 
const int DEFAULT_DELTA
 
const float DEFAULT_EXP_C
 
const int DEFAULT_EXP_C
 
const float DEFAULT_EXP_C
 
const int DEFAULT_EXP_C
 
const float DEFAULT_EXP_K
 
const int DEFAULT_EXP_K
 
const float DEFAULT_EXP_K
 
const int DEFAULT_EXP_K
 
const float DEFAULT_LAMBDA
 
const int DEFAULT_LAMBDA
 
const float DEFAULT_LAMBDA
 
const int DEFAULT_LAMBDA
 
const float DEFAULT_LOG_C
 
const int DEFAULT_LOG_C
 
const float DEFAULT_LOG_C
 
const int DEFAULT_LOG_C
 
const float DEFAULT_LOG_K
 
const int DEFAULT_LOG_K
 
const float DEFAULT_LOG_K
 
const int DEFAULT_LOG_K
 
get ()
 
 operator T ()
 
SimpleValue< T > & operator*= (const T &other)
 
SimpleValue< T > & operator+= (const T &other)
 
SimpleValue< T > & operator-= (const T &other)
 
SimpleValue< T > & operator/= (const T &other)
 
SimpleValue< T > & operator= (const T &other)
 
void reset (T x)
 
 SimpleValue ()
 
 SimpleValue (const SimpleValue< T > &other)
 
 SimpleValue (T value)
 
void update (T x)
 

Static Public Attributes

static const T DEFAULT_DELTA
 
static const T DEFAULT_EXP_C
 
static const T DEFAULT_EXP_K
 
static const T DEFAULT_LAMBDA
 
static const T DEFAULT_LOG_C
 
static const T DEFAULT_LOG_K
 

Protected Attributes

value
 

Detailed Description

template<typename T>
class SimpleValue< T >

Base class for a value that can be set, updated and retrieved (get).

Used to selectively add smoothing, hysteresis and ranging to floats and ints. For absolute value updates use the = assignment operator, or update(). For relative value updates use the += and/or -= assignment operators. For value scaling use the *= and/or /= assignment operators.

Definition at line 12 of file SimpleValue.h.

Constructor & Destructor Documentation

◆ SimpleValue() [1/3]

template<typename T >
SimpleValue< T >::SimpleValue ( )
inline

Definition at line 16 of file SimpleValue.h.

◆ SimpleValue() [2/3]

template<typename T >
SimpleValue< T >::SimpleValue ( value)
inline

Definition at line 17 of file SimpleValue.h.

◆ SimpleValue() [3/3]

template<typename T >
SimpleValue< T >::SimpleValue ( const SimpleValue< T > &  other)
inline

Definition at line 18 of file SimpleValue.h.

Member Function Documentation

◆ DEFAULT_DELTA() [1/4]

const float SimpleValue< float >::DEFAULT_DELTA

Definition at line 11 of file SimpleValue.cpp.

◆ DEFAULT_DELTA() [2/4]

const int SimpleValue< int >::DEFAULT_DELTA

Definition at line 17 of file SimpleValue.cpp.

◆ DEFAULT_DELTA() [3/4]

const float SimpleValue< float >::DEFAULT_DELTA

Definition at line 61 of file SimpleValue.h.

◆ DEFAULT_DELTA() [4/4]

const int SimpleValue< int >::DEFAULT_DELTA

Definition at line 67 of file SimpleValue.h.

◆ DEFAULT_EXP_C() [1/4]

const float SimpleValue< float >::DEFAULT_EXP_C

Definition at line 12 of file SimpleValue.cpp.

◆ DEFAULT_EXP_C() [2/4]

const int SimpleValue< int >::DEFAULT_EXP_C

Definition at line 18 of file SimpleValue.cpp.

◆ DEFAULT_EXP_C() [3/4]

const float SimpleValue< float >::DEFAULT_EXP_C

Definition at line 62 of file SimpleValue.h.

◆ DEFAULT_EXP_C() [4/4]

const int SimpleValue< int >::DEFAULT_EXP_C

Definition at line 68 of file SimpleValue.h.

◆ DEFAULT_EXP_K() [1/4]

const float SimpleValue< float >::DEFAULT_EXP_K

Definition at line 13 of file SimpleValue.cpp.

◆ DEFAULT_EXP_K() [2/4]

const int SimpleValue< int >::DEFAULT_EXP_K

Definition at line 19 of file SimpleValue.cpp.

◆ DEFAULT_EXP_K() [3/4]

const float SimpleValue< float >::DEFAULT_EXP_K

Definition at line 63 of file SimpleValue.h.

◆ DEFAULT_EXP_K() [4/4]

const int SimpleValue< int >::DEFAULT_EXP_K

Definition at line 69 of file SimpleValue.h.

◆ DEFAULT_LAMBDA() [1/4]

const float SimpleValue< float >::DEFAULT_LAMBDA

Definition at line 10 of file SimpleValue.cpp.

◆ DEFAULT_LAMBDA() [2/4]

const int SimpleValue< int >::DEFAULT_LAMBDA

Definition at line 16 of file SimpleValue.cpp.

◆ DEFAULT_LAMBDA() [3/4]

const float SimpleValue< float >::DEFAULT_LAMBDA

Definition at line 60 of file SimpleValue.h.

◆ DEFAULT_LAMBDA() [4/4]

const int SimpleValue< int >::DEFAULT_LAMBDA

Definition at line 66 of file SimpleValue.h.

◆ DEFAULT_LOG_C() [1/4]

const float SimpleValue< float >::DEFAULT_LOG_C

Definition at line 14 of file SimpleValue.cpp.

◆ DEFAULT_LOG_C() [2/4]

const int SimpleValue< int >::DEFAULT_LOG_C

Definition at line 20 of file SimpleValue.cpp.

◆ DEFAULT_LOG_C() [3/4]

const float SimpleValue< float >::DEFAULT_LOG_C

Definition at line 64 of file SimpleValue.h.

◆ DEFAULT_LOG_C() [4/4]

const int SimpleValue< int >::DEFAULT_LOG_C

Definition at line 70 of file SimpleValue.h.

◆ DEFAULT_LOG_K() [1/4]

const float SimpleValue< float >::DEFAULT_LOG_K

Definition at line 15 of file SimpleValue.cpp.

◆ DEFAULT_LOG_K() [2/4]

const int SimpleValue< int >::DEFAULT_LOG_K

Definition at line 21 of file SimpleValue.cpp.

◆ DEFAULT_LOG_K() [3/4]

const float SimpleValue< float >::DEFAULT_LOG_K

Definition at line 65 of file SimpleValue.h.

◆ DEFAULT_LOG_K() [4/4]

const int SimpleValue< int >::DEFAULT_LOG_K

Definition at line 71 of file SimpleValue.h.

◆ get()

template<typename T >
T SimpleValue< T >::get ( )
inline

Definition at line 19 of file SimpleValue.h.

References SimpleValue< T >::value.

Referenced by SimpleValue< T >::operator T().

◆ operator T()

template<typename T >
SimpleValue< T >::operator T ( )
inline

Definition at line 48 of file SimpleValue.h.

References SimpleValue< T >::get().

◆ operator*=()

template<typename T >
SimpleValue<T>& SimpleValue< T >::operator*= ( const T &  other)
inline

Definition at line 40 of file SimpleValue.h.

References SimpleValue< T >::update(), and SimpleValue< T >::value.

◆ operator+=()

template<typename T >
SimpleValue<T>& SimpleValue< T >::operator+= ( const T &  other)
inline

Definition at line 32 of file SimpleValue.h.

References SimpleValue< T >::update(), and SimpleValue< T >::value.

◆ operator-=()

template<typename T >
SimpleValue<T>& SimpleValue< T >::operator-= ( const T &  other)
inline

Definition at line 36 of file SimpleValue.h.

References SimpleValue< T >::update(), and SimpleValue< T >::value.

◆ operator/=()

template<typename T >
SimpleValue<T>& SimpleValue< T >::operator/= ( const T &  other)
inline

Definition at line 44 of file SimpleValue.h.

References SimpleValue< T >::update(), and SimpleValue< T >::value.

◆ operator=()

template<typename T >
SimpleValue<T>& SimpleValue< T >::operator= ( const T &  other)
inline

Definition at line 28 of file SimpleValue.h.

References SimpleValue< T >::update().

◆ reset()

template<typename T >
void SimpleValue< T >::reset ( x)
inline

Definition at line 22 of file SimpleValue.h.

References SimpleValue< T >::value.

◆ update()

Field Documentation

◆ DEFAULT_DELTA

template<typename T >
const T SimpleValue< T >::DEFAULT_DELTA
static

Definition at line 52 of file SimpleValue.h.

◆ DEFAULT_EXP_C

template<typename T >
const T SimpleValue< T >::DEFAULT_EXP_C
static

Definition at line 53 of file SimpleValue.h.

◆ DEFAULT_EXP_K

template<typename T >
const T SimpleValue< T >::DEFAULT_EXP_K
static

Definition at line 54 of file SimpleValue.h.

◆ DEFAULT_LAMBDA

template<typename T >
const T SimpleValue< T >::DEFAULT_LAMBDA
static

Definition at line 51 of file SimpleValue.h.

◆ DEFAULT_LOG_C

template<typename T >
const T SimpleValue< T >::DEFAULT_LOG_C
static

Definition at line 55 of file SimpleValue.h.

◆ DEFAULT_LOG_K

template<typename T >
const T SimpleValue< T >::DEFAULT_LOG_K
static

Definition at line 56 of file SimpleValue.h.

◆ value


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