class
#include <eckit/io/SharedBuffer.h>
CountedBuffer A buffer that can be shared and is thread-safe Note that this buffer, once shared should be for read-only shared-access (at the moment) because access is not controlled by locking, only allocation and deallocation
Base classes
Constructors, destructors, conversion operators
- CountedBuffer(size_t size)
- operator char*()
- operator const char*() const
- operator void*()
- operator const void*() const
Public functions
- auto data() -> void*
- auto data() const -> const void*
- auto size() const -> size_t
- void zero()
- Zero content of buffer.
- void resize(size_t, bool preserveData = false)
- void copy(const void*, size_t size, size_t pos = 0)
- void attach() const
- void detach() const
- auto count() const -> size_t
- void lock() const
- void unlock() const
Function documentation
eckit:: CountedBuffer:: operator char*()
#include <eckit/io/Buffer.h>
eckit:: CountedBuffer:: operator const char*() const
#include <eckit/io/Buffer.h>
eckit:: CountedBuffer:: operator void*()
#include <eckit/io/Buffer.h>
eckit:: CountedBuffer:: operator const void*() const
#include <eckit/io/Buffer.h>
void* eckit:: CountedBuffer:: data()
#include <eckit/io/Buffer.h>
const void* eckit:: CountedBuffer:: data() const
#include <eckit/io/Buffer.h>
size_t eckit:: CountedBuffer:: size() const
#include <eckit/io/Buffer.h>
Returns | allocated size |
---|
void eckit:: CountedBuffer:: zero()
#include <eckit/io/Buffer.h>
Zero content of buffer.
void eckit:: CountedBuffer:: resize(size_t,
bool preserveData = false)
#include <eckit/io/Buffer.h>
void eckit:: CountedBuffer:: copy(const void*,
size_t size,
size_t pos = 0)
#include <eckit/io/Buffer.h>
Copy data of given size (bytes) into buffer at given position
void eckit:: CountedBuffer:: attach() const
#include <eckit/memory/Counted.h>
void eckit:: CountedBuffer:: detach() const
#include <eckit/memory/Counted.h>
size_t eckit:: CountedBuffer:: count() const
#include <eckit/memory/Counted.h>
void eckit:: CountedBuffer:: lock() const
#include <eckit/memory/Counted.h>
void eckit:: CountedBuffer:: unlock() const
#include <eckit/memory/Counted.h>