6 #ifndef MYRAMATH_IO_STREAMS_H 7 #define MYRAMATH_IO_STREAMS_H 21 template<
class T>
class ReaderWriter;
24 template<
class T>
class ReaderWriter
42 virtual void write_binary (
const char* p,
size_t n) = 0;
50 virtual void read_binary (
char* p,
size_t n) = 0;
56 { t = in.read<T>();
return in; }
60 { out.write(t);
return out; }
Abstraction layer, serializable objects write themselves to these.
Definition: Streams.h:39
static T read(InputStream &in)
.. read() should try to delegate to a stream constructor, return T(in)
Definition: Streams.h:29
static void write(const T &t, OutputStream &out)
.. and write() should try to delegate to a member function, T.write(out)
Definition: Streams.h:33