Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals | Examples

bm::encoder Class Reference

Memory encoding. More...

#include <encoding.h>


Public Member Functions

 encoder (unsigned char *buf, unsigned size)
 Construction.
void put_8 (unsigned char c)
 Puts one character into the encoding buffer.
void put_16 (bm::short_t s)
 Puts short word (16 bits) into the encoding buffer.
void put_16 (const bm::short_t *s, unsigned count)
 Method puts array of short words (16 bits) into the encoding buffer.
void put_32 (bm::word_t w)
 Puts 32 bits word into encoding buffer.
void put_32 (const bm::word_t *w, unsigned count)
 Encodes array of 32-bit words.
unsigned size () const
 Returns size of the current encoding stream.


Detailed Description

Memory encoding.

Class for encoding data into memory. Properly handles aligment issues with integer data types.

Definition at line 44 of file encoding.h.


Constructor & Destructor Documentation

bm::encoder::encoder unsigned char *  buf,
unsigned  size
[inline]
 

Construction.

Parameters:
buf - memory buffer pointer.
size - size of the buffer

Definition at line 136 of file encoding.h.


Member Function Documentation

void bm::encoder::put_16 const bm::short_t s,
unsigned  count
[inline]
 

Method puts array of short words (16 bits) into the encoding buffer.

Definition at line 166 of file encoding.h.

BMFORCEINLINE void bm::encoder::put_16 bm::short_t  s  ) 
 

Puts short word (16 bits) into the encoding buffer.

Parameters:
s - short word to encode

Definition at line 156 of file encoding.h.

References BMFORCEINLINE.

void bm::encoder::put_32 const bm::word_t w,
unsigned  count
[inline]
 

Encodes array of 32-bit words.

Definition at line 211 of file encoding.h.

BMFORCEINLINE void bm::encoder::put_32 bm::word_t  w  ) 
 

Puts 32 bits word into encoding buffer.

Parameters:
w - word to encode.

Definition at line 199 of file encoding.h.

References BMFORCEINLINE.

BMFORCEINLINE void bm::encoder::put_8 unsigned char  c  ) 
 

Puts one character into the encoding buffer.

Parameters:
c - character to encode

Definition at line 146 of file encoding.h.

References BMFORCEINLINE.

unsigned bm::encoder::size  )  const [inline]
 

Returns size of the current encoding stream.

Definition at line 189 of file encoding.h.


The documentation for this class was generated from the following file:
Generated on Sun Aug 5 14:12:40 2007 for BitMagic by  doxygen 1.4.1