Module iostream
Available on crate feature
dep_sdl3
only.Expand description
SDL provides an abstract interface for reading and writing data streams. It offers implementations for files, memory, etc, and the app can provide their own implementations, too.
SDL_IOStream
is not related to the standard C++ iostream class, other than
both are abstract interfaces to read/write data.
Structs§
- SDL_
IOStatus SDL_IOStream
status, set by a read or write operation.- SDL_
IOStream - The read/write operation structure.
- SDL_
IOStream Interface - The function pointers that drive an
SDL_IOStream
. - SDL_
IOWhence - Possible
whence
values forSDL_IOStream
seeking.
Constants§
- SDL_
IO_ SEEK_ CUR - Seek relative to current read point
- SDL_
IO_ SEEK_ END - Seek relative to the end of data
- SDL_
IO_ SEEK_ SET - Seek from the beginning of data
- SDL_
IO_ STATUS_ EOF - End of file
- SDL_
IO_ STATUS_ ERROR - Read or write I/O error
- SDL_
IO_ STATUS_ NOT_ READY - Non blocking I/O, not ready
- SDL_
IO_ STATUS_ READONLY - Tried to write a read-only buffer
- SDL_
IO_ STATUS_ READY - Everything is ready (no errors and not EOF).
- SDL_
IO_ STATUS_ WRITEONLY - Tried to read a write-only buffer
- SDL_
PROP_ IOSTREAM_ ANDROID_ AASSET_ POINTER - SDL_
PROP_ IOSTREAM_ DYNAMIC_ CHUNKSIZE_ NUMBER - SDL_
PROP_ IOSTREAM_ DYNAMIC_ MEMORY_ POINTER - SDL_
PROP_ IOSTREAM_ FILE_ DESCRIPTOR_ NUMBER - SDL_
PROP_ IOSTREAM_ MEMORY_ POINTER - SDL_
PROP_ IOSTREAM_ MEMORY_ SIZE_ NUMBER - SDL_
PROP_ IOSTREAM_ STDIO_ FILE_ POINTER - SDL_
PROP_ IOSTREAM_ WINDOWS_ HANDLE_ POINTER
Functions§
- SDL_
CloseIO ⚠ - Close and free an allocated
SDL_IOStream
structure. - SDL_
FlushIO ⚠ - Flush any buffered data in the stream.
- SDL_
GetIO ⚠Properties - Get the properties associated with an
SDL_IOStream
. - SDL_
GetIO ⚠Size - Use this function to get the size of the data stream in an
SDL_IOStream
. - SDL_
GetIO ⚠Status - Query the stream status of an
SDL_IOStream
. - SDL_
IOFrom ⚠Const Mem - Use this function to prepare a read-only memory buffer for use with
SDL_IOStream
. - SDL_
IOFrom ⚠Dynamic Mem - Use this function to create an
SDL_IOStream
that is backed by dynamically allocated memory. - SDL_
IOFrom ⚠File - Use this function to create a new
SDL_IOStream
structure for reading from and/or writing to a named file. - SDL_
IOFrom ⚠Mem - Use this function to prepare a read-write memory buffer for use with
SDL_IOStream
. - SDL_
IOprintf ⚠ - Print to an
SDL_IOStream
data stream. - SDL_
IOvprintf ⚠ - Print to an
SDL_IOStream
data stream. - SDL_
Load ⚠File - Load all the data from a file path.
- SDL_
Load ⚠File_ IO - Load all the data from an SDL data stream.
- SDL_
OpenIO ⚠ - Create a custom
SDL_IOStream
. - SDL_
ReadIO ⚠ - Read from a data source.
- SDL_
Read ⚠S8 - Use this function to read a signed byte from an
SDL_IOStream
. - SDL_
Read ⚠S16BE - Use this function to read 16 bits of big-endian data from an
SDL_IOStream
and return in native format. - SDL_
Read ⚠S16LE - Use this function to read 16 bits of little-endian data from an
SDL_IOStream
and return in native format. - SDL_
Read ⚠S32BE - Use this function to read 32 bits of big-endian data from an
SDL_IOStream
and return in native format. - SDL_
Read ⚠S32LE - Use this function to read 32 bits of little-endian data from an
SDL_IOStream
and return in native format. - SDL_
Read ⚠S64BE - Use this function to read 64 bits of big-endian data from an
SDL_IOStream
and return in native format. - SDL_
Read ⚠S64LE - Use this function to read 64 bits of little-endian data from an
SDL_IOStream
and return in native format. - SDL_
Read ⚠U8 - Use this function to read a byte from an
SDL_IOStream
. - SDL_
Read ⚠U16BE - Use this function to read 16 bits of big-endian data from an
SDL_IOStream
and return in native format. - SDL_
Read ⚠U16LE - Use this function to read 16 bits of little-endian data from an
SDL_IOStream
and return in native format. - SDL_
Read ⚠U32BE - Use this function to read 32 bits of big-endian data from an
SDL_IOStream
and return in native format. - SDL_
Read ⚠U32LE - Use this function to read 32 bits of little-endian data from an
SDL_IOStream
and return in native format. - SDL_
Read ⚠U64BE - Use this function to read 64 bits of big-endian data from an
SDL_IOStream
and return in native format. - SDL_
Read ⚠U64LE - Use this function to read 64 bits of little-endian data from an
SDL_IOStream
and return in native format. - SDL_
Save ⚠File - Save all the data into a file path.
- SDL_
Save ⚠File_ IO - Save all the data into an SDL data stream.
- SDL_
SeekIO ⚠ - Seek within an
SDL_IOStream
data stream. - SDL_
TellIO ⚠ - Determine the current read/write offset in an
SDL_IOStream
data stream. - SDL_
WriteIO ⚠ - Write to an
SDL_IOStream
data stream. - SDL_
Write ⚠S8 - Use this function to write a signed byte to an
SDL_IOStream
. - SDL_
Write ⚠S16BE - Use this function to write 16 bits in native format to an
SDL_IOStream
as big-endian data. - SDL_
Write ⚠S16LE - Use this function to write 16 bits in native format to an
SDL_IOStream
as little-endian data. - SDL_
Write ⚠S32BE - Use this function to write 32 bits in native format to an
SDL_IOStream
as big-endian data. - SDL_
Write ⚠S32LE - Use this function to write 32 bits in native format to an
SDL_IOStream
as little-endian data. - SDL_
Write ⚠S64BE - Use this function to write 64 bits in native format to an
SDL_IOStream
as big-endian data. - SDL_
Write ⚠S64LE - Use this function to write 64 bits in native format to an
SDL_IOStream
as little-endian data. - SDL_
Write ⚠U8 - Use this function to write a byte to an
SDL_IOStream
. - SDL_
Write ⚠U16BE - Use this function to write 16 bits in native format to an
SDL_IOStream
as big-endian data. - SDL_
Write ⚠U16LE - Use this function to write 16 bits in native format to an
SDL_IOStream
as little-endian data. - SDL_
Write ⚠U32BE - Use this function to write 32 bits in native format to an
SDL_IOStream
as big-endian data. - SDL_
Write ⚠U32LE - Use this function to write 32 bits in native format to an
SDL_IOStream
as little-endian data. - SDL_
Write ⚠U64BE - Use this function to write 64 bits in native format to an
SDL_IOStream
as big-endian data. - SDL_
Write ⚠U64LE - Use this function to write 64 bits in native format to an
SDL_IOStream
as little-endian data.