libzmq  master
ZeroMQ C++ Core Engine (LIBZMQ)
zmq::decoder_base_t< T, A > Class Template Reference

#include <decoder.hpp>

Inheritance diagram for zmq::decoder_base_t< T, A >:
Collaboration diagram for zmq::decoder_base_t< T, A >:

Public Member Functions

 decoder_base_t (A *allocator_)
 
virtual ~decoder_base_t ()
 
int decode (const unsigned char *data_, std::size_t size_, std::size_t &bytes_used_)
 
void get_buffer (unsigned char **data_, std::size_t *size_)
 
virtual void resize_buffer (std::size_t new_size)
 
- Public Member Functions inherited from zmq::i_decoder
virtual ~i_decoder ()
 
virtual int decode (const unsigned char *data_, size_t size_, size_t &processed)=0
 
virtual void get_buffer (unsigned char **data_, size_t *size_)=0
 
virtual msg_tmsg ()=0
 
virtual void resize_buffer (size_t)=0
 

Protected Types

typedef int(T::* step_t) (unsigned char const *)
 

Protected Member Functions

void next_step (void *read_pos_, std::size_t to_read_, step_t next_)
 

Private Member Functions

 decoder_base_t (const decoder_base_t &)
 
const decoder_base_toperator= (const decoder_base_t &)
 

Private Attributes

A * allocator
 
unsigned char * buf
 
step_t next
 
unsigned char * read_pos
 
std::size_t to_read
 

Detailed Description

template<typename T, typename A = c_single_allocator>
class zmq::decoder_base_t< T, A >

Definition at line 58 of file decoder.hpp.

Member Typedef Documentation

template<typename T, typename A = c_single_allocator>
typedef int(T:: * zmq::decoder_base_t< T, A >::step_t) (unsigned char const *)
protected

Definition at line 165 of file decoder.hpp.

Constructor & Destructor Documentation

template<typename T, typename A = c_single_allocator>
zmq::decoder_base_t< T, A >::decoder_base_t ( A *  allocator_)
inlineexplicit

Definition at line 62 of file decoder.hpp.

template<typename T, typename A = c_single_allocator>
virtual zmq::decoder_base_t< T, A >::~decoder_base_t ( )
inlinevirtual

Definition at line 73 of file decoder.hpp.

template<typename T, typename A = c_single_allocator>
zmq::decoder_base_t< T, A >::decoder_base_t ( const decoder_base_t< T, A > &  )
private

Member Function Documentation

template<typename T, typename A = c_single_allocator>
int zmq::decoder_base_t< T, A >::decode ( const unsigned char *  data_,
std::size_t  size_,
std::size_t &  bytes_used_ 
)
inline

Definition at line 107 of file decoder.hpp.

template<typename T, typename A = c_single_allocator>
void zmq::decoder_base_t< T, A >::get_buffer ( unsigned char **  data_,
std::size_t *  size_ 
)
inline

Definition at line 79 of file decoder.hpp.

template<typename T, typename A = c_single_allocator>
void zmq::decoder_base_t< T, A >::next_step ( void *  read_pos_,
std::size_t  to_read_,
step_t  next_ 
)
inlineprotected

Definition at line 169 of file decoder.hpp.

template<typename T, typename A = c_single_allocator>
const decoder_base_t& zmq::decoder_base_t< T, A >::operator= ( const decoder_base_t< T, A > &  )
private
template<typename T, typename A = c_single_allocator>
virtual void zmq::decoder_base_t< T, A >::resize_buffer ( std::size_t  new_size)
inlinevirtual

Definition at line 156 of file decoder.hpp.

Member Data Documentation

template<typename T, typename A = c_single_allocator>
unsigned char* zmq::decoder_base_t< T, A >::buf
private