All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes | Friends | Related Functions
asio::mutable_buffer Class Reference

Holds a buffer that can be modified. More...

#include <buffer.hpp>

Inheritance diagram for asio::mutable_buffer:
Inheritance graph
[legend]

List of all members.

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.

Private Attributes

void * data_
std::size_t size_

Friends

void * asio::detail::buffer_cast_helper (const mutable_buffer &b)
std::size_t asio::detail::buffer_size_helper (const mutable_buffer &b)

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.

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.

Definition at line 69 of file buffer.hpp.


Constructor & Destructor Documentation

Construct an empty buffer.

Definition at line 73 of file buffer.hpp.

asio::mutable_buffer::mutable_buffer ( void *  data,
std::size_t  size 
) [inline]

Construct a buffer to represent a given memory range.

Definition at line 80 of file buffer.hpp.


Friends And Related Function Documentation

void* asio::detail::buffer_cast_helper ( const mutable_buffer b) [friend]
std::size_t asio::detail::buffer_size_helper ( const mutable_buffer b) [friend]
template<typename PointerToPodType >
PointerToPodType buffer_cast ( const mutable_buffer b) [related]

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

Definition at line 138 of file buffer.hpp.

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

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

Definition at line 147 of file buffer.hpp.

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.

Definition at line 156 of file buffer.hpp.

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.

Definition at line 173 of file buffer.hpp.


Member Data Documentation

void* asio::mutable_buffer::data_ [private]

Definition at line 107 of file buffer.hpp.

std::size_t asio::mutable_buffer::size_ [private]

Definition at line 108 of file buffer.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Castor
Author(s): Carpe Noctem
autogenerated on Fri Nov 8 2013 11:05:41