#include <OTC/collctn/bitsetc.hh> class OTC_BitSetC {
public:
static os_typespec* get_os_typespec();
inline static int rank( OTC_BitSetC const& theSet1, OTC_BitSetC const& theSet2 );
inline static int hash(OTC_BitSetC const& theSet);
inline OTC_BitSetC();
inline OTC_BitSetC(OTC_BitSetC const& theSet);
OTC_BitSetC(char const* theString);
OTC_BitSetC(char const* theString, u_int theNum);
inline OTC_BitSetC& operator=(OTC_BitSetC const& theSet);
int count() const;
inline int test(char theBit) const;
inline int operator[](char theBit) const;
inline OTC_Boolean operator==(OTC_BitSetC const& theSet) const;
inline OTC_Boolean operator!=(OTC_BitSetC const& theSet) const;
inline void reset();
inline void reset(u_char theBit);
void reset(u_char theStart, u_char theNum);
inline void set();
inline void set(u_char theBit);
void set(u_char theStart, u_char theNum);
void complement();
inline void complement(u_char theBit);
void complement(u_char theStart, u_char theNum);
OTC_BitSetC operator~() const;
OTC_BitSetC operator&(OTC_BitSetC const& theSet);
OTC_BitSetC& operator&=(OTC_BitSetC const& theSet);
OTC_BitSetC operator|(OTC_BitSetC const& theSet);
OTC_BitSetC& operator|=(OTC_BitSetC const& theSet);
OTC_BitSetC operator^(OTC_BitSetC const& theSet);
OTC_BitSetC& operator^=(OTC_BitSetC const& theSet);
};
OTC_BitSetC
is a bit set for the range of values 0
to 255
.
The class is designed for tracking character classes in parsing
type applications.
inline OTC_BitSetC();
0
.
inline OTC_BitSetC(OTC_BitSetC const& theSet);
theSet
.
OTC_BitSetC(char const* theString);
theString
. theString
should be
null terminated. The null terminator
does not result in bit 0
being set.
OTC_BitSetC(char const* theString, u_int theNum);
theNum
characters
listed in theString
.
inline OTC_BitSetC& operator=(OTC_BitSetC const& theSet);
theSet
.
int count() const;
inline int test(char theBit) const;
theBit
is set.
inline int operator[](char theBit) const;
theBit
is set.
inline OTC_Boolean operator==(OTC_BitSetC const& theSet) const;
OTCLIB_TRUE
if this bit set
is equivalent to theSet
.
inline OTC_Boolean operator!=(OTC_BitSetC const& theSet) const;
OTCLIB_TRUE
if this bit set
is not equivalent to theSet
.
inline void reset();
0
.
inline void reset(u_char theBit);
theBit
to 0
.
void reset(u_char theStart, u_char theNum);
theNum
bits starting at theStart
to 0
.
inline void set();
1
.
inline void set(u_char theBit);
theBit
to 1
.
void set(u_char theStart, u_char theNum);
theNum
bits starting at theStart
to 1
.
void complement();
inline void complement(u_char theBit);
theBit
.
void complement(u_char theStart, u_char theNum);
theNum
bits starting at
theStart
.
OTC_BitSetC operator~() const;
OTC_BitSetC operator&(OTC_BitSetC const& theSet);
theSet
and this
set.
OTC_BitSetC& operator&=(OTC_BitSetC const& theSet);
theSet
and
this set with the result being left in
this set.
OTC_BitSetC operator|(OTC_BitSetC const& theSet);
theSet
and this set.
OTC_BitSetC& operator|=(OTC_BitSetC const& theSet);
theSet
and this set
with the result being left in this set.
OTC_BitSetC operator^(OTC_BitSetC const& theSet);
theSet
and this set.
OTC_BitSetC& operator^=(OTC_BitSetC const& theSet);
theSet
and this set with the result being left in
this set.