20 #if !defined(__MITSUBA_CORE_CSTREAM_H_)
21 #define __MITSUBA_CORE_CSTREAM_H_
23 #include <mitsuba/mitsuba.h>
48 void read(
void *ptr,
size_t size);
49 void write(
const void *ptr,
size_t size);
50 void seek(
size_t pos);
virtual void flush()=0
Flush the stream's buffers.
virtual bool canRead() const =0
Can we read from the stream?
#define MTS_EXPORT_CORE
Definition: getopt.h:29
virtual bool canWrite() const =0
Can we write to the stream?
virtual void read(void *ptr, size_t size)=0
Read a specified amount of data from the stream.
Abstract seekable stream class.
Definition: stream.h:58
#define MTS_DECLARE_CLASS()
This macro must be used in the initial definition in classes that derive from Object.
Definition: class.h:158
Stream-style interface to the default stdin/stdout console streams.
Definition: cstream.h:32
virtual void write(const void *ptr, size_t size)=0
Write a specified amount of data into the stream.
virtual size_t getPos() const =0
Get the current position inside the stream.
virtual std::string toString() const
Return a string representation.
virtual void seek(size_t pos)=0
Seek to a position inside the stream.
virtual size_t getSize() const =0
Return the size of the stream.
virtual void truncate(size_t size)=0
Truncate the stream to a given size.