|
rapidyaml
0.16.0
parseandemitYAML,anddoitfast
|
Typedefs | |
| using | c4::fmt::const_base64_wrapper = detail::base64_wrapper_< cbyte > |
| a tag type to mark a payload to be encoded as base64 More... | |
| using | c4::fmt::base64_wrapper = detail::base64_wrapper_< byte > |
| a tag type to mark a payload to be decoded as base64 More... | |
| template<class Container > | |
| using | c4::fmt::const_base64_container_wrapper = detail::base64_container_wrapper_< const Container, cbyte > |
| a tag type to mark a payload as base64-encoded More... | |
| template<class Container > | |
| using | c4::fmt::base64_container_wrapper = detail::base64_container_wrapper_< Container, byte > |
| a tag type to mark a payload to be encoded as base64 More... | |
Functions | |
| const_base64_wrapper | c4::fmt::cbase64 (csubstr s, size_t *reqsize=nullptr) |
| a tag function to mark a csubstr payload to be encoded in base64 format More... | |
| const_base64_wrapper | c4::fmt::base64 (csubstr s, size_t *reqsize=nullptr) |
| a tag function to mark a csubstr payload to be encoded in base64 format More... | |
| base64_wrapper | c4::fmt::base64 (substr s, size_t *reqsize=nullptr) |
| a tag function to mark a variable to be decoded from base64 More... | |
| template<class T > | |
| const_base64_wrapper | c4::fmt::cbase64 (T const *arg, size_t sz, size_t *reqsize=nullptr) |
| a tag function to mark a payload to be encoded in base64 format More... | |
| template<class T > | |
| auto | c4::fmt::base64 (T *arg, size_t sz, size_t *reqsize=nullptr) -> typename std::conditional< std::is_const< typename std::remove_reference< typename std::remove_pointer< T >::type >::type >::value, const_base64_wrapper, base64_wrapper >::type |
| a tag function to mark a payload to be encoded in base64 format More... | |
| template<class T > | |
| auto | c4::fmt::cbase64 (T const &arg, size_t *reqsize=nullptr) -> typename std::enable_if< !detail::has_resize< T >::value, const_base64_wrapper >::type |
| a tag function to mark a payload to be encoded in base64 format More... | |
| template<class T > | |
| auto | c4::fmt::base64 (T &arg, size_t *reqsize=nullptr) -> typename std::enable_if< !detail::has_resize< T >::value, typename std::conditional< std::is_const< typename std::remove_reference< typename std::remove_pointer< T >::type >::type >::value, const_base64_wrapper, base64_wrapper >::type >::type |
| a tag function to mark a payload to be encoded or decoded in base64 format More... | |
```c++ // given these variables: T var = {}; T &ref = var; std::vector<T> vec = ...; substr buf = ...;
// there are different approaches to encode/decode base64: size_t numchars = to_chars(buf, base64(var)); // encode var as base64 size_t numchars = to_chars(buf, base64(ref)); // same as above size_t numchars = to_chars(buf, base64(&var, 1)); // same as above size_t numchars = to_chars(buf, base64(vec.data(), vec.size())); // for the container, but same call form as above size_t numchars = to_chars(buf, base64(vec)); // same effect as prev call
// using cbase64() (the c prefix is for const) is equivalent // for encoding, but quicker to compile: size_t numchars = to_chars(buf, cbase64(var)); // encode var as base64 size_t numchars = to_chars(buf, cbase64(ref)); // same as above size_t numchars = to_chars(buf, cbase64(&var, 1)); // same as above size_t numchars = to_chars(buf, cbase64(vec.data(), vec.size())); // for the container, but same call as above size_t numchars = to_chars(buf, cbase64(vec)); // same effect as prev call
// to decode: csubstr buf = ...; size_t reqbytes = 0; // number of bytes of decoded data bool ok = from_chars(buf, base64(var)); // decode base64 to var bool ok = from_chars(buf, base64(var, &reqbytes)); // same. reqbytes will be sizeof(var) bool ok = from_chars(buf, base64(ref)); // same as above bool ok = from_chars(buf, base64(ref, &reqbytes)); // same. reqbytes will be sizeof(var) bool ok = from_chars(buf, base64(&var, 1, &reqbytes)); // same bool ok = from_chars(buf, base64(vec.data(), vec.size(), &reqbytes)); // for the container, but same call as above bool ok = from_chars(buf, base64(vec, &reqbytes)); // same effect as prev call
| using c4::fmt::const_base64_wrapper = typedef detail::base64_wrapper_<cbyte> |
a tag type to mark a payload to be encoded as base64
Definition at line 103 of file format_base64.hpp.
| using c4::fmt::base64_wrapper = typedef detail::base64_wrapper_<byte> |
a tag type to mark a payload to be decoded as base64
Definition at line 105 of file format_base64.hpp.
| using c4::fmt::const_base64_container_wrapper = typedef detail::base64_container_wrapper_<const Container, cbyte> |
a tag type to mark a payload as base64-encoded
Definition at line 110 of file format_base64.hpp.
| using c4::fmt::base64_container_wrapper = typedef detail::base64_container_wrapper_<Container, byte> |
a tag type to mark a payload to be encoded as base64
Definition at line 113 of file format_base64.hpp.
|
inline |
a tag function to mark a csubstr payload to be encoded in base64 format
Definition at line 117 of file format_base64.hpp.
|
inline |
a tag function to mark a csubstr payload to be encoded in base64 format
Definition at line 122 of file format_base64.hpp.
Referenced by sample_base64().
|
inline |
a tag function to mark a variable to be decoded from base64
Definition at line 127 of file format_base64.hpp.
|
inline |
a tag function to mark a payload to be encoded in base64 format
Definition at line 135 of file format_base64.hpp.
|
inline |
a tag function to mark a payload to be encoded in base64 format
Definition at line 141 of file format_base64.hpp.
|
inline |
a tag function to mark a payload to be encoded in base64 format
a tag function to mark a container (payload with a .resize() method) to be encoded in base64 format.
Definition at line 159 of file format_base64.hpp.
|
inline |
a tag function to mark a payload to be encoded or decoded in base64 format
a tag function to mark a container (payload with a .resize() method) to be encoded or decoded in base64 format.
Subsequently when decoding, from_chars() will resize the container to fit the decoded data.
Definition at line 166 of file format_base64.hpp.