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(const std::string& filename, std::function<void(int)> progressFun = nullptr);
|
||||||
|
|
||||||
~BinaryReader();
|
virtual ~BinaryReader();
|
||||||
|
|
||||||
/*! \brief Sets the Endianss of the stream
|
/*! \brief Sets the Endianss of the stream
|
||||||
*
|
*
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
*/
|
*/
|
||||||
BinaryWriter(const std::string& filename, std::function<void(int)> progressFun = nullptr);
|
BinaryWriter(const std::string& filename, std::function<void(int)> progressFun = nullptr);
|
||||||
|
|
||||||
~BinaryWriter();
|
virtual ~BinaryWriter();
|
||||||
|
|
||||||
/*! \brief Sets the Endianss of the stream
|
/*! \brief Sets the Endianss of the stream
|
||||||
*
|
*
|
||||||
|
|
|
@ -28,7 +28,7 @@ class FileReader : public Stream
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FileReader(const std::string& filename);
|
FileReader(const std::string& filename);
|
||||||
~FileReader();
|
virtual ~FileReader();
|
||||||
std::string filename() const;
|
std::string filename() const;
|
||||||
|
|
||||||
void setEndian(Endian endian);
|
void setEndian(Endian endian);
|
||||||
|
|
|
@ -26,7 +26,7 @@ class FileWriter : public Stream
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FileWriter(const std::string& filename);
|
FileWriter(const std::string& filename);
|
||||||
~FileWriter();
|
virtual ~FileWriter();
|
||||||
|
|
||||||
void setEndian(Endian endian);
|
void setEndian(Endian endian);
|
||||||
Endian endian() const;
|
Endian endian() const;
|
||||||
|
|
|
@ -28,7 +28,7 @@ std::ostream& operator<<(std::ostream& os, Endian& endian);
|
||||||
class Stream
|
class Stream
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual Stream() {}
|
||||||
|
|
||||||
virtual void setEndian(Endian) = 0;
|
virtual void setEndian(Endian) = 0;
|
||||||
virtual Endian endian() const= 0;
|
virtual Endian endian() const= 0;
|
||||||
|
|
Loading…
Reference in New Issue