+ template <typename Ty>
+ BaseStream &operator >> (Ty &Thing) {
+ if (Stream) *Stream >> Thing;
+ return *this;
+ }
+
+ template <typename Ty>
+ BaseStream &write(const Ty &A, unsigned N) {
+ if (Stream) Stream->write(A, N);
+ return *this;
+ }
+
+ operator StreamTy* () { return Stream; }
+
+ bool operator == (const StreamTy &S) { return &S == Stream; }
+ bool operator != (const StreamTy &S) { return !(*this == S); }
+ bool operator == (const BaseStream &S) { return S.Stream == Stream; }
+ bool operator != (const BaseStream &S) { return !(*this == S); }