winapi_common
|
Binary data container. More...
Public Types | |
typedef std::vector< unsigned char > | Parent |
Public Member Functions | |
Buffer (std::initializer_list< unsigned char > lst) | |
Buffer (Parent &&src) | |
template<typename CharT > | |
Buffer (const std::basic_string< CharT > &src) | |
Buffer (const void *src, std::size_t nb) | |
template<typename CharT > | |
void | set (const std::basic_string< CharT > &src) |
void | set (const void *src, std::size_t nb) |
std::string | as_utf8 () const |
std::wstring | as_utf16 () const |
void | add (const Buffer &src) |
Binary data container.
This class wraps a blob of binary data.
Definition at line 24 of file buffer.hpp.
|
inline |
Construct a buffer from an explicit list of byte values.
Definition at line 31 of file buffer.hpp.
|
inlineexplicit |
Construct a buffer from an instance of std::vector<unsigned char>
.
Definition at line 34 of file buffer.hpp.
|
inlineexplicit |
Construct a buffer from an instance of std::basic_string
.
Definition at line 38 of file buffer.hpp.
|
inline |
Construct a buffer from a memory region.
Definition at line 43 of file buffer.hpp.
|
inline |
Replace the buffer's contents with the data from std::basic_string
.
Definition at line 47 of file buffer.hpp.
|
inline |
Replace the buffer's contents with the data from a memory region.
Definition at line 52 of file buffer.hpp.
|
inline |
Interpret the buffer's contents as a std::string
.
Definition at line 58 of file buffer.hpp.
|
inline |
Interpret the buffer's contents as a std::wstring
.
Definition at line 66 of file buffer.hpp.
|
inline |
Append another buffer to the end of this one.
Definition at line 79 of file buffer.hpp.