Changeset View
Changeset View
Standalone View
Standalone View
src/streams.h
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | public: | ||||
} | } | ||||
void write(const char *pch, size_t nSize) { stream->write(pch, nSize); } | void write(const char *pch, size_t nSize) { stream->write(pch, nSize); } | ||||
void read(char *pch, size_t nSize) { stream->read(pch, nSize); } | void read(char *pch, size_t nSize) { stream->read(pch, nSize); } | ||||
int GetVersion() const { return nVersion; } | int GetVersion() const { return nVersion; } | ||||
int GetType() const { return nType; } | int GetType() const { return nType; } | ||||
void ignore(size_t size) { return stream->ignore(size); } | |||||
}; | }; | ||||
template <typename S> OverrideStream<S> WithOrVersion(S *s, int nVersionFlag) { | template <typename S> OverrideStream<S> WithOrVersion(S *s, int nVersionFlag) { | ||||
return OverrideStream<S>(s, s->GetType(), s->GetVersion() | nVersionFlag); | return OverrideStream<S>(s, s->GetType(), s->GetVersion() | nVersionFlag); | ||||
} | } | ||||
/** | /** | ||||
* Minimal stream for overwriting and/or appending to an existing byte vector. | * Minimal stream for overwriting and/or appending to an existing byte vector. | ||||
▲ Show 20 Lines • Show All 790 Lines • Show Last 20 Lines |