From caa7295990a7ef2977bccda1e4866af7274172f1 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Thu, 23 Jul 2015 14:10:50 +0200 Subject: [PATCH] archive with Input/Ouput variable --- libsrc/general/archive_base.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libsrc/general/archive_base.hpp b/libsrc/general/archive_base.hpp index 9531c7ac..1ea2ffa0 100644 --- a/libsrc/general/archive_base.hpp +++ b/libsrc/general/archive_base.hpp @@ -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;