OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TBitFlags< T > Class Template Reference

For example: More...

#include <owl/bitset.h>

Public Member Functions

 TBitFlags (T t=0)
 Initialize the Flags to the specified parameter.
 
Clear (T t)
 Clear the bits that are enabled in the specified parameter.
 
Set (T t)
 Activate the bits that are enabled in the specified parameter.
 
bool IsSet (T t) const
 Return true of the ON bits of the parameter are currently enabled.
 

Protected Attributes

Bits
 

Detailed Description

template<class T>
class owl::TBitFlags< T >

For example:

TBitFlags is a lightweight class for setting, clearing and querrying bit flags.

class TMyClass : public TMyBase, public TBitFlags<short> {
For example:
Definition bitset.h:143

It's intenteded to be used with a 'short' or 'long' type allowing an easy method to handle 16 and 32 bit flags respectively.

Definition at line 143 of file bitset.h.

Constructor & Destructor Documentation

◆ TBitFlags()

template<class T >
owl::TBitFlags< T >::TBitFlags ( T t = 0)

Initialize the Flags to the specified parameter.

Definition at line 169 of file bitset.h.

Member Function Documentation

◆ Clear()

template<class T >
T owl::TBitFlags< T >::Clear ( T t)

Clear the bits that are enabled in the specified parameter.

Definition at line 188 of file bitset.h.

◆ IsSet()

template<class T >
bool owl::TBitFlags< T >::IsSet ( T t) const

Return true of the ON bits of the parameter are currently enabled.

Return false otherwise.

Definition at line 198 of file bitset.h.

◆ Set()

template<class T >
T owl::TBitFlags< T >::Set ( T t)

Activate the bits that are enabled in the specified parameter.

Definition at line 179 of file bitset.h.

Member Data Documentation

◆ Bits

template<class T >
T owl::TBitFlags< T >::Bits
protected

Definition at line 154 of file bitset.h.


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