![]() |
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. | |
| consteval uint64_t | makeEightCC (const char eightCC[8]) |
| Creates a EightCC identifier from a string of 8 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. | |
|
nodiscardconsteval |
|
nodiscardconsteval |
| 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.