mirror of https://github.com/libAthena/athena.git
* Make streams polymorphic
This commit is contained in:
parent
39f7ed55fc
commit
1abbf80cef
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -26,7 +26,7 @@ class FileWriter : public Stream
|
|||
{
|
||||
public:
|
||||
FileWriter(const std::string& filename);
|
||||
~FileWriter();
|
||||
virtual ~FileWriter();
|
||||
|
||||
void setEndian(Endian endian);
|
||||
Endian endian() const;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue