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.

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

void Set (uint32 mask)
 Set all given flags.

void Reset (uint32 mask)
 Reset all given flags.

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

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

uint32 Get () const
 Get flags.

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

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


Detailed Description

Set of flags which can be accessed through masks.

Definition at line 27 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 35 of file flags.h.


Member Function Documentation

bool csFlags::Check uint32    mask const [inline]
 

Check if any of the given flags are set.

Definition at line 88 of file flags.h.

bool csFlags::CheckAll uint32    mask const [inline]
 

Check if all the given flags are set.

Definition at line 92 of file flags.h.

uint32 csFlags::Get   const [inline]
 

Get flags.

Definition at line 84 of file flags.h.

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 61 of file flags.h.

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 69 of file flags.h.

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 52 of file flags.h.

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 43 of file flags.h.

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 77 of file flags.h.


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