My Project
+ 80db3
|
Utility function to load stored data while properly handling encodings and endianness. More...
#include <cstring>
#include <istream>
#include <string>
#include <boost/cstdint.hpp>
#include <boost/range/size.hpp>
#include "util/encoding.hpp"
#include "util/endian.hpp"
#include "util/types.hpp"
Go to the source code of this file.
Classes | |
struct | util::binary_string |
Wrapper to load a length-prefixed string from an input stream into a std::string. More... | |
struct | util::encoded_string |
Wrapper to load a length-prefixed string with a specified encoding from an input stream into a UTF-8 encoded std::string. More... | |
struct | util::ansi_string |
Convenience specialization of encoded_string for loading Windows-1252 strings. More... | |
Namespaces | |
util | |
Functions | |
std::istream & | util::operator>> (std::istream &is, const binary_string &str) |
std::istream & | util::operator>> (std::istream &is, const encoded_string &str) |
template<class T , class Endianness > | |
T | util::load (std::istream &is) |
Load a value of type T that is stored with a specific endianness. More... | |
template<class T > | |
T | util::load (std::istream &is) |
Load a value of type T that is stored as little endian. More... | |
bool | util::load_bool (std::istream &is) |
Load a bool value. More... | |
template<class T , class Endianness > | |
T | util::load (std::istream &is, size_t bits) |
Load a value of type T that is stored with a specific endianness. More... | |
template<class T > | |
T | util::load (std::istream &is, size_t bits) |
Load a value of type T that is stored as little endian. More... | |
template<class T > | |
void | util::discard (T &is, boost::uint64_t bytes) |
Discard a number of bytes from a non-seekable input stream or stream-like object. More... | |
template<typename T > | |
T | util::get_bits (T number, unsigned first, unsigned last) |
Get the number represented by a specific range of bits of another number. More... | |
unsigned | util::to_unsigned (const char *chars, size_t count) |
Parse an ASCII representation of an unsigned integer. More... | |
Utility function to load stored data while properly handling encodings and endianness.
Definition in file load.hpp.