|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLMISC::CBitMemStream Class ReferenceBit-oriented memory stream.
More...
#include <bit_mem_stream.h>
Inheritance diagram for NLMISC::CBitMemStream:
List of all members.
Public Methods |
| CBitMemStream (bool inputStream=false, uint32 defaultcapacity=32) |
| Constructor. More...
|
| CBitMemStream (const CBitMemStream &other) |
| Copy constructor. More...
|
CBitMemStream & | operator= (const CBitMemStream &other) |
| Assignment operator. More...
|
virtual uint32 | length () const |
| Returns the length (size) of the message, in bytes. More...
|
virtual void | invert () |
| Transforms the message from input to output or from output to input. More...
|
virtual void | clear () |
| Clears the message. More...
|
sint32 | getPosInBit () |
| Returns the number of bit from the beginning of the buffer (in bit). More...
|
virtual void | serialBuffer (uint8 *buf, uint len) |
| Serialize a buffer. More...
|
virtual void | serialBit (bool &bit) |
| Serialize one bit. More...
|
void | serial (uint32 &value, uint nbits, bool resetvalue=true) |
| Serialize only the nbits lower bits of value (nbits range: [1..32]) When using this method, always leave resetvalue to true. More...
|
void | serial (uint64 &value, uint nbits) |
| Serialize only the nbits lower bits of 64-bit value (nbits range: [1..64]). More...
|
template<class T> void | serial (T &obj) |
| Template serialisation (should take the one from IStream). More...
|
template<class T> void | serialCont (std::vector< T > &cont) |
template<class T> void | serialCont (std::list< T > &cont) |
template<class T> void | serialCont (std::deque< T > &cont) |
template<class T> void | serialCont (std::set< T > &cont) |
template<class T> void | serialCont (std::multiset< T > &cont) |
template<class K, class T> void | serialCont (std::map< K, T > &cont) |
template<class K, class T> void | serialCont (std::multimap< K, T > &cont) |
virtual void | serialCont (std::vector< uint8 > &cont) |
| Specialisation of serialCont() for vector<uint8>. More...
|
virtual void | serialCont (std::vector< sint8 > &cont) |
| Specialisation of serialCont() for vector<sint8>. More...
|
virtual void | serialCont (std::vector< bool > &cont) |
| Specialisation of serialCont() for vector<bool>. More...
|
|
Those method are a specialisation of template method "void serial(T&)".
|
virtual void | serial (uint8 &b) |
virtual void | serial (sint8 &b) |
virtual void | serial (uint16 &b) |
virtual void | serial (sint16 &b) |
virtual void | serial (uint32 &b) |
virtual void | serial (sint32 &b) |
virtual void | serial (uint64 &b) |
virtual void | serial (sint64 &b) |
virtual void | serial (float &b) |
virtual void | serial (double &b) |
virtual void | serial (bool &b) |
virtual void | serial (char &b) |
virtual void | serial (std::string &b) |
virtual void | serial (CBitMemStream &b) |
Protected Attributes |
uint | _FreeBits |
Detailed Description
Bit-oriented memory stream.
-
Author:
-
Olivier Cado , Nevrax France
-
Date:
-
2001
Definition at line 42 of file bit_mem_stream.h.
Constructor & Destructor Documentation
NLMISC::CBitMemStream::CBitMemStream |
( |
bool |
inputStream = false, |
|
|
uint32 |
defaultcapacity = 32 |
|
) |
|
|
NLMISC::CBitMemStream::CBitMemStream |
( |
const CBitMemStream & |
other |
) |
|
|
Member Function Documentation
virtual void NLMISC::CBitMemStream::clear |
( |
|
) |
[inline, virtual] |
|
sint32 NLMISC::CBitMemStream::getPosInBit |
( |
|
) |
[inline] |
|
virtual void NLMISC::CBitMemStream::invert |
( |
|
) |
[inline, virtual] |
|
virtual uint32 NLMISC::CBitMemStream::length |
( |
|
) |
const [inline, virtual] |
|
CBitMemStream& NLMISC::CBitMemStream::operator= |
( |
const CBitMemStream & |
other |
) |
[inline] |
|
void NLMISC::CBitMemStream::serial |
( |
CBitMemStream & |
b |
) |
[virtual] |
|
void NLMISC::CBitMemStream::serial |
( |
std::string & |
b |
) |
[virtual] |
|
virtual void NLMISC::CBitMemStream::serial |
( |
char & |
b |
) |
[inline, virtual] |
|
virtual void NLMISC::CBitMemStream::serial |
( |
bool & |
b |
) |
[inline, virtual] |
|
virtual void NLMISC::CBitMemStream::serial |
( |
double & |
b |
) |
[inline, virtual] |
|
void NLMISC::CBitMemStream::serial |
( |
float & |
b |
) |
[virtual] |
|
virtual void NLMISC::CBitMemStream::serial |
( |
sint64 & |
b |
) |
[inline, virtual] |
|
virtual void NLMISC::CBitMemStream::serial |
( |
uint64 & |
b |
) |
[inline, virtual] |
|
virtual void NLMISC::CBitMemStream::serial |
( |
sint32 & |
b |
) |
[inline, virtual] |
|
virtual void NLMISC::CBitMemStream::serial |
( |
uint32 & |
b |
) |
[inline, virtual] |
|
virtual void NLMISC::CBitMemStream::serial |
( |
sint16 & |
b |
) |
[inline, virtual] |
|
virtual void NLMISC::CBitMemStream::serial |
( |
uint16 & |
b |
) |
[inline, virtual] |
|
virtual void NLMISC::CBitMemStream::serial |
( |
sint8 & |
b |
) |
[inline, virtual] |
|
virtual void NLMISC::CBitMemStream::serial |
( |
uint8 & |
b |
) |
[inline, virtual] |
|
template<class T> |
void NLMISC::CBitMemStream::serial |
( |
T & |
obj |
) |
[inline] |
|
void NLMISC::CBitMemStream::serial |
( |
uint64 & |
value, |
|
|
uint |
nbits |
|
) |
[inline] |
|
void NLMISC::CBitMemStream::serial |
( |
uint32 & |
value, |
|
|
uint |
nbits, |
|
|
bool |
resetvalue = true |
|
) |
|
|
|
Serialize only the nbits lower bits of value (nbits range: [1..32]) When using this method, always leave resetvalue to true.
Definition at line 146 of file bit_mem_stream.cpp.
References NLMISC::CMemStream::_Buffer, NLMISC::CMemStream::_BufPos, _FreeBits, displayByteBits, displayDwordBits, getPosInBit, NLMISC::IStream::isReading, NLMISC::CMemStream::lengthR, NLMISC::toString, v, and value.
Referenced by serial, serialBit, serialBuffer, and serialCont. |
void NLMISC::CBitMemStream::serialBit |
( |
bool & |
bit |
) |
[virtual] |
|
void NLMISC::CBitMemStream::serialBuffer |
( |
uint8 * |
buf, |
|
|
uint |
len |
|
) |
[virtual] |
|
void NLMISC::CBitMemStream::serialCont |
( |
std::vector< bool > & |
cont |
) |
[virtual] |
|
virtual void NLMISC::CBitMemStream::serialCont |
( |
std::vector< sint8 > & |
cont |
) |
[inline, virtual] |
|
virtual void NLMISC::CBitMemStream::serialCont |
( |
std::vector< uint8 > & |
cont |
) |
[inline, virtual] |
|
template<class K, class T> |
void NLMISC::CBitMemStream::serialCont |
( |
std::multimap< K, T > & |
cont |
) |
[inline] |
|
template<class K, class T> |
void NLMISC::CBitMemStream::serialCont |
( |
std::map< K, T > & |
cont |
) |
[inline] |
|
template<class T> |
void NLMISC::CBitMemStream::serialCont |
( |
std::multiset< T > & |
cont |
) |
[inline] |
|
template<class T> |
void NLMISC::CBitMemStream::serialCont |
( |
std::set< T > & |
cont |
) |
[inline] |
|
template<class T> |
void NLMISC::CBitMemStream::serialCont |
( |
std::deque< T > & |
cont |
) |
[inline] |
|
template<class T> |
void NLMISC::CBitMemStream::serialCont |
( |
std::list< T > & |
cont |
) |
[inline] |
|
template<class T> |
void NLMISC::CBitMemStream::serialCont |
( |
std::vector< T > & |
cont |
) |
[inline] |
|
Member Data Documentation
uint NLMISC::CBitMemStream::_FreeBits [protected]
|
|
The documentation for this class was generated from the following files:
|
|