From 1abbf80cefe51fcaa2059c68ed5a8e6ae8c2c20c Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Wed, 28 Jan 2015 22:31:14 -0800 Subject: [PATCH] * Make streams polymorphic --- include/Athena/BinaryReader.hpp | 2 +- include/Athena/BinaryWriter.hpp | 2 +- include/Athena/FileReader.hpp | 2 +- include/Athena/FileWriter.hpp | 2 +- include/Athena/Stream.hpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/Athena/BinaryReader.hpp b/include/Athena/BinaryReader.hpp index e12c6f6..c0688a0 100644 --- a/include/Athena/BinaryReader.hpp +++ b/include/Athena/BinaryReader.hpp @@ -48,7 +48,7 @@ public: */ BinaryReader(const std::string& filename, std::function progressFun = nullptr); - ~BinaryReader(); + virtual ~BinaryReader(); /*! \brief Sets the Endianss of the stream * diff --git a/include/Athena/BinaryWriter.hpp b/include/Athena/BinaryWriter.hpp index 87a297e..d464974 100644 --- a/include/Athena/BinaryWriter.hpp +++ b/include/Athena/BinaryWriter.hpp @@ -49,7 +49,7 @@ public: */ BinaryWriter(const std::string& filename, std::function progressFun = nullptr); - ~BinaryWriter(); + virtual ~BinaryWriter(); /*! \brief Sets the Endianss of the stream * diff --git a/include/Athena/FileReader.hpp b/include/Athena/FileReader.hpp index d99111a..ddc2125 100644 --- a/include/Athena/FileReader.hpp +++ b/include/Athena/FileReader.hpp @@ -28,7 +28,7 @@ class FileReader : public Stream { public: FileReader(const std::string& filename); - ~FileReader(); + virtual ~FileReader(); std::string filename() const; void setEndian(Endian endian); diff --git a/include/Athena/FileWriter.hpp b/include/Athena/FileWriter.hpp index 07902ba..d63a3af 100644 --- a/include/Athena/FileWriter.hpp +++ b/include/Athena/FileWriter.hpp @@ -26,7 +26,7 @@ class FileWriter : public Stream { public: FileWriter(const std::string& filename); - ~FileWriter(); + virtual ~FileWriter(); void setEndian(Endian endian); Endian endian() const; diff --git a/include/Athena/Stream.hpp b/include/Athena/Stream.hpp index a7cc069..198843f 100644 --- a/include/Athena/Stream.hpp +++ b/include/Athena/Stream.hpp @@ -28,7 +28,7 @@ std::ostream& operator<<(std::ostream& os, Endian& endian); class Stream { public: - + virtual Stream() {} virtual void setEndian(Endian) = 0; virtual Endian endian() const= 0;