Planeshift
Public Member Functions

psToggle Class Reference

Simple Toggle with callback functionality. More...

#include <pstoggle.h>

List of all members.

Public Member Functions

void Activate ()
 Set Toggle to true.
void Deactivate ()
 Set Toggle to false.
bool GetToggle ()
 Get Toggle returns state.
 psToggle ()
 Constructor - default state is true.
void RemoveCallback ()
 Remove the callback.
void SetCallback (void(*object), void(*function)(void *))
 Sets a Callback to a object function.
void SetToggle (bool newstate)
 Set Toggle.
 ~psToggle ()
 Destructor.

Detailed Description

Simple Toggle with callback functionality.

Calls the callback function on toggle state change. Dont forget to remove the callback if you destroy the object it points to.

Definition at line 38 of file pstoggle.h.


Constructor & Destructor Documentation

psToggle::psToggle ( )

Constructor - default state is true.

psToggle::~psToggle ( )

Destructor.


Member Function Documentation

void psToggle::Activate ( )

Set Toggle to true.

void psToggle::Deactivate ( )

Set Toggle to false.

bool psToggle::GetToggle ( )

Get Toggle returns state.

void psToggle::RemoveCallback ( )

Remove the callback.

void psToggle::SetCallback ( void *  object,
void(*)(void *)  function 
)

Sets a Callback to a object function.

Parameters:
objectpointer to the object
functionpointer to a static void function within the object
void psToggle::SetToggle ( bool  newstate)

Set Toggle.

Parameters:
newstatetrue or false

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