Definition in file util.hpp.
Go to the source code of this file.
Namespaces | |
| namespace | Doomwad |
Functions | |
| uint16 | convertEndian (uint16 x) |
| Convert an unsigned short int to this machine's endianness. | |
| uint32 | convertEndian (uint32 x) |
| Convert an unsigned int to this machine's endianness. | |
| EXPORT std::string | exceptionString (const std::string &, const std::string &, size_t) throw () |
| Create an exception description. | |
| bool | isInvalidPointer (void *p, size_t size=1) |
| Test if a pointer is invalid. | |
| bool | isNullPointer (void *p) |
| Test if a pointer is null. | |
| char * | makeDoomString (char *buffer, const std::string &str) throw () |
| Convert a String to a DoomString. | |
| std::string & | makeStdString (std::string &str, const char *buffer) throw () |
| Convert a DoomString to a String. | |
|
|
Convert an unsigned short int to this machine's endianness.
|
|
|
Convert an unsigned int to this machine's endianness.
|
|
||||||||||||||||
|
Create an exception description. There are several options for creating consistent and meaningful exceptions. Rather than define new exceptions, this library uses the ones in <stdexcept> and relies on its internal string buffer to describe the error. To keep exception descriptions consistent, this function creates a string based on the file name, line number, and a custom description. The user of this function uses its return value to create an exception. To use this function, type a string description as the first argument. Use the __FILE__ and __LINE__ macros for the other two.
Definition at line 62 of file util.cpp. Referenced by Doomwad::Lump::append(), Doomwad::Lump::assign(), Doomwad::Lump::at(), Doomwad::Flat::at(), Doomwad::Lump::getByte(), Doomwad::Lump::getDString(), Doomwad::Lump::getDWord(), Doomwad::Lump::getInt16(), Doomwad::Lump::getInt32(), Doomwad::Lump::getInt64(), Doomwad::Lump::getInt8(), Doomwad::Lump::getQWord(), Doomwad::Lump::getString(), Doomwad::Lump::getUInt16(), Doomwad::Lump::getUInt32(), Doomwad::Lump::getUInt64(), Doomwad::Lump::getUInt8(), Doomwad::Lump::getWord(), Doomwad::Lump::grow(), Doomwad::Lump::Lump(), Doomwad::Lump::operator+(), Doomwad::Lump::operator+=(), Doomwad::Lump::setByte(), Doomwad::Lump::setDString(), Doomwad::Lump::setDWord(), Doomwad::Lump::setInt16(), Doomwad::Lump::setInt32(), Doomwad::Lump::setInt64(), Doomwad::Lump::setInt8(), Doomwad::Lump::setQWord(), Doomwad::Lump::setString(), Doomwad::Lump::setUInt16(), Doomwad::Lump::setUInt32(), Doomwad::Lump::setUInt64(), Doomwad::Lump::setUInt8(), Doomwad::Lump::setWord(), and Doomwad::Lump::shrink(). |
|
||||||||||||
|
Test if a pointer is invalid.
|
|
|
Test if a pointer is null.
|
|
||||||||||||
|
Convert a String to a DoomString. Takes a std::string input and converts it to the format used in wad files.
|
|
||||||||||||
|
Convert a DoomString to a String. Takes a character buffer in the Doom wad file string format and converts it to a std::string. Assumes the buffer is 8 characters and has no terminating null.
|
1.4.0