Bitstream type of class



 DEVELOP > c-Plus-Plus > Bitstream type of class

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: "PSN"
Date: 12 Dec 2007 03:30:21 AM
Object: Bitstream type of class
hello everyone,
Can someone suggest me what would be the best way to build something
like a bitstream class that allows me to do all sorts of bit
operations, same as the bitstream and also whole other custom
operations.
Thanks for your time,
PSN
.

User: "Chris Fairles"

Title: Re: Bitstream type of class 13 Dec 2007 07:02:05 AM
On Dec 12, 4:30 am, PSN <prakash...@gmail.com> wrote:

hello everyone,
Can someone suggest me what would be the best way to build something
like a bitstream class that allows me to do all sorts of bit
operations, same as the bitstream and also whole other custom
operations.

Thanks for your time,

PSN

There's the std::bitset<size_t NumberOfBits> although its not a
"stream" but more like a container (set of flags). It does however
have all sorts of overloads for operating on bits.
If its a "byte stream" your after, then std::streambuf could be used
(but be warned if want the bytestream to be portable, streambuf does
not care of things such as endianess).
HTH,
Chris
.


  Page 1 of 1

1

 


Related Articles
Class methods operating on arrays of objects of the same type as itself.
Initializing a static const member array of a class type
Class type at compile time
'class' type redefinition
typedef'd return type for a template class member function
pointer to a derived class type
When copy object of class type, all members shouldn't be non-public?
Restrict template to class type
cannot dynamic_cast 't' (of type 'void*') to type 'struct mom::object*' (source is not a pointer to class)
Why static data members can be declared as the type of its own class
how to construct a class with member type unknown till runtime?
ptr_policy class template type
how to initialize a class static member variable of composite type
How will it new/allocate memory when a class have string-type members?
what's the difference between type struct and type class exactly?
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER