mudbox::CheckableFloat Class Reference

#include <math.h>

List of all members.


Detailed Description

A container class that holds a boolean and a float value.

Can be used to to enable/disable the usage of the float value. Typically represented by a checkbox and a slider below that where the state of the checkbox enables or disables the slider.


Public Member Functions

  CheckableFloat (void)
  CheckableFloat (bool bState, float fValue)
void  SetValue (float f)
  Sets the associated float value.
float  Value (void) const
  Retrieves the associated float value.
void  SetState (bool b)
  Sets the associated boolean value.
bool  State (void) const
  Retrieves the associated boolean value.
bool  operator== (const CheckableFloat &cf) const throw ()
bool  operator!= (const CheckableFloat &cf) const throw ()
CheckableFloat operator= (const CheckableFloat &cf)
void  Serialize (Stream &s)

Protected Attributes

bool  m_bState
float  m_fValue

Constructor & Destructor Documentation

mudbox::CheckableFloat::CheckableFloat void   )  [inline]
 
01253 { m_bState = true; m_fValue = 0.0f; };
mudbox::CheckableFloat::CheckableFloat bool  bState,
float  fValue
[inline]
 
01254 { m_bState = bState; m_fValue = fValue; };

Member Function Documentation

void mudbox::CheckableFloat::SetValue float  f  )  [inline]
 

Sets the associated float value.

01257 { m_fValue = f; };
float mudbox::CheckableFloat::Value void   )  const [inline]
 

Retrieves the associated float value.

01260 { return m_fValue; };
void mudbox::CheckableFloat::SetState bool  b  )  [inline]
 

Sets the associated boolean value.

01263 { m_bState = b; };
bool mudbox::CheckableFloat::State void   )  const [inline]
 

Retrieves the associated boolean value.

01266 { return m_bState; };
bool mudbox::CheckableFloat::operator== const CheckableFloat cf  )  const throw () [inline]
 
01268 { return State() == cf.State() && Value() == cf.Value(); };
bool mudbox::CheckableFloat::operator!= const CheckableFloat cf  )  const throw () [inline]
 
01269 { return !operator ==( cf ); };
CheckableFloat& mudbox::CheckableFloat::operator= const CheckableFloat cf  )  [inline]
 
01270 { m_bState = cf.m_bState; m_fValue = cf.m_fValue; return *this; };
void mudbox::CheckableFloat::Serialize Stream s  )  [inline]
 
01273     {
01274         s == m_bState == m_fValue;
01275     };

Member Data Documentation

bool mudbox::CheckableFloat::m_bState [protected]
 
float mudbox::CheckableFloat::m_fValue [protected]
 

mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat
mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat mudbox::CheckableFloat