|
PACS System 0.1.0
PACS DICOM system library
|
Pooled byte buffer for PDU data. More...
#include <pdu_buffer_pool.h>

Public Member Functions | |
| pooled_buffer ()=default | |
| void | clear () noexcept |
| Clear the buffer contents (keeps capacity) | |
| void | resize (std::size_t new_size) |
| Resize the buffer. | |
| void | reserve (std::size_t capacity) |
| Reserve capacity. | |
| auto | size () const noexcept -> std::size_t |
| Get the current size. | |
| auto | capacity () const noexcept -> std::size_t |
| Get the current capacity. | |
| auto | data () noexcept -> uint8_t * |
| Get raw pointer to data. | |
| auto | data () const noexcept -> const uint8_t * |
| Get const raw pointer to data. | |
| auto | vector () noexcept -> std::vector< uint8_t > & |
| Get reference to underlying vector. | |
| auto | vector () const noexcept -> const std::vector< uint8_t > & |
| Get const reference to underlying vector. | |
| auto | operator[] (std::size_t index) -> uint8_t & |
| Array access operator. | |
| auto | operator[] (std::size_t index) const -> const uint8_t & |
| Const array access operator. | |
Private Attributes | |
| std::vector< uint8_t > | data_ |
Pooled byte buffer for PDU data.
Wraps a std::vector<uint8_t> with pooled allocation semantics. The buffer can be resized without reallocating if the capacity is sufficient.
Definition at line 75 of file pdu_buffer_pool.h.
|
default |
|
inlinenodiscardnoexcept |
Get the current capacity.
Definition at line 108 of file pdu_buffer_pool.h.
References data_.
Referenced by reserve().

|
inlinenoexcept |
Clear the buffer contents (keeps capacity)
Definition at line 82 of file pdu_buffer_pool.h.
References data_.
|
inlinenodiscardnoexcept |
Get const raw pointer to data.
Definition at line 122 of file pdu_buffer_pool.h.
References data_.
|
inlinenodiscardnoexcept |
Get raw pointer to data.
Definition at line 116 of file pdu_buffer_pool.h.
References data_.
|
inlinenodiscard |
|
inlinenodiscard |
|
inline |
Reserve capacity.
| capacity | Capacity to reserve |
Definition at line 94 of file pdu_buffer_pool.h.
References capacity(), and data_.

|
inline |
Resize the buffer.
| new_size | New size in bytes |
Definition at line 88 of file pdu_buffer_pool.h.
References data_.
|
inlinenodiscardnoexcept |
Get the current size.
Definition at line 100 of file pdu_buffer_pool.h.
References data_.
|
inlinenodiscardnoexcept |
Get const reference to underlying vector.
Definition at line 138 of file pdu_buffer_pool.h.
References data_.
|
inlinenodiscardnoexcept |
Get reference to underlying vector.
Definition at line 130 of file pdu_buffer_pool.h.
References data_.
|
private |
Definition at line 157 of file pdu_buffer_pool.h.
Referenced by capacity(), clear(), data(), data(), operator[](), operator[](), reserve(), resize(), size(), vector(), and vector().