4.6.0
Freundlich's C++ toolkit
|
A contiguous container for uninitialized data that contains a write and a read area.
T | Must be a trivial type. |
A | The allocator type. |
See fcppt.container.buffer for more information.
Public Types | |
using | value_type = T |
using | allocator_type = A |
using | size_type = typename std::allocator_traits<A>::size_type |
using | pointer = typename std::allocator_traits<A>::pointer |
using | const_pointer = typename std::allocator_traits<A>::const_pointer |
using | const_reference = T const & |
using | const_iterator = const_pointer |
Public Member Functions | |
object (size_type write_sz) | |
Constructs an uninitialized buffer. | |
object (size_type write_sz, A) | |
Constructs an uninitialized buffer with custom allocator. | |
object (object &&) noexcept | |
object & | operator= (object &&) noexcept |
~object () noexcept | |
const_iterator | begin () const noexcept |
The beginning of the read area. | |
const_iterator | end () const noexcept |
The end of the read area. | |
const_reference | operator[] (size_type) const noexcept |
The read area at a given position. | |
const_pointer | read_data () const noexcept |
The beginning of the read area. | |
const_pointer | read_data_end () const noexcept |
The end of the read area. | |
pointer | write_data () noexcept |
The beginning of the write area. | |
pointer | write_data_end () noexcept |
The end of the write area. | |
size_type | read_size () const noexcept |
The size of the read area. | |
size_type | write_size () const noexcept |
The size of the write area. | |
void | written (size_type sz) noexcept |
Adds to the read area. | |
void | resize_write_area (size_type sz) |
Resizes the write area. | |
allocator_type | get_allocator () const |
void | swap (object &) noexcept |
fcppt::container::raw_vector::rep< A > | release () noexcept |
Releases the storage. | |
using fcppt::container::buffer::object< T, A >::allocator_type = A |
using fcppt::container::buffer::object< T, A >::const_iterator = const_pointer |
using fcppt::container::buffer::object< T, A >::const_pointer = typename std::allocator_traits<A>::const_pointer |
using fcppt::container::buffer::object< T, A >::const_reference = T const & |
using fcppt::container::buffer::object< T, A >::pointer = typename std::allocator_traits<A>::pointer |
using fcppt::container::buffer::object< T, A >::size_type = typename std::allocator_traits<A>::size_type |
using fcppt::container::buffer::object< T, A >::value_type = T |
|
explicit |
Constructs an uninitialized buffer.
Constructs a buffer with a write area of size sz.
fcppt::container::buffer::object< T, A >::object | ( | size_type | write_sz, |
A | ) |
Constructs an uninitialized buffer with custom allocator.
Constructs a buffer with a write area of size sz.
|
noexcept |
|
noexcept |
|
nodiscardnoexcept |
The beginning of the read area.
|
nodiscardnoexcept |
The end of the read area.
|
nodiscard |
|
noexcept |
|
nodiscardnoexcept |
The read area at a given position.
|
nodiscardnoexcept |
The beginning of the read area.
|
nodiscardnoexcept |
The end of the read area.
|
nodiscardnoexcept |
The size of the read area.
|
nodiscardnoexcept |
Releases the storage.
void fcppt::container::buffer::object< T, A >::resize_write_area | ( | size_type | sz | ) |
Resizes the write area.
Sets the size of the write area to sz.
|
noexcept |
|
nodiscardnoexcept |
The beginning of the write area.
|
nodiscardnoexcept |
The end of the write area.
|
nodiscardnoexcept |
The size of the write area.
|
noexcept |
Adds to the read area.
Adds sz elements to the read area. This function should be called after data has been read into the write area.