Bit masks are useful tools for toggling various flags and options. This set of functions module provides a mechanism to create an array of bits of arbitrary length and manipulate them with basic binary operations. A print function is also provided to display the entire set of bits in binary format as a string.
Definition in file psBitSet.h.
#include "psType.h"
Include dependency graph for psBitSet.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Functions | |
| bool | psMemCheckBitSet (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psBitSet * | psBitSetAlloc (long nalloc) |
| Allocate a psBitSet. | |
| psBitSet * | psBitSetSet (psBitSet *bitSet, long bit) |
| Set a bit. | |
| psBitSet * | psBitSetClear (psBitSet *bitSet, long bit) |
| Clear a bit. | |
| bool | psBitSetTest (const psBitSet *bitSet, long bit) |
| Test the value of a bit. | |
| psBitSet * | psBitSetOp (psBitSet *outBitSet, const psBitSet *inBitSet1, const char *operator, const psBitSet *inBitSet2) |
| Perform a binary operation on two psBitSets. | |
| psBitSet * | psBitSetNot (psBitSet *outBitSet, const psBitSet *inBitSet) |
| Perform a not operation on a psBitSet. | |
| psString | psBitSetToString (const psBitSet *bitSet) |
| Convert the psBitSet to a string of ones and zeros. | |
1.4.2