1 #ifndef PROTON_BINARY_HPP
2 #define PROTON_BINARY_HPP
25 #include "./internal/export.hpp"
28 #include <proton/type_compat.h>
40 class binary :
public std::vector<uint8_t> {
44 explicit binary() =
default;
45 using std::vector<value_type>::vector;
46 explicit binary(
const std::vector<value_type>& v) : std::vector<value_type>(v) {}
47 explicit binary(
const std::string& s) : std::vector<value_type>(s.begin(), s.end()) {}
51 operator std::string()
const {
return std::string(begin(), end()); }
54 binary&
operator=(
const std::string& x) { assign(x.begin(), x.end());
return *
this; }
Arbitrary binary data.
Definition: binary.hpp:40
binary & operator=(const std::string &x)
Assignment.
Definition: binary.hpp:54
The main Proton namespace.
Definition: annotation_key.hpp:33
std::ostream & operator<<(std::ostream &, const binary &)
Print a binary value.
Forward declarations for Proton types used to represent AMQP types.