Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
BitFlags< NUMBITS > Class Template Reference

#include <BitFlags.h>

Public Types

enum  BogusInitType { kInit = 0 }
 

Public Member Functions

 BitFlags ()
 
 BitFlags (BogusInitType k, Int idx1)
 
 BitFlags (BogusInitType k, Int idx1, Int idx2)
 
 BitFlags (BogusInitType k, Int idx1, Int idx2, Int idx3)
 
 BitFlags (BogusInitType k, Int idx1, Int idx2, Int idx3, Int idx4)
 
 BitFlags (BogusInitType k, Int idx1, Int idx2, Int idx3, Int idx4, Int idx5)
 
 BitFlags (BogusInitType k, Int idx1, Int idx2, Int idx3, Int idx4, Int idx5, Int idx6, Int idx7, Int idx8, Int idx9, Int idx10, Int idx11, Int idx12)
 
Bool operator== (const BitFlags &that) const
 
Bool operator!= (const BitFlags &that) const
 
void set (Int i, Int val=1)
 
Bool test (Int i) const
 
Bool testForAny (const BitFlags &that) const
 
Bool testForAll (const BitFlags &that) const
 
Bool testForNone (const BitFlags &that) const
 
Int size () const
 
Int count () const
 
Bool any () const
 
void flip ()
 
void clear ()
 
Int countIntersection (const BitFlags &that) const
 
Int countInverseIntersection (const BitFlags &that) const
 
Bool anyIntersectionWith (const BitFlags &that) const
 
void clear (const BitFlags &clr)
 
void set (const BitFlags &set)
 
void clearAndSet (const BitFlags &clr, const BitFlags &set)
 
Bool testSetAndClear (const BitFlags &mustBeSet, const BitFlags &mustBeClear) const
 
const char * getBitNameIfSet (Int i) const
 
Bool setBitByName (const char *token)
 
void parse (INI *ini, AsciiString *str)
 
void parseSingleBit (INI *ini, AsciiString *str)
 
void xfer (Xfer *xfer)
 
void buildDescription (AsciiString *str) const
 

Static Public Member Functions

static const char ** getBitNames ()
 
static const char * getNameFromSingleBit (Int i)
 
static Int getSingleBitFromName (const char *token)
 
static void parseFromINI (INI *ini, void *, void *store, const void *)
 Returns a BitFlag.
 
static void parseSingleBitFromINI (INI *ini, void *, void *store, const void *)
 Returns an int, the Index of the one bit.
 

Detailed Description

template<size_t NUMBITS>
class BitFlags< NUMBITS >

Definition at line 52 of file BitFlags.h.

Member Enumeration Documentation

◆ BogusInitType

template<size_t NUMBITS>
enum BitFlags::BogusInitType
Enumerator
kInit 

Definition at line 63 of file BitFlags.h.

Constructor & Destructor Documentation

◆ BitFlags() [1/7]

template<size_t NUMBITS>
BitFlags< NUMBITS >::BitFlags ( )
inline

Definition at line 68 of file BitFlags.h.

◆ BitFlags() [2/7]

template<size_t NUMBITS>
BitFlags< NUMBITS >::BitFlags ( BogusInitType k,
Int idx1 )
inline

Definition at line 72 of file BitFlags.h.

◆ BitFlags() [3/7]

template<size_t NUMBITS>
BitFlags< NUMBITS >::BitFlags ( BogusInitType k,
Int idx1,
Int idx2 )
inline

Definition at line 77 of file BitFlags.h.

◆ BitFlags() [4/7]

template<size_t NUMBITS>
BitFlags< NUMBITS >::BitFlags ( BogusInitType k,
Int idx1,
Int idx2,
Int idx3 )
inline

Definition at line 83 of file BitFlags.h.

◆ BitFlags() [5/7]

template<size_t NUMBITS>
BitFlags< NUMBITS >::BitFlags ( BogusInitType k,
Int idx1,
Int idx2,
Int idx3,
Int idx4 )
inline

Definition at line 90 of file BitFlags.h.

◆ BitFlags() [6/7]

template<size_t NUMBITS>
BitFlags< NUMBITS >::BitFlags ( BogusInitType k,
Int idx1,
Int idx2,
Int idx3,
Int idx4,
Int idx5 )
inline

Definition at line 98 of file BitFlags.h.

◆ BitFlags() [7/7]

template<size_t NUMBITS>
BitFlags< NUMBITS >::BitFlags ( BogusInitType k,
Int idx1,
Int idx2,
Int idx3,
Int idx4,
Int idx5,
Int idx6,
Int idx7,
Int idx8,
Int idx9,
Int idx10,
Int idx11,
Int idx12 )
inline

Definition at line 107 of file BitFlags.h.

Member Function Documentation

◆ any()

template<size_t NUMBITS>
Bool BitFlags< NUMBITS >::any ( ) const
inline

Definition at line 193 of file BitFlags.h.

◆ anyIntersectionWith()

template<size_t NUMBITS>
Bool BitFlags< NUMBITS >::anyIntersectionWith ( const BitFlags< NUMBITS > & that) const
inline
Todo
srj – improve me.

Definition at line 223 of file BitFlags.h.

◆ buildDescription()

template<size_t NUMBITS>
void BitFlags< NUMBITS >::buildDescription ( AsciiString * str) const
inline

Definition at line 312 of file BitFlags.h.

◆ clear() [1/2]

template<size_t NUMBITS>
void BitFlags< NUMBITS >::clear ( )
inline

Definition at line 203 of file BitFlags.h.

◆ clear() [2/2]

template<size_t NUMBITS>
void BitFlags< NUMBITS >::clear ( const BitFlags< NUMBITS > & clr)
inline

Definition at line 231 of file BitFlags.h.

◆ clearAndSet()

template<size_t NUMBITS>
void BitFlags< NUMBITS >::clearAndSet ( const BitFlags< NUMBITS > & clr,
const BitFlags< NUMBITS > & set )
inline

Definition at line 241 of file BitFlags.h.

◆ count()

template<size_t NUMBITS>
Int BitFlags< NUMBITS >::count ( ) const
inline

Definition at line 188 of file BitFlags.h.

◆ countIntersection()

template<size_t NUMBITS>
Int BitFlags< NUMBITS >::countIntersection ( const BitFlags< NUMBITS > & that) const
inline

Definition at line 208 of file BitFlags.h.

◆ countInverseIntersection()

template<size_t NUMBITS>
Int BitFlags< NUMBITS >::countInverseIntersection ( const BitFlags< NUMBITS > & that) const
inline

Definition at line 215 of file BitFlags.h.

◆ flip()

template<size_t NUMBITS>
void BitFlags< NUMBITS >::flip ( )
inline

Definition at line 198 of file BitFlags.h.

◆ getBitNameIfSet()

template<size_t NUMBITS>
const char * BitFlags< NUMBITS >::getBitNameIfSet ( Int i) const
inline

Definition at line 287 of file BitFlags.h.

◆ getBitNames()

template<size_t NUMBITS>
static const char ** BitFlags< NUMBITS >::getBitNames ( )
inlinestatic

Definition at line 264 of file BitFlags.h.

◆ getNameFromSingleBit()

template<size_t NUMBITS>
static const char * BitFlags< NUMBITS >::getNameFromSingleBit ( Int i)
inlinestatic

Definition at line 269 of file BitFlags.h.

◆ getSingleBitFromName()

template<size_t NUMBITS>
static Int BitFlags< NUMBITS >::getSingleBitFromName ( const char * token)
inlinestatic

Definition at line 274 of file BitFlags.h.

◆ operator!=()

template<size_t NUMBITS>
Bool BitFlags< NUMBITS >::operator!= ( const BitFlags< NUMBITS > & that) const
inline

Definition at line 141 of file BitFlags.h.

◆ operator==()

template<size_t NUMBITS>
Bool BitFlags< NUMBITS >::operator== ( const BitFlags< NUMBITS > & that) const
inline

Definition at line 136 of file BitFlags.h.

◆ parse()

template<size_t NUMBITS>
void BitFlags< NUMBITS >::parse ( INI * ini,
AsciiString * str )

Definition at line 63 of file BitFlagsIO.h.

◆ parseFromINI()

template<size_t NUMBITS>
void BitFlags< NUMBITS >::parseFromINI ( INI * ini,
void * ,
void * store,
const void *  )
static

Returns a BitFlag.

Definition at line 136 of file BitFlagsIO.h.

◆ parseSingleBit()

template<size_t NUMBITS>
void BitFlags< NUMBITS >::parseSingleBit ( INI * ini,
AsciiString * str )

◆ parseSingleBitFromINI()

template<size_t NUMBITS>
void BitFlags< NUMBITS >::parseSingleBitFromINI ( INI * ini,
void * ,
void * store,
const void *  )
static

Returns an int, the Index of the one bit.

Definition at line 144 of file BitFlagsIO.h.

◆ set() [1/2]

template<size_t NUMBITS>
void BitFlags< NUMBITS >::set ( const BitFlags< NUMBITS > & set)
inline

Definition at line 236 of file BitFlags.h.

◆ set() [2/2]

template<size_t NUMBITS>
void BitFlags< NUMBITS >::set ( Int i,
Int val = 1 )
inline

Definition at line 146 of file BitFlags.h.

◆ setBitByName()

template<size_t NUMBITS>
Bool BitFlags< NUMBITS >::setBitByName ( const char * token)
inline

Definition at line 292 of file BitFlags.h.

◆ size()

template<size_t NUMBITS>
Int BitFlags< NUMBITS >::size ( ) const
inline

Definition at line 183 of file BitFlags.h.

◆ test()

template<size_t NUMBITS>
Bool BitFlags< NUMBITS >::test ( Int i) const
inline

Definition at line 151 of file BitFlags.h.

◆ testForAll()

template<size_t NUMBITS>
Bool BitFlags< NUMBITS >::testForAll ( const BitFlags< NUMBITS > & that) const
inline

Definition at line 165 of file BitFlags.h.

◆ testForAny()

template<size_t NUMBITS>
Bool BitFlags< NUMBITS >::testForAny ( const BitFlags< NUMBITS > & that) const
inline

Definition at line 157 of file BitFlags.h.

◆ testForNone()

template<size_t NUMBITS>
Bool BitFlags< NUMBITS >::testForNone ( const BitFlags< NUMBITS > & that) const
inline

Definition at line 176 of file BitFlags.h.

◆ testSetAndClear()

template<size_t NUMBITS>
Bool BitFlags< NUMBITS >::testSetAndClear ( const BitFlags< NUMBITS > & mustBeSet,
const BitFlags< NUMBITS > & mustBeClear ) const
inline
Todo
srj – improve me.

Definition at line 247 of file BitFlags.h.

◆ xfer()

template<size_t NUMBITS>
void BitFlags< NUMBITS >::xfer ( Xfer * xfer)

Xfer method Version Info: 1: Initial version

Definition at line 159 of file BitFlagsIO.h.


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