Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWBitVec

Module:  Essential Tools Module   Group:  Traditional Collection Classes


Does not inherit

Local Index

Members

Non-Members

Synopsis

#include <rw/bitvec.h>
RWBitVec v;

Description

Class RWBitVec is a bit vector whose length can be changed at run time. Because this requires an extra level of indirection, this makes it slightly less efficient than classes RWGBitVec(size) or RWTBitVec<Size>, whose lengths are fixed at compile time.

Persistence

Simple

Example

Program output:

Public Constructors

RWBitVec();
RWBitVec(size_t N);
RWBitVec(size_t N, bool initVal);
RWBitVec(const RWByte* bp, size_t N);
RWBitVec(const RWBitVec& v);

Public Destructor

~RWBitVec();

Assignment Operators

RWBitVec&
operator=(const RWBitVec& v);
RWBitVec&
operator=(bool b);
RWBitVec&
operator&=(const RWBitVec& v);
RWBitVec&
operator^=(const RWBitVec& v);
RWBitVec&
operator|=(const RWBitVec& v);

Indexing Operators

RWBitRef
operator[](size_t i);
RWBitRef
operator()(size_t i);
bool
operator[](size_t i) const;
bool
operator()(size_t i) const;

Logical Operators

bool
operator==(const RWBitVec& u) const;
bool
operator!=(const RWBitVec& u) const;
bool
operator==(bool b) const;
bool
operator!=(bool b) const;

Public Member Functions

void
clearBit(size_t i);
const RWByte*
data() const;
size_t
firstFalse() const;
size_t
firstTrue() const;
unsigned
hash() const;
bool
isEqual(const RWBitVec& v) const;
size_t
length() const;
ostream&
printOn(ostream& s) const;
void
resize(size_t N);
istream&
scanFrom(istream&);
void
setBit(size_t i);
size_t
sum(const RWBitVec& v);
bool
testBit(size_t i) const;

Related Global Functions

RWBitVec
operator!(const RWBitVec& v);
RWBitVec
operator&(const RWBitVec&,const RWBitVec&);
RWBitVec
operator^(const RWBitVec&,const RWBitVec&);
RWBitVec
operator|(const RWBitVec&,const RWBitVec&);
ostream&
operator<<(ostream& s, const RWBitVec& v);
istream&
operator>>(istream& s, RWBitVec& v);
RWvostream&
operator<<(RWvostream&, const RWBitVec& vec);
RWFile&
operator<<(RWFile&,     const RWBitVec& vec);
RWvistream&
operator>>(RWvistream&, RWBitVec& vec);
RWFile&
operator>>(RWFile&,     RWBitVec& vec);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.