#include <ManagedBuffer.hpp>
A ManagedBuffer is a buffer that interacts with a BufferManager. The ManagedBuffer maintains a reference count, and when no more copies are held by the user, the ManagedBuffer will be returned to the BufferManager; unless the BufferManager has been deleted.
Pothos::ManagedBuffer::ManagedBuffer |
( |
void |
| ) |
|
|
inline |
Create a null buffer. All fields are initialized to zero.
Pothos::ManagedBuffer::~ManagedBuffer |
( |
void |
| ) |
|
|
inline |
Pothos::ManagedBuffer::ManagedBuffer |
( |
const ManagedBuffer & |
obj | ) |
|
|
inline |
Get the internal buffer as set by the manager and which cannot be changed by the caller.
- Returns
- a const reference to the buffer
Get the associated buffer manager.
Get the next contiguous buffer in the chain. Or return a null managed buffer if there is none.
size_t Pothos::ManagedBuffer::getSlabIndex |
( |
void |
| ) |
const |
|
inline |
Get the slab index associated with this buffer. The slab index related to implementation specifics. Typically, this index is only used when the underlying buffer is sourced from a continuous slab of memory.
Pothos::ManagedBuffer::operator bool |
( |
void |
| ) |
const |
|
inlineexplicit |
Is this managed buffer valid?
- Returns
- true if it holds an allocation.
bool Pothos::ManagedBuffer::operator< |
( |
const ManagedBuffer & |
rhs | ) |
const |
|
inline |
void Pothos::ManagedBuffer::reset |
( |
void |
| ) |
|
|
inline |
Reset any reference held by the managed buffer. This managed buffer will become a null buffer.
void Pothos::ManagedBuffer::reset |
( |
std::shared_ptr< BufferManager > |
manager, |
|
|
const SharedBuffer & |
buff, |
|
|
const size_t |
slabIndex = 0 |
|
) |
| |
Reset the managed buffer for its next usage.
- Parameters
-
manager | shared pointer to the buffer manager |
buff | the shared buffer with memory and length |
slabIndex | an identifying index used with slabs |
void Pothos::ManagedBuffer::setNextBuffer |
( |
const ManagedBuffer & |
next | ) |
|
|
inline |
Set the next contiguous buffer in the chain.
bool Pothos::ManagedBuffer::unique |
( |
void |
| ) |
const |
|
inline |
Is the reference to the managed buffer unique?
- Returns
- true if this is the only copy of the managed buffer
size_t Pothos::ManagedBuffer::useCount |
( |
void |
| ) |
const |
|
inline |
The number of copies of the managed buffer.
Equality operator for ManagedBuffer. True when the containers are identical.
The documentation for this class was generated from the following file: