CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csFlags Class Reference

Set of flags which can be accessed through masks. More...

#include <flags.h>

List of all members.

Public Methods

 csFlags (uint32 value=0)
 Constructor. All flags are set to false by default. More...

void SetAll (uint32 value)
 Initialize all flags to the given mask. More...

void Set (uint32 mask)
 Set all given flags. More...

void Reset (uint32 mask)
 Reset all given flags. More...

void Set (uint32 mask, uint32 value)
 Set all flags with the given mask. More...

void SetBool (uint32 mask, bool value)
 Set all flags with the given value. More...

uint32 Get () const
 Get flags. More...

bool Check (uint32 mask) const
 Check if any of the given flags are set. More...

bool CheckAll (uint32 mask) const
 Check if all the given flags are set. More...


Detailed Description

Set of flags which can be accessed through masks.

Definition at line 25 of file flags.h.


Constructor & Destructor Documentation

csFlags::csFlags uint32    value = 0 [inline]
 

Constructor. All flags are set to false by default.

Definition at line 33 of file flags.h.

References uint32.


Member Function Documentation

bool csFlags::Check uint32    mask const [inline]
 

Check if any of the given flags are set.

Definition at line 86 of file flags.h.

References uint32.

bool csFlags::CheckAll uint32    mask const [inline]
 

Check if all the given flags are set.

Definition at line 90 of file flags.h.

References uint32.

uint32 csFlags::Get   const [inline]
 

Get flags.

Definition at line 82 of file flags.h.

References uint32.

void csFlags::Reset uint32    mask [inline]
 

Reset all given flags.

This will clear all flags which you specify in the mask. i.e. if a mask bit is 1 then the corresponding flag will be cleared. All other flags are untouched.

Definition at line 59 of file flags.h.

References uint32.

void csFlags::Set uint32    mask,
uint32    value
[inline]
 

Set all flags with the given mask.

With this function you can set and clear a series of flags but only the flags you specify in the mask will be affected.

Definition at line 67 of file flags.h.

References uint32.

void csFlags::Set uint32    mask [inline]
 

Set all given flags.

This function will set all flags which are '1' in the mask. All other flags are untouched. This contrasts with SetAll() which will set all flags that are '1' in the input and clear the flags that are '0'.

Definition at line 50 of file flags.h.

References uint32.

void csFlags::SetAll uint32    value [inline]
 

Initialize all flags to the given mask.

You can use this function to set and clear all flags at once. If you only want to set flags (and not clear others) then use 'Set(mask)'.

Definition at line 41 of file flags.h.

References uint32.

Referenced by csPolygonMeshBox::csPolygonMeshBox.

void csFlags::SetBool uint32    mask,
bool    value
[inline]
 

Set all flags with the given value.

This function will set all flags given in the mask with either '1' or '0' depending on the boolean input value.

Definition at line 75 of file flags.h.

References uint32.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14