11 #ifndef __FS_IStreamHelper__
12 #define __FS_IStreamHelper__
38 :
public bios::device_tag
39 ,
public bios::seekable
40 ,
public bios::closable_tag
47 myStream = myReader->isGood() ? myReader->getStream() :
nullptr;
60 bool isValid()
const {
return myStream !=
nullptr; }
63 std::streamsize
write(
const char *, std::streamsize) {
return -1; }
74 return myStream ? myStream->bread(buffer, n) : -1;
79 return myStream ? myStream->ungetc() == 1 :
false;
87 if (way == std::ios_base::beg)
91 else if (way == std::ios_base::cur)
101 return ok ? myStream->tellg() : -1;
std::streamsize write(const char *, std::streamsize)
Writing always fails.
bool isValid() const
Test whether stream is valid.
bool putback(char_type c)
Putback a character.
GLsizei const GLchar *const * path
std::streamsize read(char *buffer, std::streamsize n)
Try to read data from the stream.
FS_IStreamDevice(const char *path, const UT_Options *opts=nullptr)
bios::stream_buffer< FS_IStreamDevice > FS_IStreamDeviceBuffer
stream_offset seek(stream_offset off, std::ios_base::seekdir way)
Seek in the stream.
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
FS_IStreamDevice(UT_IStream *stream)
void close()
Close the input stream.
A map of string to various well defined value types.
bios::stream_offset stream_offset
LeafData & operator=(const LeafData &)=delete