Boost C++ Libraries Home Libraries People FAQ More

Home | Reference | Tutorial | Examples | Design
Reference Index | Class Hierarchy | Class Index | Member Index

boost::asio::mutable_buffer Class Reference

Inherited by boost::asio::mutable_buffer_container_1.

Inheritance diagram for boost::asio::mutable_buffer:

Inheritance graph
List of all members.

Detailed Description

Holds a buffer that can be modified.

The mutable_buffer class provides a safe representation of a buffer that can be modified. It does not own the underlying data, and so is cheap to copy or assign.


Public Member Functions

 mutable_buffer ()
 Construct an empty buffer.
 mutable_buffer (void *data, std::size_t size)
 Construct a buffer to represent a given memory range.

Related Functions

(Note that these are not member functions.)

template<typename Pointer_To_Pod_Type>
Pointer_To_Pod_Type buffer_cast (const mutable_buffer &b)
 Cast a non-modifiable buffer to a specified pointer to POD type.
std::size_t buffer_size (const mutable_buffer &b)
 Get the number of bytes in a non-modifiable buffer.
mutable_buffer operator+ (const mutable_buffer &b, std::size_t start)
 Create a new modifiable buffer that is offset from the start of another.
mutable_buffer operator+ (std::size_t start, const mutable_buffer &b)
 Create a new modifiable buffer that is offset from the start of another.


Constructor & Destructor Documentation

boost::asio::mutable_buffer::mutable_buffer (  ) 

Construct an empty buffer.

boost::asio::mutable_buffer::mutable_buffer ( void *  data,
std::size_t  size 
)

Construct a buffer to represent a given memory range.


Friends And Related Function Documentation

template<typename Pointer_To_Pod_Type>
Pointer_To_Pod_Type buffer_cast ( const mutable_buffer b  )  [related]

Cast a non-modifiable buffer to a specified pointer to POD type.

std::size_t buffer_size ( const mutable_buffer b  )  [related]

Get the number of bytes in a non-modifiable buffer.

mutable_buffer operator+ ( const mutable_buffer b,
std::size_t  start 
) [related]

Create a new modifiable buffer that is offset from the start of another.

mutable_buffer operator+ ( std::size_t  start,
const mutable_buffer b 
) [related]

Create a new modifiable buffer that is offset from the start of another.

Copyright © 2003 - 2006 Christopher M. Kohlhoff


Home | Reference | Tutorial | Examples | Design