eckit::MemoryHandle class

Base classes

class DataHandle

Public static functions

static auto classSpec() -> const ClassSpec&

Constructors, destructors, conversion operators

MemoryHandle(const Buffer&)
MemoryHandle(Buffer&)
MemoryHandle(const void* address, size_t size)
MemoryHandle(void* address, size_t size)
MemoryHandle(size_t size = 1024*1024, bool grow = true)
~MemoryHandle() override

Public functions

auto data() const -> const void*
auto str() const -> std::string
auto size() const -> Length
auto openForRead() -> Length override
void openForWrite(const Length&) override
void openForAppend(const Length&) override
auto read(void*, long) -> long override
auto write(const void*, long) -> long override
void close() override
void flush() override
void rewind() override
void print(std::ostream&) const override
void skip(const Length&) override
auto seek(const Offset&) -> Offset override
auto canSeek() const -> bool override
auto size() -> Length override
auto estimate() -> Length override
auto position() -> Offset override
auto clone() const -> DataHandle* override
void restartReadFrom(const Offset&) virtual
void restartWriteFrom(const Offset&) virtual
auto saveInto(DataHandle&, TransferWatcher& = TransferWatcher::dummy()) -> Length virtual
Save into an other datahandle.
auto saveInto(const PathName&, TransferWatcher& = TransferWatcher::dummy()) -> Length virtual
Save into a file.
auto copyTo(DataHandle&, long bufsize = -1, Length maxsize = -1, TransferWatcher& = TransferWatcher::dummy()) -> Length virtual
auto name() const -> std::string virtual
auto openf(const char* mode, bool delete_on_close = false) -> FILE*
Create a FILE* from this handle.
auto openf(bool delete_on_close = false) -> FILE*
auto compare(DataHandle&) -> bool
Compare bytes.
auto compress(bool = false) -> bool virtual
auto merge(DataHandle*) -> bool virtual
auto isEmpty() const -> bool virtual
auto moveable() const -> bool virtual
void toLocal(Stream& s) const virtual
auto toLocal() -> DataHandle* virtual
void toRemote(Stream& s) const virtual
void selectMover(MoverTransferSelection&, bool read) const virtual
auto metricsTag() const -> std::string virtual
void collectMetrics(const std::string& what) const virtual
void hash(MD5& md5) const virtual
auto doubleBufferOK() const -> bool virtual
void encode(Stream&) const override
auto reanimator() const -> const ReanimatorBase& override
auto className() const -> std::string virtual

Private functions

auto title() const -> std::string override

Function documentation

static const ClassSpec& eckit::MemoryHandle::classSpec()

const void* eckit::MemoryHandle::data() const

Access the underlying buffer Size is provided by both the non-const overriden virtual function size() and the const version (available only on this class)

void eckit::MemoryHandle::restartReadFrom(const Offset&) virtual

void eckit::MemoryHandle::restartWriteFrom(const Offset&) virtual

Length eckit::MemoryHandle::saveInto(DataHandle&, TransferWatcher& = TransferWatcher::dummy()) virtual

Save into an other datahandle.

Length eckit::MemoryHandle::saveInto(const PathName&, TransferWatcher& = TransferWatcher::dummy()) virtual

Save into a file.

Length eckit::MemoryHandle::copyTo(DataHandle&, long bufsize = -1, Length maxsize = -1, TransferWatcher& = TransferWatcher::dummy()) virtual

Quiet version of saveInto Does not support progess, restart and double buffering

std::string eckit::MemoryHandle::name() const virtual

FILE* eckit::MemoryHandle::openf(const char* mode, bool delete_on_close = false)

Create a FILE* from this handle.

FILE* eckit::MemoryHandle::openf(bool delete_on_close = false)

bool eckit::MemoryHandle::compare(DataHandle&)

Compare bytes.

bool eckit::MemoryHandle::compress(bool = false) virtual

bool eckit::MemoryHandle::merge(DataHandle*) virtual

bool eckit::MemoryHandle::isEmpty() const virtual

bool eckit::MemoryHandle::moveable() const virtual

void eckit::MemoryHandle::toLocal(Stream& s) const virtual

DataHandle* eckit::MemoryHandle::toLocal() virtual

void eckit::MemoryHandle::toRemote(Stream& s) const virtual

void eckit::MemoryHandle::selectMover(MoverTransferSelection&, bool read) const virtual

std::string eckit::MemoryHandle::metricsTag() const virtual

void eckit::MemoryHandle::collectMetrics(const std::string& what) const virtual

void eckit::MemoryHandle::hash(MD5& md5) const virtual

bool eckit::MemoryHandle::doubleBufferOK() const virtual

void eckit::MemoryHandle::encode(Stream&) const override

const ReanimatorBase& eckit::MemoryHandle::reanimator() const override

std::string eckit::MemoryHandle::className() const virtual