MCPcopy Create free account
hub / github.com/apache/qpid-proton / binary

Class binary

cpp/include/proton/binary.hpp:40–55  ·  view source on GitHub ↗

Arbitrary binary data.

Source from the content-addressed store, hash-verified

38
39/// Arbitrary binary data.
40class binary : public std::vector<uint8_t> {
41 public:
42 /// @name Constructors
43 /// @{
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()) {}
48 /// @}
49
50 /// Convert to std::string
51 operator std::string() const { return std::string(begin(), end()); }
52
53 /// Assignment
54 binary& operator=(const std::string& x) { assign(x.begin(), x.end()); return *this; }
55};
56
57/// Print a binary value
58PN_CPP_EXTERN std::ostream& operator<<(std::ostream&, const binary&);

Callers

nothing calls this directly

Calls 3

assignFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected