CppCMS
Classes | Public Types | Public Member Functions | List of all members
booster::aio::buffer_impl< Pointer > Class Template Reference

This is a base class that represents a buffer - a set of contiguous chunks of memory that can be transfered over network. More...

#include <booster/booster/aio/buffer.h>

Classes

struct  entry
 

Public Types

typedef std::pair< entry const *, size_t > buffer_data_type
 A pair that defined the chunk.
 

Public Member Functions

 buffer_impl ()
 
std::pair< entry const *, size_t > get () const
 
void add (Pointer p, size_t s)
 
bool empty () const
 
size_t size () const
 
size_t bytes_count () const
 

Detailed Description

template<typename Pointer>
class booster::aio::buffer_impl< Pointer >

This is a base class that represents a buffer - a set of contiguous chunks of memory that can be transfered over network.

The Pointer parameter should be either char const * or char *

Constructor & Destructor Documentation

template<typename Pointer>
booster::aio::buffer_impl< Pointer >::buffer_impl ( )
inline

Create an empty buffer

Member Function Documentation

template<typename Pointer>
void booster::aio::buffer_impl< Pointer >::add ( Pointer  p,
size_t  s 
)
inline

Append a chunk to the buffer

Referenced by booster::aio::buffer(), and booster::aio::const_buffer::const_buffer().

template<typename Pointer>
size_t booster::aio::buffer_impl< Pointer >::bytes_count ( ) const
inline

Get total amount of bytes in the buffer

New in CppCMS 1.2

template<typename Pointer>
bool booster::aio::buffer_impl< Pointer >::empty ( ) const
inline

Check if the buffer is empty

template<typename Pointer>
std::pair<entry const *,size_t> booster::aio::buffer_impl< Pointer >::get ( ) const
inline
template<typename Pointer>
size_t booster::aio::buffer_impl< Pointer >::size ( ) const
inline

Get size of buffer in number of chunks,i.e.

New in CppCMS 1.2


The documentation for this class was generated from the following file: