asio 0.3.8rc3 | Home | Reference | Tutorial | Examples | Design

Reference | Class Hierarchy | Class Index | Member Index

# asio::mutable_buffer Class Reference

Inherited by asio::mutable_buffers_1.

Inheritance diagram for asio::mutable_buffer:

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 PointerToPodType>
PointerToPodType | 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

asio::mutable_buffer::mutable_buffer | ( |  | ) |

Construct an empty buffer.

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 PointerToPodType>

PointerToPodType 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.

asio 0.3.8rc3 | Home | Reference | Tutorial | Examples | Design