![]() |
SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
|
Functions | |
consteval uint32_t | makeFourCC (const char fourCC[4]) |
Creates a FourCC identifier from a string of 4 characters. | |
void | readStringAtOffset (BufferStream &stream, std::string &str, std::ios::seekdir offsetFrom=std::ios::cur, std::size_t subtractFromOffset=sizeof(int32_t)) |
Reads an integer from the stream, seeks there, reads a string, and seeks back. | |
consteval uint32_t sourcepp::parser::binary::makeFourCC | ( | const char | fourCC[4] | ) |
void sourcepp::parser::binary::readStringAtOffset | ( | BufferStream & | stream, |
std::string & | str, | ||
std::ios::seekdir | offsetFrom = std::ios::cur , |
||
std::size_t | subtractFromOffset = sizeof(int32_t) |
||
) |
Reads an integer from the stream, seeks there, reads a string, and seeks back.
stream | The BufferStream to modify. |
str | String contents are read into this. |
offsetFrom | The seek direction when reading the string. |
subtractFromOffset | This offset is subtracted from the read integer. Defaults to the size of an integer since an integer was read from the stream before seeking to the string. |
Definition at line 7 of file Binary.cpp.