iostream topic

CategoryIOStream

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.

Functions

sdlCloseIo(Pointer<SdlIoStream> context) bool iostream
Close and free an allocated SDL_IOStream structure.
sdlFlushIo(Pointer<SdlIoStream> context) bool iostream
Flush any buffered data in the stream.
sdlGetIoProperties(Pointer<SdlIoStream> context) int iostream
Get the properties associated with an SDL_IOStream.
sdlGetIoSize(Pointer<SdlIoStream> context) int iostream
Use this function to get the size of the data stream in an SDL_IOStream.
sdlGetIoStatus(Pointer<SdlIoStream> context) int iostream
Query the stream status of an SDL_IOStream.
sdlIoFromConstMem(Pointer<NativeType> mem, int size) Pointer<SdlIoStream> iostream
Use this function to prepare a read-only memory buffer for use with SDL_IOStream.
sdlIoFromDynamicMem() Pointer<SdlIoStream> iostream
Use this function to create an SDL_IOStream that is backed by dynamically allocated memory.
sdlIoFromFile(String? file, String? mode) Pointer<SdlIoStream> iostream
Use this function to create a new SDL_IOStream structure for reading from and/or writing to a named file.
sdlIoFromMem(Pointer<NativeType> mem, int size) Pointer<SdlIoStream> iostream
Use this function to prepare a read-write memory buffer for use with SDL_IOStream.
sdlIOprintf(Pointer<SdlIoStream> context, String? fmt) int iostream
Print to an SDL_IOStream data stream.
sdlIOvprintf(Pointer<SdlIoStream> context, String? fmt) int iostream
Print to an SDL_IOStream data stream.
sdlLoadFile(String? file, Pointer<Uint32> datasize) Pointer<NativeType> iostream
Load all the data from a file path.
sdlLoadFileIo(Pointer<SdlIoStream> src, Pointer<Uint32> datasize, bool closeio) Pointer<NativeType> iostream
Load all the data from an SDL data stream.
sdlOpenIo(Pointer<SdlIoStreamInterface> iface, Pointer<NativeType> userdata) Pointer<SdlIoStream> iostream
Create a custom SDL_IOStream.
sdlReadIo(Pointer<SdlIoStream> context, Pointer<NativeType> ptr, int size) int iostream
Read from a data source.
sdlReadS16Be(Pointer<SdlIoStream> src, Pointer<Int16> value) bool iostream
Use this function to read 16 bits of big-endian data from an SDL_IOStream and return in native format.
sdlReadS16Le(Pointer<SdlIoStream> src, Pointer<Int16> value) bool iostream
Use this function to read 16 bits of little-endian data from an SDL_IOStream and return in native format.
sdlReadS32Be(Pointer<SdlIoStream> src, Pointer<Int32> value) bool iostream
Use this function to read 32 bits of big-endian data from an SDL_IOStream and return in native format.
sdlReadS32Le(Pointer<SdlIoStream> src, Pointer<Int32> value) bool iostream
Use this function to read 32 bits of little-endian data from an SDL_IOStream and return in native format.
sdlReadS64Be(Pointer<SdlIoStream> src, Pointer<Int64> value) bool iostream
Use this function to read 64 bits of big-endian data from an SDL_IOStream and return in native format.
sdlReadS64Le(Pointer<SdlIoStream> src, Pointer<Int64> value) bool iostream
Use this function to read 64 bits of little-endian data from an SDL_IOStream and return in native format.
sdlReadS8(Pointer<SdlIoStream> src, Pointer<Int8> value) bool iostream
Use this function to read a signed byte from an SDL_IOStream.
sdlReadU16Be(Pointer<SdlIoStream> src, Pointer<Uint16> value) bool iostream
Use this function to read 16 bits of big-endian data from an SDL_IOStream and return in native format.
sdlReadU16Le(Pointer<SdlIoStream> src, Pointer<Uint16> value) bool iostream
Use this function to read 16 bits of little-endian data from an SDL_IOStream and return in native format.
sdlReadU32Be(Pointer<SdlIoStream> src, Pointer<Uint32> value) bool iostream
Use this function to read 32 bits of big-endian data from an SDL_IOStream and return in native format.
sdlReadU32Le(Pointer<SdlIoStream> src, Pointer<Uint32> value) bool iostream
Use this function to read 32 bits of little-endian data from an SDL_IOStream and return in native format.
sdlReadU64Be(Pointer<SdlIoStream> src, Pointer<Uint64> value) bool iostream
Use this function to read 64 bits of big-endian data from an SDL_IOStream and return in native format.
sdlReadU64Le(Pointer<SdlIoStream> src, Pointer<Uint64> value) bool iostream
Use this function to read 64 bits of little-endian data from an SDL_IOStream and return in native format.
sdlReadU8(Pointer<SdlIoStream> src, Pointer<Uint8> value) bool iostream
Use this function to read a byte from an SDL_IOStream.
sdlSaveFile(String? file, Pointer<NativeType> data, int datasize) bool iostream
Save all the data into a file path.
sdlSaveFileIo(Pointer<SdlIoStream> src, Pointer<NativeType> data, int datasize, bool closeio) bool iostream
Save all the data into an SDL data stream.
sdlSeekIo(Pointer<SdlIoStream> context, int offset, int whence) int iostream
Seek within an SDL_IOStream data stream.
sdlTellIo(Pointer<SdlIoStream> context) int iostream
Determine the current read/write offset in an SDL_IOStream data stream.
sdlWriteIo(Pointer<SdlIoStream> context, Pointer<NativeType> ptr, int size) int iostream
Write to an SDL_IOStream data stream.
sdlWriteS16Be(Pointer<SdlIoStream> dst, int value) bool iostream
Use this function to write 16 bits in native format to an SDL_IOStream as big-endian data.
sdlWriteS16Le(Pointer<SdlIoStream> dst, int value) bool iostream
Use this function to write 16 bits in native format to an SDL_IOStream as little-endian data.
sdlWriteS32Be(Pointer<SdlIoStream> dst, int value) bool iostream
Use this function to write 32 bits in native format to an SDL_IOStream as big-endian data.
sdlWriteS32Le(Pointer<SdlIoStream> dst, int value) bool iostream
Use this function to write 32 bits in native format to an SDL_IOStream as little-endian data.
sdlWriteS64Be(Pointer<SdlIoStream> dst, int value) bool iostream
Use this function to write 64 bits in native format to an SDL_IOStream as big-endian data.
sdlWriteS64Le(Pointer<SdlIoStream> dst, int value) bool iostream
Use this function to write 64 bits in native format to an SDL_IOStream as little-endian data.
sdlWriteS8(Pointer<SdlIoStream> dst, int value) bool iostream
Use this function to write a signed byte to an SDL_IOStream.
sdlWriteU16Be(Pointer<SdlIoStream> dst, int value) bool iostream
Use this function to write 16 bits in native format to an SDL_IOStream as big-endian data.
sdlWriteU16Le(Pointer<SdlIoStream> dst, int value) bool iostream
Use this function to write 16 bits in native format to an SDL_IOStream as little-endian data.
sdlWriteU32Be(Pointer<SdlIoStream> dst, int value) bool iostream
Use this function to write 32 bits in native format to an SDL_IOStream as big-endian data.
sdlWriteU32Le(Pointer<SdlIoStream> dst, int value) bool iostream
Use this function to write 32 bits in native format to an SDL_IOStream as little-endian data.
sdlWriteU64Be(Pointer<SdlIoStream> dst, int value) bool iostream
Use this function to write 64 bits in native format to an SDL_IOStream as big-endian data.
sdlWriteU64Le(Pointer<SdlIoStream> dst, int value) bool iostream
Use this function to write 64 bits in native format to an SDL_IOStream as little-endian data.
sdlWriteU8(Pointer<SdlIoStream> dst, int value) bool iostream
Use this function to write a byte to an SDL_IOStream.