27 size_t write(
const void* d,
size_t n)
override 29 throw std::runtime_error(
30 "CArchiveStreamBase<std::istream>:" 31 "cannot write to an input stream.");
33 size_t read(
void* d,
size_t n)
override 35 if (
m_s.read(reinterpret_cast<char*>(d),
n))
51 size_t write(
const void* d,
size_t n)
override 53 if (
m_s.write(reinterpret_cast<const char*>(d),
n))
58 size_t read(
void* d,
size_t n)
override 60 throw std::runtime_error(
61 "CArchiveStreamBase<std::ostream>:" 62 "cannot read from output stream.");
75 size_t write(
const void* d,
size_t n)
override 77 if (
m_s.write(reinterpret_cast<const char*>(d),
n))
82 size_t read(
void* d,
size_t n)
override 84 if (
m_s.read(reinterpret_cast<char*>(d),
n))
size_t write(const void *d, size_t n) override
Writes a block of bytes.
size_t write(const void *d, size_t n) override
Writes a block of bytes.
size_t read(void *d, size_t n) override
Reads a block of bytes.
size_t read(void *d, size_t n) override
Reads a block of bytes.
CArchive for mrpt::io::CStream classes (use as template argument).
Virtual base class for "archives": classes abstracting I/O streams.
size_t read(void *d, size_t n) override
Reads a block of bytes.
CArchiveStreamBase(std::ostream &s)
size_t write(const void *d, size_t n) override
Writes a block of bytes.
CArchiveStreamBase(std::iostream &s)
CArchiveStreamBase(std::istream &s)