|
SDL3pp
A slim C++ wrapper for SDL3
|
Semi-safe reference for IOStream.


Public Member Functions | |
| IOStreamRef (IOStreamParam resource) | |
| Constructs from IOStreamParam. More... | |
| IOStreamRef (const IOStreamRef &other) | |
| Copy constructor. | |
| ~IOStreamRef () | |
| Destructor. | |
Public Member Functions inherited from SDL::IOStream | |
| constexpr | IOStream ()=default |
| Default ctor. | |
| constexpr | IOStream (const IOStreamRaw resource) |
| Constructs from IOStreamParam. More... | |
| constexpr | IOStream (const IOStream &other)=delete |
| Copy constructor. | |
| constexpr | IOStream (IOStream &&other) |
| Move constructor. | |
| constexpr | IOStream (const IOStreamRef &other)=delete |
| constexpr | IOStream (IOStreamRef &&other)=delete |
| ~IOStream () | |
| Destructor. | |
| IOStream & | operator= (IOStream other) |
| Assignment operator. | |
| constexpr IOStreamRaw | get () const |
| Retrieves underlying IOStreamRaw. | |
| constexpr IOStreamRaw | release () |
| Retrieves underlying IOStreamRaw and clear this. | |
| constexpr auto | operator<=> (const IOStream &other) const =default |
| Comparison. | |
| constexpr bool | operator== (std::nullptr_t _) const |
| Comparison. | |
| constexpr | operator bool () const |
| Converts to bool. | |
| constexpr | operator IOStreamParam () const |
| Converts to IOStreamParam. | |
| void | Close () |
| Close and free an allocated IOStream structure. More... | |
| PropertiesRef | GetProperties () const |
| Get the properties associated with an IOStream. More... | |
| IOStatus | GetStatus () const |
| Query the stream status of an IOStream. More... | |
| Sint64 | GetSize () const |
| Use this function to get the size of the data stream in an IOStream. More... | |
| Sint64 | Seek (Sint64 offset, IOWhence whence) |
| Seek within an IOStream data stream. More... | |
| Sint64 | Tell () const |
| Determine the current read/write offset in an IOStream data stream. More... | |
| std::string | Read (size_t size=-1) |
| Read from a data source. More... | |
| size_t | Read (TargetBytes buf) |
| Read from a data source. More... | |
| size_t | Write (SourceBytes buf) |
| Write to an IOStream data stream. More... | |
| size_t | print (std::string_view fmt, auto... args) |
| Prints formatted string. More... | |
| size_t | println (std::string_view fmt, auto... args) |
| Prints formatted string. More... | |
| size_t | printf (SDL_PRINTF_FORMAT_STRING const char *fmt,...) |
| Print to an IOStream data stream. More... | |
| size_t | vprintf (SDL_PRINTF_FORMAT_STRING const char *fmt, va_list ap) |
| Print to an IOStream data stream. More... | |
| void | Flush () |
| Flush any buffered data in the stream. More... | |
| StringResult | LoadFile () |
| Load all the data from an SDL data stream. More... | |
| template<class T > | |
| OwnArray< T > | LoadFileAs () |
| Load all the data from an SDL data stream. More... | |
| void | SaveFile (SourceBytes data) |
| Save all the data into an SDL data stream. More... | |
| Uint8 | ReadU8 () |
| Use this function to read a byte from an IOStream. More... | |
| Sint8 | ReadS8 () |
| Use this function to read a signed byte from an IOStream. More... | |
| Uint16 | ReadU16LE () |
| Use this function to read 16 bits of little-endian data from an IOStream and return in native format. More... | |
| Sint16 | ReadS16LE () |
| Use this function to read 16 bits of little-endian data from an IOStream and return in native format. More... | |
| Uint16 | ReadU16BE () |
| Use this function to read 16 bits of big-endian data from an IOStream and return in native format. More... | |
| Sint16 | ReadS16BE () |
| Use this function to read 16 bits of big-endian data from an IOStream and return in native format. More... | |
| Uint32 | ReadU32LE () |
| Use this function to read 32 bits of little-endian data from an IOStream and return in native format. More... | |
| Sint32 | ReadS32LE () |
| Use this function to read 32 bits of little-endian data from an IOStream and return in native format. More... | |
| Uint32 | ReadU32BE () |
| Use this function to read 32 bits of big-endian data from an IOStream and return in native format. More... | |
| Sint32 | ReadS32BE () |
| Use this function to read 32 bits of big-endian data from an IOStream and return in native format. More... | |
| Uint64 | ReadU64LE () |
| Use this function to read 64 bits of little-endian data from an IOStream and return in native format. More... | |
| Sint64 | ReadS64LE () |
| Use this function to read 64 bits of little-endian data from an IOStream and return in native format. More... | |
| Uint64 | ReadU64BE () |
| Use this function to read 64 bits of big-endian data from an IOStream and return in native format. More... | |
| Sint64 | ReadS64BE () |
| Use this function to read 64 bits of big-endian data from an IOStream and return in native format. More... | |
| std::optional< Uint8 > | TryReadU8 () |
| Use this function to read a byte from an IOStreamRef. More... | |
| std::optional< Sint8 > | TryReadS8 () |
| Use this function to read a byte from an IOStreamRef. More... | |
| std::optional< Uint16 > | TryReadU16LE () |
| Use this function to read 16 bits of little-endian data from an IOStreamRef and return in native format. More... | |
| std::optional< Sint16 > | TryReadS16LE () |
| Use this function to read 16 bits of little-endian data from an IOStreamRef and return in native format. More... | |
| std::optional< Uint16 > | TryReadU16BE () |
| Use this function to read 16 bits of big-endian data from an IOStreamRef and return in native format. More... | |
| std::optional< Sint16 > | TryReadS16BE () |
| Use this function to read 16 bits of big-endian data from an IOStreamRef and return in native format. More... | |
| std::optional< Uint32 > | TryReadU32LE () |
| Use this function to read 32 bits of little-endian data from an IOStreamRef and return in native format. More... | |
| std::optional< Sint32 > | TryReadS32LE () |
| Use this function to read 32 bits of little-endian data from an IOStreamRef and return in native format. More... | |
| std::optional< Uint32 > | TryReadU32BE () |
| Use this function to read 32 bits of big-endian data from an IOStreamRef and return in native format. More... | |
| std::optional< Sint32 > | TryReadS32BE () |
| Use this function to read 32 bits of big-endian data from an IOStreamRef and return in native format. More... | |
| std::optional< Uint64 > | TryReadU64LE () |
| Use this function to read 64 bits of little-endian data from an IOStreamRef and return in native format. More... | |
| std::optional< Sint64 > | TryReadS64LE () |
| Use this function to read 64 bits of little-endian data from an IOStreamRef and return in native format. More... | |
| std::optional< Uint64 > | TryReadU64BE () |
| Use this function to read 64 bits of big-endian data from an IOStreamRef and return in native format. More... | |
| std::optional< Sint64 > | TryReadS64BE () |
| Use this function to read 64 bits of big-endian data from an IOStreamRef and return in native format. More... | |
| void | WriteU8 (Uint8 value) |
| Use this function to write a byte to an IOStream. More... | |
| void | WriteS8 (Sint8 value) |
| Use this function to write a signed byte to an IOStream. More... | |
| void | WriteU16LE (Uint16 value) |
| Use this function to write 16 bits in native format to an IOStream as little-endian data. More... | |
| void | WriteS16LE (Sint16 value) |
| Use this function to write 16 bits in native format to an IOStream as little-endian data. More... | |
| void | WriteU16BE (Uint16 value) |
| Use this function to write 16 bits in native format to an IOStream as big-endian data. More... | |
| void | WriteS16BE (Sint16 value) |
| Use this function to write 16 bits in native format to an IOStream as big-endian data. More... | |
| void | WriteU32LE (Uint32 value) |
| Use this function to write 32 bits in native format to an IOStream as little-endian data. More... | |
| void | WriteS32LE (Sint32 value) |
| Use this function to write 32 bits in native format to an IOStream as little-endian data. More... | |
| void | WriteU32BE (Uint32 value) |
| Use this function to write 32 bits in native format to an IOStream as big-endian data. More... | |
| void | WriteS32BE (Sint32 value) |
| Use this function to write 32 bits in native format to an IOStream as big-endian data. More... | |
| void | WriteU64LE (Uint64 value) |
| Use this function to write 64 bits in native format to an IOStream as little-endian data. More... | |
| void | WriteS64LE (Sint64 value) |
| Use this function to write 64 bits in native format to an IOStream as little-endian data. More... | |
| void | WriteU64BE (Uint64 value) |
| Use this function to write 64 bits in native format to an IOStream as big-endian data. More... | |
| void | WriteS64BE (Sint64 value) |
| Use this function to write 64 bits in native format to an IOStream as big-endian data. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from SDL::IOStream | |
| static IOStream | FromFile (StringParam file, StringParam mode) |
| Use this function to create a new IOStream structure for reading from and/or writing to a named file. More... | |
| static IOStream | FromMem (TargetBytes mem) |
| Use this function to prepare a read-write memory buffer for use with IOStream. More... | |
| static IOStream | FromConstMem (SourceBytes mem) |
| Use this function to prepare a read-only memory buffer for use with IOStream. More... | |
| static IOStream | FromDynamicMem () |
| Use this function to create an IOStream that is backed by dynamically allocated memory. More... | |
| static IOStream | Open (const IOStreamInterface &iface, void *userdata) |
| Create a custom IOStream. More... | |
|
inline |
| resource | a IOStreamRaw or IOStream. |
This does not takes ownership!