28 size_t write(
const void* d,
size_t n)
override 30 throw std::runtime_error(
31 "CArchiveStreamBase<std::istream>:" 32 "cannot write to an input stream.");
34 size_t read(
void* d,
size_t n)
override 36 if (
m_s.read(reinterpret_cast<char*>(d),
n))
53 size_t write(
const void* d,
size_t n)
override 55 if (
m_s.write(reinterpret_cast<const char*>(d),
n))
60 size_t read(
void* d,
size_t n)
override 62 throw std::runtime_error(
63 "CArchiveStreamBase<std::ostream>:" 64 "cannot read from output stream.");
78 size_t write(
const void* d,
size_t n)
override 80 if (
m_s.write(reinterpret_cast<const char*>(d),
n))
85 size_t read(
void* d,
size_t n)
override 87 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)