Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide

RWGBitVec(size)

Module:  Essential Tools Module   Group:  Generic


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:

Public Constructors

RWGBitVec(size)();
RWGBitVec(size)(RWBoolean f);

Assignment Operators

RWGBitVec(sz)&
operator=(const RWGBitVec(sz)& v);
RWGBitVec(sz)&
operator=(RWBoolean 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);
RWBoolean
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);
RWBoolean 
operator==(const RWGBitVec(sz)& v1,const RWGBitVec(sz)& v2) 
           const;
RWBoolean 
operator!= (const RWGBitVec(sz)& v1,
            const RWGBitVec(sz)& v2) const;


Previous fileTop of DocumentContentsIndex pageNext file

©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, 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.