archive with Input/Ouput variable

This commit is contained in:
Joachim Schoeberl 2015-07-23 14:10:50 +02:00
parent 700d1b9163
commit caa7295990

View File

@ -8,9 +8,11 @@ namespace ngstd
class Archive class Archive
{ {
bool is_output;
public: public:
virtual bool Output () = 0; Archive (bool ais_output) : is_output(ais_output) { ; }
virtual bool Input () { return !Output(); } bool Output () { return is_output; }
bool Input () { return !is_output; }
virtual Archive & operator & (double & d) = 0; virtual Archive & operator & (double & d) = 0;
virtual Archive & operator & (int & i) = 0; virtual Archive & operator & (int & i) = 0;