2015-06-26 19:30:03 +00:00
|
|
|
#ifndef __NOD_IDISC_IO__
|
|
|
|
#define __NOD_IDISC_IO__
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
namespace NOD
|
|
|
|
{
|
|
|
|
|
|
|
|
class IDiscIO
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~IDiscIO() {}
|
|
|
|
|
|
|
|
class IReadStream
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual size_t read(void* buf, size_t length)=0;
|
|
|
|
};
|
2015-06-26 20:01:15 +00:00
|
|
|
virtual std::unique_ptr<IReadStream> beginReadStream(size_t offset)=0;
|
2015-06-26 19:30:03 +00:00
|
|
|
|
|
|
|
class IWriteStream
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual size_t write(void* buf, size_t length)=0;
|
|
|
|
};
|
2015-06-26 20:01:15 +00:00
|
|
|
virtual std::unique_ptr<IWriteStream> beginWriteStream(size_t offset)=0;
|
2015-06-26 19:30:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __NOD_IDISC_IO__
|