CheckableFloat Class Reference


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.

Definition at line 1565 of file math.h.

#include <math.h>

List of all members.

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

CheckableFloat ( void  ) [inline]

Definition at line 1568 of file math.h.

{ m_bState = true; m_fValue = 0.0f; };
CheckableFloat ( bool  bState,
float  fValue 
) [inline]

Definition at line 1569 of file math.h.

{ m_bState = bState; m_fValue = fValue; };

Member Function Documentation

void SetValue ( float  f ) [inline]

Sets the associated float value.

Definition at line 1572 of file math.h.

{ m_fValue = f; };
float Value ( void  ) const [inline]

Retrieves the associated float value.

Definition at line 1575 of file math.h.

{ return m_fValue; };
void SetState ( bool  b ) [inline]

Sets the associated boolean value.

Definition at line 1578 of file math.h.

{ m_bState = b; };
bool State ( void  ) const [inline]

Retrieves the associated boolean value.

Definition at line 1581 of file math.h.

{ return m_bState; };
bool operator== ( const CheckableFloat cf ) const throw () [inline]

Definition at line 1583 of file math.h.

{ return State() == cf.State() && Value() == cf.Value(); };
bool operator!= ( const CheckableFloat cf ) const throw () [inline]

Definition at line 1584 of file math.h.

{ return !operator ==( cf ); };
CheckableFloat& operator= ( const CheckableFloat cf ) [inline]

Definition at line 1585 of file math.h.

{ m_bState = cf.m_bState; m_fValue = cf.m_fValue; return *this; };
void Serialize ( Stream s ) [inline]

Definition at line 1587 of file math.h.

    {
        s == m_bState == m_fValue;
    };

Member Data Documentation

bool m_bState [protected]

Definition at line 1590 of file math.h.

float m_fValue [protected]

Definition at line 1595 of file math.h.


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

CheckableFloat CheckableFloat CheckableFloat CheckableFloat CheckableFloat CheckableFloat CheckableFloat CheckableFloat CheckableFloat CheckableFloat
CheckableFloat CheckableFloat CheckableFloat CheckableFloat CheckableFloat CheckableFloat CheckableFloat CheckableFloat CheckableFloat CheckableFloat