NAME

OTC_BitSetC - A bit set of size 256.

SYNOPSIS


#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);
};

CLASS TYPE

Concrete

DESCRIPTION

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.

INITIALISATION

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);

QUERY

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;

MANIPULATORS

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);

OPERATORS

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);

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1992 1994 OTC LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED