* Make streams polymorphic

This commit is contained in:
Phillip Stephens 2015-01-28 22:31:14 -08:00
parent 39f7ed55fc
commit 1abbf80cef
5 changed files with 5 additions and 5 deletions

View File

@ -48,7 +48,7 @@ public:
*/
BinaryReader(const std::string& filename, std::function<void(int)> progressFun = nullptr);
~BinaryReader();
virtual ~BinaryReader();
/*! \brief Sets the Endianss of the stream
*

View File

@ -49,7 +49,7 @@ public:
*/
BinaryWriter(const std::string& filename, std::function<void(int)> progressFun = nullptr);
~BinaryWriter();
virtual ~BinaryWriter();
/*! \brief Sets the Endianss of the stream
*

View File

@ -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);

View File

@ -26,7 +26,7 @@ class FileWriter : public Stream
{
public:
FileWriter(const std::string& filename);
~FileWriter();
virtual ~FileWriter();
void setEndian(Endian endian);
Endian endian() const;

View File

@ -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;