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

CTBflags Class Reference

Class to encapsulate 32 state flags. More...

#include <CTBflags.hxx>

List of all members.

Public Methods

 CTBflags ()
 CTBflags (CTBuint32 i_flags)
void SetBit (CTBuint32 i_flags)
void SetBit (CTBuint32 i_flags, bool b_val)
void ClearBit (CTBuint32 i_flags)
bool TestSomeBits (CTBuint32 i_flags) const
bool TestAllBits (CTBuint32 i_flags) const
 operator CTBuint32 () const
bool operator! () const
CTBflags & operator= (const CTBuint32 i_flags)

Private Attributes

CTBuint32 mi_flags


Detailed Description

Class to encapsulate 32 state flags.

A CTBflags holds 32 flag bits which are organized as an unsigned 32 bit integer word. Member functions allow to set, clear and test subsets of these flags. The subsets are always specified through a CTBunit32 mask.

Definition at line 16 of file CTBflags.hxx.


Constructor & Destructor Documentation

CTBflags::CTBflags [inline]
 

Default constructor, all flags bits are cleared.

Definition at line 26 of file CTBflags.icc.

CTBflags::CTBflags CTBuint32 i_flags [inline]
 

Constructor from uint, flags are set from i_flags.

Definition at line 33 of file CTBflags.icc.


Member Function Documentation

void CTBflags::SetBit CTBuint32 i_flags [inline]
 

Set some bits.

All flags corresponding to set bits in i_flags are set, all others are unaffected.

Definition at line 44 of file CTBflags.icc.

void CTBflags::SetBit CTBuint32 i_flags,
bool b_val
[inline]
 

Set some bits to a value.

All flags corresponding to set bits in i_flags are set if b_val is true and cleared if b_val is false.

Definition at line 57 of file CTBflags.icc.

void CTBflags::ClearBit CTBuint32 i_flags [inline]
 

Clear some bits.

All flags corresponding to set bits in i_flags are cleared, all others are unaffected.

Definition at line 74 of file CTBflags.icc.

bool CTBflags::TestSomeBits CTBuint32 i_flags const [inline]
 

Test whether some bits are set.

Returns true if at least one of the flags corresponding to the bits set in i_flags is set.

Definition at line 87 of file CTBflags.icc.

bool CTBflags::TestAllBits CTBuint32 i_flags const [inline]
 

Test whether all bits are set.

Returns true all the flags corresponding to the bits set in i_flags is set.

Definition at line 99 of file CTBflags.icc.

CTBflags::operator CTBuint32 const [inline]
 

Convert to unsigned 32bit integer.

Definition at line 107 of file CTBflags.icc.

bool CTBflags::operator! const [inline]
 

Returns true if no bit is set.

Definition at line 115 of file CTBflags.icc.

CTBflags & CTBflags::operator= const CTBuint32 i_flags [inline]
 

Assign from unsigned 32bit integer.

Definition at line 123 of file CTBflags.icc.


Member Data Documentation

CTBuint32 CTBflags::mi_flags [private]
 

Definition at line 37 of file CTBflags.hxx.


The documentation for this class was generated from the following files:
Generated at Fri Oct 24 18:13:39 2003 for CTBbase by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001