atlas
|
Handle to a shared eckit::DataHandle. More...
#include <Stream.h>
Public Member Functions | |
Stream ()=default | |
Default constructor. More... | |
Stream (eckit::DataHandle *) | |
Constructor taking ownership of datahandle. | |
Stream (std::shared_ptr< eckit::DataHandle >) | |
Constructor to share datahandle with a shared_ptr. | |
Stream (eckit::DataHandle &) | |
Constructor referencing datahandle, no ownership is taken. More... | |
Stream (const Stream &) | |
Assignment constructor sharing datahandle with other Stream. | |
eckit::DataHandle & | datahandle () |
Access internal eckit::DataHandle. | |
std::uint64_t | seek (std::uint64_t offset) |
Move position to given offset. | |
std::uint64_t | position () |
Return offset of current position. | |
std::uint64_t | write (const void *data, size_t length) |
Write data of given length (bytes) More... | |
std::uint64_t | read (void *data, size_t length) |
Read data of given length (bytes) More... | |
operator bool () const | |
Return true if pointer is valid;. | |
Handle to a shared eckit::DataHandle.
Note, a Stream is not intended to be opened and closed within atlas::io context The derived classes InputFileStream and OutputFileStream automatically open and close on construction an destruction.
|
default |
Default constructor.
atlas::io::Stream::Stream | ( | eckit::DataHandle & | datahandle | ) |
Constructor referencing datahandle, no ownership is taken.
uint64_t atlas::io::Stream::read | ( | void * | data, |
size_t | length | ||
) |
Read data of given length (bytes)
uint64_t atlas::io::Stream::write | ( | const void * | data, |
size_t | length | ||
) |
Write data of given length (bytes)