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
{
bool is_output;
public:
virtual bool Output () = 0;
virtual bool Input () { return !Output(); }
Archive (bool ais_output) : is_output(ais_output) { ; }
bool Output () { return is_output; }
bool Input () { return !is_output; }
virtual Archive & operator & (double & d) = 0;
virtual Archive & operator & (int & i) = 0;