Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
|
Wrapper class around IOStream to allow for consistent writing of binary data in both little and big endian format. More...
#include <StreamWriter.h>
Public Member Functions | |
void | Flush () |
Flush the contents of the internal buffer, and the output IOStream. More... | |
std::size_t | GetCurrentPos () const |
template<typename T > | |
StreamWriter & | operator<< (T f) |
overload operator<< and allow chaining of MM ops. More... | |
template<typename T > | |
void | Put (T f) |
Generic write method. More... | |
void | PutChar (char c) |
Write a single character to the stream. More... | |
void | PutF4 (float f) |
Write a float to the stream More... | |
void | PutF8 (double d) |
Write a double to the stream More... | |
void | PutI1 (int8_t n) |
Write a signed 8 bit integer to the stream. More... | |
void | PutI2 (int16_t n) |
Write a signed 16 bit integer to the stream. More... | |
void | PutI4 (int32_t n) |
Write an signed 32 bit integer to the stream. More... | |
void | PutI8 (int64_t n) |
Write a signed 64 bit integer to the stream. More... | |
void | PutString (const aiString &s) |
Write an aiString to the stream. More... | |
void | PutString (const std::string &s) |
Write a std::string to the stream. More... | |
void | PutU1 (uint8_t n) |
Write a unsigned 8 bit integer to the stream. More... | |
void | PutU2 (uint16_t n) |
Write a unsigned 16 bit integer to the stream. More... | |
void | PutU4 (uint32_t n) |
Write an unsigned 32 bit integer to the stream. More... | |
void | PutU8 (uint64_t n) |
Write a unsigned 64 bit integer to the stream. More... | |
aiReturn | Seek (size_t pOffset, aiOrigin pOrigin=aiOrigin_SET) |
Seek to the given offset / origin in the output IOStream. More... | |
void | SetCurrentPos (std::size_t new_cursor) |
StreamWriter (IOStream *stream, bool le=false) | |
StreamWriter (std::shared_ptr< IOStream > stream, bool le=false) | |
Construction from a given stream with a well-defined endianness. More... | |
size_t | Tell () |
Tell the current position in the output IOStream. More... | |
~StreamWriter () | |
Wrapper class around IOStream to allow for consistent writing of binary data in both little and big endian format.
Don't attempt to instance the template directly. Use StreamWriterLE to write to a little-endian stream and StreamWriterBE to write to a BE stream. Alternatively, there is StreamWriterAny if the endianness of the output stream is to be determined at runtime.
|
inline |
Construction from a given stream with a well-defined endianness.
The StreamReader holds a permanent strong reference to the stream, which is released upon destruction.
stream | Input stream. The stream is not re-seeked and writing continues at the current position of the stream cursor. |
le | If RuntimeSwitch is true: specifies whether the stream is in little endian byte order. Otherwise the endianness information is defined by the SwapEndianess template parameter and this parameter is meaningless. |
|
inline |
|
inline |
|
inline |
Flush the contents of the internal buffer, and the output IOStream.
|
inline |
|
inline |
overload operator<< and allow chaining of MM ops.
|
inline |
Generic write method.
ByteSwap::Swap(T*) must be defined
|
inline |
Write a single character to the stream.
|
inline |
Write a float to the stream
|
inline |
Write a double to the stream
|
inline |
Write a signed 8 bit integer to the stream.
|
inline |
Write a signed 16 bit integer to the stream.
|
inline |
Write an signed 32 bit integer to the stream.
|
inline |
Write a signed 64 bit integer to the stream.
|
inline |
Write an aiString to the stream.
|
inline |
Write a std::string to the stream.
|
inline |
Write a unsigned 8 bit integer to the stream.
|
inline |
Write a unsigned 16 bit integer to the stream.
|
inline |
Write an unsigned 32 bit integer to the stream.
|
inline |
Write a unsigned 64 bit integer to the stream.
|
inline |
|
inline |
|
inline |