SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLIOStream Class Reference

Interface for accessing external data using streams. More...

#include <SLFileStorage.h>

Inheritance diagram for SLIOStream:
[legend]

Public Types

enum  Origin { IOO_beg , IOO_cur , IOO_end }
 

Public Member Functions

virtual ~SLIOStream ()=default
 
virtual size_t read (void *buffer, size_t size)
 
virtual size_t write (const void *buffer, size_t size)
 
virtual size_t tell ()
 
virtual bool seek (size_t offset, Origin origin)
 
virtual size_t size ()
 
virtual void flush ()
 

Detailed Description

Interface for accessing external data using streams.

SLIOStream provides an interface to access files which may be stored in the native file system, on a remote server, in memory, etc. Streams should not be instantiated by users of the class, but by SLFileStorage::open, which selects the appropriate stream implementation for a given kind and mode.

Definition at line 61 of file SLFileStorage.h.

Member Enumeration Documentation

◆ Origin

Enumerator
IOO_beg 
IOO_cur 
IOO_end 

Definition at line 64 of file SLFileStorage.h.

65  {
66  IOO_beg,
67  IOO_cur,
68  IOO_end
69  };

Constructor & Destructor Documentation

◆ ~SLIOStream()

virtual SLIOStream::~SLIOStream ( )
virtualdefault

Member Function Documentation

◆ flush()

virtual void SLIOStream::flush ( )
inlinevirtual

Reimplemented in SLIOWriterNative, SLIOWriterMemory, SLIOWriterLocalStorage, and SLIOWriterBrowserPopup.

Definition at line 77 of file SLFileStorage.h.

77 {}

◆ read()

virtual size_t SLIOStream::read ( void buffer,
size_t  size 
)
inlinevirtual

Reimplemented in SLIOReaderNative, and SLIOReaderMemory.

Definition at line 72 of file SLFileStorage.h.

72 { return 0; }

◆ seek()

virtual bool SLIOStream::seek ( size_t  offset,
Origin  origin 
)
inlinevirtual

Reimplemented in SLIOWriterNative, SLIOReaderNative, SLIOWriterMemory, and SLIOReaderMemory.

Definition at line 75 of file SLFileStorage.h.

75 { return false; }

◆ size()

virtual size_t SLIOStream::size ( )
inlinevirtual

Reimplemented in SLIOReaderNative, and SLIOReaderMemory.

Definition at line 76 of file SLFileStorage.h.

76 { return 0; }

◆ tell()

virtual size_t SLIOStream::tell ( )
inlinevirtual

Reimplemented in SLIOWriterNative, SLIOReaderNative, SLIOWriterMemory, and SLIOReaderMemory.

Definition at line 74 of file SLFileStorage.h.

74 { return 0; }

◆ write()

virtual size_t SLIOStream::write ( const void buffer,
size_t  size 
)
inlinevirtual

Reimplemented in SLIOWriterNative, and SLIOWriterMemory.

Definition at line 73 of file SLFileStorage.h.

73 { return 0; }

The documentation for this class was generated from the following file: