|
| template<typename T > |
| T | keepass::consume (std::istream &src) |
| | Reads and returns a value of type T from the stream.
|
| |
| LIBKEEPASS_API std::streamsize | keepass::RemainingBytes (std::istream &src) |
| | Returns the number of bytes available from the current position of the stream up to its end, or -1 if the stream does not support or cannot report seeking.
|
| |
|
template<> |
| LIBKEEPASS_API std::string | keepass::consume< std::string > (std::istream &src) |
| | Reads a length-prefixed string from the stream.
|
| |
|
template<> |
| LIBKEEPASS_API std::vector< char > | keepass::consume< std::vector< char > > (std::istream &src) |
| | Reads a length-prefixed char vector from the stream.
|
| |
|
template<> |
| LIBKEEPASS_API std::vector< uint8_t > | keepass::consume< std::vector< uint8_t > > (std::istream &src) |
| | Reads a length-prefixed byte vector from the stream.
|
| |
| template<typename T > |
| void | keepass::conserve (std::ostream &dst, const T &val) |
| | Writes a value of type T to the stream.
|
| |
|
template<> |
| LIBKEEPASS_API void | keepass::conserve< std::string > (std::ostream &dst, const std::string &val) |
| | Writes a length-prefixed string to the stream.
|
| |
|
template<> |
| LIBKEEPASS_API void | keepass::conserve< std::vector< char > > (std::ostream &dst, const std::vector< char > &val) |
| | Writes a length-prefixed char vector to the stream.
|
| |
|
template<> |
| LIBKEEPASS_API void | keepass::conserve< std::vector< uint8_t > > (std::ostream &dst, const std::vector< uint8_t > &val) |
| | Writes a length-prefixed byte vector to the stream.
|
| |
Low-level binary reading and writing helpers.