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

RWGBitVec(size) (deprecated)

Module:  Essential Tools Module   Group:  Generic Classes


Does not inherit

Local Index

Members

Non-Members

Synopsis

#include <rw/gbitvec.h>
declare(RWGBitVec,size)
RWGBitVec(size) a;

Description

RWGBitVec(size) is a bit vector of fixed length size. The length cannot be changed dynamically (see class RWBitVec if you need a bit vector whose length can be changed at run time). Objects of type RWGBitVec(size) are declared with macros defined in the standard C++ header file <generic.h>.

Bits are numbered from 0 through size-1, inclusive.


NOTE -- RWGBitVec is deprecated; please use RWTBitVec.

Persistence

None

Example

In this example, a bit vector 24 bits long is declared and exercised:

Program Output:

Public Constructors

RWGBitVec(size)();
RWGBitVec(size)(bool f);

Assignment Operators

RWGBitVec(sz)&
operator=(const RWGBitVec(sz)& v);
RWGBitVec(sz)&
operator=(bool f);
RWGBitVec(sz)&
operator&=(const RWGBitVec(sz)& v);
RWGBitVec(sz)&
operator^=(const RWGBitVec(sz)& v);
RWGBitVec(sz)&
operator|=(const RWGBitVec(sz)& v);

Indexing Operators

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

Public Member Functions

void
clearBit(size_t i);
const RWByte*
data() const;
void
setBit(size_t i);
bool
testBit(size_t i) const;

Related Global Functions

RWGBitVec(sz) 
operator&(const RWGBitVec(sz)& v1,const RWGBitVec(sz)& v2);
RWGBitVec(sz) 
operator^(const RWGBitVec(sz)& v1,const RWGBitVec(sz)& v2);
RWGBitVec(sz) 
operator|(const RWGBitVec(sz)& v1,const RWGBitVec(sz)& v2);
bool 
operator==(const RWGBitVec(sz)& v1,const RWGBitVec(sz)& v2) 
           const;
bool 
operator!= (const RWGBitVec(sz)& v1,
            const RWGBitVec(sz)& v2) const;


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.