From a7cac9e4234125e5d84d4e13a1592d65e4b6e664 Mon Sep 17 00:00:00 2001 From: "w.klijn" <nonoice@gmail.com> Date: Fri, 12 Aug 2016 14:25:49 +0200 Subject: [PATCH] Add good bit accessor --- src/communication/exporter_interface.hpp | 3 +++ src/communication/exporter_spike_file.hpp | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/communication/exporter_interface.hpp b/src/communication/exporter_interface.hpp index a4135718..6c22fdde 100644 --- a/src/communication/exporter_interface.hpp +++ b/src/communication/exporter_interface.hpp @@ -22,6 +22,9 @@ public: // Performs the export of the data virtual void do_export(const std::vector<spike_type>&) = 0; + + // Returns the status of the exporter + bool good() const; }; } //communication diff --git a/src/communication/exporter_spike_file.hpp b/src/communication/exporter_spike_file.hpp index cf3e43df..adf185d8 100644 --- a/src/communication/exporter_spike_file.hpp +++ b/src/communication/exporter_spike_file.hpp @@ -58,6 +58,11 @@ public: } } + bool good() const + { + return file_handle_.good(); + } + // Creates an indexed filename static std::string create_output_file_path(const std::string& file_name, const std::string& path, const std::string& file_extention, unsigned index) -- GitLab