azure-core-amqp
Loading...
Searching...
No Matches
amqp_value.hpp
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4#pragma once
5
6#include "amqp_header.hpp"
7
8#include <azure/core/diagnostics/logger.hpp>
9#include <azure/core/internal/diagnostics/log.hpp>
10#include <azure/core/internal/unique_handle.hpp>
11#include <azure/core/uuid.hpp>
12
13#include <array>
14#include <chrono>
15#include <cstddef>
16#include <cstdint>
17#include <exception>
18#include <functional>
19#include <list>
20#include <map>
21#include <string>
22#include <vector>
23
24namespace Azure { namespace Core { namespace Amqp { namespace Models { namespace _detail {
25 class AmqpValueImpl;
26 class AmqpValueFactory;
27}}}}} // namespace Azure::Core::Amqp::Models::_detail
28
29namespace Azure { namespace Core { namespace Amqp { namespace Models { namespace _internal {
30
31 enum class TerminusDurability : std::uint32_t
32 {
33 None = 0,
34 Configuration = 1,
35 UnsettledState = 2,
36 };
37
38 // Note : Should be an extendable Enumeration.
39 enum class TerminusExpiryPolicy
40 {
41 LinkDetach,
42 SessionEnd,
43 ConnectionClose,
44 Never,
45 };
46}}}}} // namespace Azure::Core::Amqp::Models::_internal
47
48namespace Azure { namespace Core { namespace Amqp { namespace Models {
49
50 enum class AmqpValueType
51 {
52 Invalid,
53 Null,
54 Bool,
55 Ubyte,
56 Ushort,
57 Uint,
58 Ulong,
59 Byte,
60 Short,
61 Int,
62 Long,
63 Float,
64 Double,
65 Char,
66 Timestamp,
67 Uuid,
68 Binary,
69 String,
70 Symbol,
71 List,
72 Map,
73 Array,
74 Described,
75 Composite,
76 Unknown,
77 };
78
87 std::ostream& operator<<(std::ostream& os, AmqpValueType value);
88
89 class AmqpArray;
90 class AmqpMap;
91 class AmqpList;
92 class AmqpBinaryData;
93 class AmqpSymbol;
94 class AmqpTimestamp;
95 class AmqpComposite;
96 class AmqpDescribed;
97
104 class AmqpValue final {
105 public:
112 AmqpValue() noexcept;
113 ~AmqpValue();
114
118 AmqpValue(AmqpValue const& that) noexcept;
119
123 AmqpValue(AmqpValue&& that) noexcept;
124
130 AmqpValue& operator=(AmqpValue const& that);
136 AmqpValue& operator=(AmqpValue&& that) noexcept;
137
145 AmqpValue(bool value);
146
155 AmqpValue(std::uint8_t value);
156
165 AmqpValue(std::uint16_t value);
166
175 AmqpValue(std::uint32_t value);
176
185 AmqpValue(std::uint64_t value);
186
195 AmqpValue(std::int8_t value);
196
208 AmqpValue(char value);
209
218 AmqpValue(std::int16_t value);
219
228 AmqpValue(std::int32_t value);
229
238 AmqpValue(std::int64_t value);
239
248 AmqpValue(float value);
249
258 AmqpValue(double value);
259
268 explicit AmqpValue(std::string const& value);
269
283 AmqpValue(const char* value);
284
293 AmqpValue(char32_t value);
294
307 AmqpValue(Azure::Core::Uuid const& value);
308
313 bool operator==(AmqpValue const& that) const;
314
319 bool operator!=(AmqpValue const& that) const { return !(*this == that); };
320
329 bool operator<(AmqpValue const& that) const;
330
335 AmqpValueType GetType() const;
336
341 bool IsNull() const;
342
349 operator bool() const;
350
357 operator std::uint8_t() const;
358
365 operator std::int8_t() const;
366
374 operator char() const;
375
382 operator std::uint16_t() const;
383
390 operator std::int16_t() const;
391
398 operator std::uint32_t() const;
399
406 operator std::int32_t() const;
407
414 operator std::uint64_t() const;
415
422 operator std::int64_t() const;
423
430 operator float() const;
431
438 operator double() const;
439
446 operator char32_t() const;
447
454 explicit operator std::string() const;
455
462 operator Azure::Core::Uuid() const;
463
470 AmqpList AsList() const;
471
478 AmqpMap AsMap() const;
479
486 AmqpArray AsArray() const;
487
494 AmqpBinaryData AsBinary() const;
495
503
510 AmqpSymbol AsSymbol() const;
511
522
532
534 static std::vector<uint8_t> Serialize(AmqpValue const& value);
535
537 static size_t GetSerializedSize(AmqpValue const& value);
538
544 static AmqpValue Deserialize(uint8_t const* data, size_t size);
545
546 private:
548 AmqpValue(std::unique_ptr<Azure::Core::Amqp::Models::_detail::AmqpValueImpl>&& value);
549 std::unique_ptr<_detail::AmqpValueImpl> m_impl;
550 friend class _detail::AmqpValueFactory;
551 };
552 std::ostream& operator<<(std::ostream& os, AmqpValue const& value);
553
554}}}} // namespace Azure::Core::Amqp::Models
555
556namespace Azure { namespace Core { namespace Amqp { namespace Models { namespace _detail {
557
563 template <typename T, typename ThisType> class AmqpCollectionBase {
564 protected:
565 T m_value;
566
567 using initializer_type = std::initializer_list<typename T::value_type>;
568
569 AmqpCollectionBase(initializer_type const& initializer) : m_value{initializer} {}
570 AmqpCollectionBase(T initializer) : m_value{initializer} {}
571 AmqpCollectionBase(){};
572
573 // Copy constructor
574 AmqpCollectionBase(const AmqpCollectionBase& other) = default;
575
576 // Copy assignment operator
577 AmqpCollectionBase& operator=(const AmqpCollectionBase& other) = default;
578
579 // Move constructor
580 AmqpCollectionBase(AmqpCollectionBase&& other) noexcept = default;
581
582 // Move assignment operator
583 AmqpCollectionBase& operator=(AmqpCollectionBase&& other) = default;
584
585 ~AmqpCollectionBase() = default;
586
587 public:
590 explicit operator T const &() const { return m_value; }
591
593 AmqpValue AsAmqpValue() const;
594
596 inline typename T::size_type size() const { return m_value.size(); }
597
602 const typename T::value_type& operator[](const typename T::size_type pos) const noexcept
603 {
604 return m_value.operator[](pos);
605 }
606 void push_back(typename T::value_type&& val) { m_value.push_back(std::move(val)); }
607 typename T::const_iterator begin() const noexcept { return m_value.begin(); }
608 typename T::const_iterator end() const noexcept { return m_value.end(); }
609 size_t find(T const& val) noexcept { return m_value.find(val); }
610 typename T::value_type* data() noexcept { return m_value.data(); }
611 const typename T::value_type* data() const noexcept { return m_value.data(); }
612 const typename T::value_type& at(const typename T::size_type pos) const
613 {
614 return m_value.at(pos);
615 }
616 bool operator<(ThisType const& that) const { return m_value < that.m_value; }
617 bool operator==(ThisType const& that) const { return m_value == that.m_value; }
618 bool operator!=(ThisType const& that) const { return m_value != that.m_value; }
620 bool empty() const noexcept { return m_value.empty(); }
621
622 protected:
630 virtual operator _detail::AmqpValueImpl() const;
631 };
632}}}}} // namespace Azure::Core::Amqp::Models::_detail
633
634namespace Azure { namespace Core { namespace Amqp { namespace Models {
639 class AmqpArray final : public _detail::AmqpCollectionBase<std::vector<AmqpValue>, AmqpArray> {
640 public:
642 AmqpArray() : AmqpCollectionBase(){};
643
645 AmqpArray(initializer_type const& values);
646
648 virtual ~AmqpArray() = default;
649
651 AmqpArray(const AmqpArray& other) = default;
652
654 AmqpArray& operator=(const AmqpArray& other) = default;
655
657 AmqpArray(AmqpArray&& other) noexcept = default;
658
660 AmqpArray& operator=(AmqpArray&& other) noexcept = default;
661
671 AmqpArray(AmqpValue const& value);
672 };
673 std::ostream& operator<<(std::ostream& os, AmqpArray const& value);
674
680 class AmqpMap final
681 : public _detail::AmqpCollectionBase<std::map<AmqpValue, AmqpValue>, AmqpMap> {
682
683 public:
685 AmqpMap() : AmqpCollectionBase(){};
686
688 AmqpMap(std::initializer_list<std::map<AmqpValue, AmqpValue>::value_type> const& values)
689 : AmqpCollectionBase(values)
690 {
691 }
692
694 AmqpMap(AmqpMap&& other) noexcept = default;
695
697 AmqpMap& operator=(AmqpMap&& other) noexcept = default;
698
700 AmqpMap(const AmqpMap& other) = default;
701
703 AmqpMap& operator=(const AmqpMap& other) = default;
704
714 AmqpMap(AmqpValue const& value);
715
716 virtual ~AmqpMap() = default;
717
722 decltype(m_value)::mapped_type& operator[](decltype(m_value)::key_type&& keyVal)
723 {
724 return m_value.operator[](std::move(keyVal));
725 }
726
733 template <class... ValueTypes>
734 std::pair<decltype(m_value)::iterator, bool> emplace(ValueTypes&&... values)
735 {
736 return m_value.emplace(std::forward<ValueTypes>(values)...);
737 }
738 };
739 std::ostream& operator<<(std::ostream& os, AmqpMap const& value);
740
744 class AmqpList final : public _detail::AmqpCollectionBase<std::vector<AmqpValue>, AmqpList> {
745 public:
746 AmqpList() : AmqpCollectionBase(){};
747 virtual ~AmqpList() = default;
749 AmqpList(std::initializer_list<std::vector<AmqpValue>::value_type> const& values)
750 : AmqpCollectionBase(values)
751 {
752 }
753
755 AmqpList(const AmqpList& other) = default;
756
758 AmqpList& operator=(const AmqpList& other) = default;
759
761 AmqpList(AmqpList&& other) noexcept = default;
762
764 AmqpList& operator=(AmqpList&& other) noexcept = default;
765
773 AmqpList(AmqpValue const& value);
774 };
775 std::ostream& operator<<(std::ostream& os, AmqpList const& value);
776
783 class AmqpBinaryData final
784 : public _detail::AmqpCollectionBase<std::vector<std::uint8_t>, AmqpBinaryData> {
785 public:
786 AmqpBinaryData() : AmqpCollectionBase(){};
787 virtual ~AmqpBinaryData() = default;
789 AmqpBinaryData(initializer_type const& values) : AmqpCollectionBase(values){};
791 AmqpBinaryData(std::vector<std::uint8_t> const& values) : AmqpCollectionBase(values){};
792
794 AmqpBinaryData(const AmqpBinaryData& other) = default;
795
797 AmqpBinaryData& operator=(const AmqpBinaryData& other) = default;
798
800 AmqpBinaryData(AmqpBinaryData&& other) noexcept = default;
801
803 AmqpBinaryData& operator=(AmqpBinaryData&& other) noexcept = default;
804
806 AmqpBinaryData& operator=(std::vector<std::uint8_t> const& values)
807 {
808 m_value = values;
809 return *this;
810 };
811
822 AmqpBinaryData(AmqpValue const& value);
823 };
824 std::ostream& operator<<(std::ostream& os, AmqpBinaryData const& value);
825
833 class AmqpSymbol final : public _detail::AmqpCollectionBase<std::string, AmqpSymbol> {
834 public:
835 AmqpSymbol() : AmqpCollectionBase(){};
836 virtual ~AmqpSymbol() = default;
837
839 AmqpSymbol(std::string const& values) : AmqpCollectionBase(values){};
840
842 AmqpSymbol(initializer_type const& initializer) : AmqpCollectionBase(initializer) {}
843
845 AmqpSymbol(const char* const values) : AmqpCollectionBase(values){};
846
848 AmqpSymbol(const AmqpSymbol& other) = default;
849
851 AmqpSymbol& operator=(const AmqpSymbol& other) = default;
852
854 AmqpSymbol(AmqpSymbol&& other) noexcept = default;
855
857 AmqpSymbol& operator=(AmqpSymbol&& other) noexcept = default;
858
869 AmqpSymbol(AmqpValue const& value);
870
876 bool operator==(AmqpSymbol const& that) const { return m_value == that.m_value; }
882 bool operator==(const decltype(m_value)::value_type* const that) const
883 {
884 return m_value == that;
885 }
886 };
887 std::ostream& operator<<(std::ostream& os, AmqpSymbol const& value);
888
895 class AmqpTimestamp final {
896 std::chrono::milliseconds m_value;
897
898 public:
900 ~AmqpTimestamp() = default;
901
903 AmqpTimestamp(std::chrono::milliseconds const& values);
904
915 AmqpTimestamp(AmqpValue const& value);
916
918 AmqpTimestamp(const AmqpTimestamp& other) = default;
919
921 AmqpTimestamp& operator=(const AmqpTimestamp& other) = default;
922
924 AmqpTimestamp(AmqpTimestamp&& other) noexcept = default;
925
927 AmqpTimestamp& operator=(AmqpTimestamp&& other) noexcept = default;
928
938 operator _detail::AmqpValueImpl() const;
939
944 AmqpValue AsAmqpValue() const;
945
949 operator std::chrono::milliseconds() const { return m_value; }
950
955 bool operator<(AmqpTimestamp const& that) { return m_value < that.m_value; }
956 };
957
971 class AmqpComposite final
972 : public _detail::AmqpCollectionBase<std::vector<AmqpValue>, AmqpComposite> {
973 public:
975 AmqpComposite() : AmqpCollectionBase(){};
976 virtual ~AmqpComposite() = default;
977
979 AmqpComposite(AmqpValue const& descriptor, std::initializer_list<AmqpValue> const& values);
980
982 AmqpComposite(const AmqpComposite& other) = default;
983
988 AmqpComposite& operator=(const AmqpComposite& other) = default;
989
993 AmqpComposite(AmqpComposite&& other) noexcept = default;
994
999 AmqpComposite& operator=(AmqpComposite&& other) noexcept = default;
1000
1010 AmqpComposite(AmqpValue const& value);
1011
1016 bool operator==(AmqpComposite const& that) const
1017 {
1018 if (GetDescriptor() == that.GetDescriptor())
1019 {
1020 return m_value == that.m_value;
1021 }
1022 return false;
1023 }
1024
1029 bool operator!=(AmqpComposite const& that) const { return !(*this == that); }
1030
1035 AmqpValue const& GetDescriptor() const { return m_descriptor; }
1036
1037 protected:
1047 operator _detail::AmqpValueImpl() const override;
1048
1049 private:
1050 AmqpValue m_descriptor;
1051 };
1052
1061 class AmqpDescribed final {
1062 public:
1072 AmqpDescribed(AmqpSymbol const& descriptor, AmqpValue const& value);
1073
1079 AmqpDescribed(AmqpDescribed&& other) noexcept = default;
1080
1085 AmqpDescribed(const AmqpDescribed& other) = default;
1086
1092 AmqpDescribed& operator=(AmqpDescribed&& other) noexcept = default;
1093
1099 AmqpDescribed& operator=(const AmqpDescribed& other) = default;
1100
1101 ~AmqpDescribed() = default;
1102
1110 AmqpDescribed(uint64_t descriptor, AmqpValue const& value);
1111
1121 AmqpDescribed(AmqpValue const& value);
1122
1127 bool operator==(AmqpDescribed const& that) const
1128 {
1129 if (GetDescriptor() == that.GetDescriptor())
1130 {
1131 return GetValue() == that.GetValue();
1132 }
1133 return false;
1134 }
1135
1140 bool operator!=(AmqpDescribed const& that) const { return !(*this == that); }
1144 explicit operator AmqpValue const() const;
1145
1150 AmqpValue const& GetDescriptor() const { return m_descriptor; }
1151
1156 AmqpValue const& GetValue() const { return m_value; }
1157
1167 operator _detail::AmqpValueImpl() const;
1168
1173 AmqpValue AsAmqpValue() const;
1174
1181 bool operator<(AmqpDescribed const& that) const
1182 {
1183 return m_descriptor < that.m_descriptor ? true
1184 : m_descriptor == that.m_descriptor ? m_value < that.m_value
1185 : false;
1186 }
1187
1188 private:
1189 AmqpValue m_descriptor;
1190 AmqpValue m_value;
1191 };
1192}}}} // namespace Azure::Core::Amqp::Models
Represents an AMQP array.
Definition amqp_value.hpp:639
AmqpArray(AmqpArray &&other) noexcept=default
Move constructor.
AmqpArray(const AmqpArray &other)=default
Copy constructor.
AmqpArray & operator=(const AmqpArray &other)=default
Copy assignment operator.
AmqpArray()
Construct a new AmqpArray object.
Definition amqp_value.hpp:642
virtual ~AmqpArray()=default
Destroy an array.
AmqpArray & operator=(AmqpArray &&other) noexcept=default
Move assignment operator.
An AMQP binary value, a sequence of octets.
Definition amqp_value.hpp:784
AmqpBinaryData(initializer_type const &values)
Construct a new AmqpBinaryData object with an initializer list.
Definition amqp_value.hpp:789
AmqpBinaryData(const AmqpBinaryData &other)=default
Copy constructor.
AmqpBinaryData & operator=(const AmqpBinaryData &other)=default
Copy assignment operator.
AmqpBinaryData(std::vector< std::uint8_t > const &values)
Construct a new AmqpBinaryData from a vector of bytes.
Definition amqp_value.hpp:791
AmqpBinaryData(AmqpBinaryData &&other) noexcept=default
Move Constructor.
AmqpBinaryData & operator=(std::vector< std::uint8_t > const &values)
Assign a vector of bytes to the current AmqpBinaryData.
Definition amqp_value.hpp:806
AmqpBinaryData & operator=(AmqpBinaryData &&other) noexcept=default
Move assignment operator.
An AmqpComposite represents a sequentially ordered list of values. The values of the composite may ha...
Definition amqp_value.hpp:972
AmqpComposite(const AmqpComposite &other)=default
Construct a new AmqpComposite object from another.
AmqpComposite & operator=(const AmqpComposite &other)=default
Copy assignment operator.
bool operator==(AmqpComposite const &that) const
Compare this AmqpComposite value with another.
Definition amqp_value.hpp:1016
AmqpComposite & operator=(AmqpComposite &&other) noexcept=default
Move assignment operator.
AmqpValue const & GetDescriptor() const
Returns the descriptor for this composite type.
Definition amqp_value.hpp:1035
AmqpComposite(AmqpComposite &&other) noexcept=default
Move constructor.
bool operator!=(AmqpComposite const &that) const
Compare this AmqpComposite value with another.
Definition amqp_value.hpp:1029
AmqpComposite()
Construct a new AmqpComposite object.
Definition amqp_value.hpp:975
An AmqpDescribed represents an AMQP described type.
Definition amqp_value.hpp:1061
AmqpDescribed(AmqpDescribed &&other) noexcept=default
Construct a new AmqpDescribed object by moving the contents of another AmqpDescribed object.
AmqpDescribed & operator=(const AmqpDescribed &other)=default
Copy assignment operator for AmqpDescribed.
AmqpValue const & GetDescriptor() const
Returns the descriptor for this composite type.
Definition amqp_value.hpp:1150
bool operator!=(AmqpDescribed const &that) const
Compare this AmqpDescribed value with another.
Definition amqp_value.hpp:1140
bool operator==(AmqpDescribed const &that) const
Compare this AmqpDescribed value with another.
Definition amqp_value.hpp:1127
bool operator<(AmqpDescribed const &that) const
Compare this AmqpDescribed value with another.
Definition amqp_value.hpp:1181
AmqpDescribed & operator=(AmqpDescribed &&other) noexcept=default
Move assignment operator for AmqpDescribed.
AmqpValue const & GetValue() const
Returns the descriptor for this composite type.
Definition amqp_value.hpp:1156
AmqpDescribed(const AmqpDescribed &other)=default
Copy constructor for AmqpDescribed.
AmqpValue AsAmqpValue() const
Convert this AmqpDescribed to an AmqpValue.
Definition amqp_value.cpp:1103
An AMQP List is a sequence of polymorphic values. It has the behavioral characteristics of an AMQP ar...
Definition amqp_value.hpp:744
AmqpList(const AmqpList &other)=default
Copy Constructor.
AmqpList & operator=(const AmqpList &other)=default
Copy assignment operator.
AmqpList & operator=(AmqpList &&other) noexcept=default
Move assignment operator.
AmqpList(std::initializer_list< std::vector< AmqpValue >::value_type > const &values)
Construct a new AmqpList object with an initializer list.
Definition amqp_value.hpp:749
AmqpList(AmqpList &&other) noexcept=default
Move Constructor.
An AmqpMap represents an AMQP "map" type.
Definition amqp_value.hpp:681
AmqpMap & operator=(AmqpMap &&other) noexcept=default
Move assignment operator.
AmqpMap(AmqpMap &&other) noexcept=default
Move Constructor.
std::pair< decltype(m_value)::iterator, bool > emplace(ValueTypes &&... values)
Insert a new key/value pair into the map.
Definition amqp_value.hpp:734
AmqpMap(const AmqpMap &other)=default
Copy Constructor.
AmqpMap(std::initializer_list< std::map< AmqpValue, AmqpValue >::value_type > const &values)
Construct a new AmqpArray object with an initializer list.
Definition amqp_value.hpp:688
AmqpMap & operator=(const AmqpMap &other)=default
Copy assignment operator.
AmqpMap()
Construct a new AmqpMap object.
Definition amqp_value.hpp:685
An AMQP symbol value. An AMQP Symbol is a string valued from a constrained domain,...
Definition amqp_value.hpp:833
AmqpSymbol(initializer_type const &initializer)
Construct a new AmqpSymbol object with an initializer list.
Definition amqp_value.hpp:842
AmqpSymbol & operator=(const AmqpSymbol &other)=default
Copy Assignment operator.
AmqpSymbol(const char *const values)
Construct a new AmqpSymbol object from a constant string value.
Definition amqp_value.hpp:845
AmqpSymbol(AmqpSymbol &&other) noexcept=default
Move constructor.
bool operator==(const decltype(m_value)::value_type *const that) const
Compare two AMQP symbols for equality.
Definition amqp_value.hpp:882
AmqpSymbol(const AmqpSymbol &other)=default
Copy constructor.
bool operator==(AmqpSymbol const &that) const
Compare two AMQP symbols for equality.
Definition amqp_value.hpp:876
AmqpSymbol(std::string const &values)
Construct a new AmqpSymbol object with an initializer list.
Definition amqp_value.hpp:839
AmqpSymbol & operator=(AmqpSymbol &&other) noexcept=default
Move Assignment operator.
An AMQP timestamp value.
Definition amqp_value.hpp:895
AmqpTimestamp(const AmqpTimestamp &other)=default
Copy constructor.
AmqpTimestamp(AmqpTimestamp &&other) noexcept=default
Move constructor.
bool operator<(AmqpTimestamp const &that)
Compare this AMQP Timestamp with another.
Definition amqp_value.hpp:955
AmqpTimestamp & operator=(AmqpTimestamp &&other) noexcept=default
Move Assignment operator.
AmqpValue AsAmqpValue() const
Convert this AmqpTimestamp to an AmqpValue.
Definition amqp_value.cpp:965
AmqpTimestamp & operator=(const AmqpTimestamp &other)=default
Copy Assignment operator.
Definition amqp_value.hpp:104
AmqpSymbol AsSymbol() const
convert the current AMQP Value to an AmqpSymbol.
Definition amqp_value.cpp:602
AmqpValueType GetType() const
Returns the underlying type of the AMQP value.
Definition amqp_value.cpp:694
static AmqpValue Deserialize(uint8_t const *data, size_t size)
Deserialize an AMQP value from an array of bytes.
Definition amqp_value.cpp:712
bool operator!=(AmqpValue const &that) const
Equality comparison operator.
Definition amqp_value.hpp:319
operator std::uint8_t() const
convert the current AMQP Value to an unsigned 8 bit integer.
Definition amqp_value.cpp:357
AmqpTimestamp AsTimestamp() const
convert the current AMQP Value to an AmqpTimestamp.
Definition amqp_value.cpp:608
AmqpMap AsMap() const
convert the current AMQP Value to an AmqpMap.
Definition amqp_value.cpp:598
AmqpBinaryData AsBinary() const
convert the current AMQP Value to an AmqpBinaryData.
Definition amqp_value.cpp:606
static std::vector< uint8_t > Serialize(AmqpValue const &value)
Serialize this AMQP value as an array of bytes.
Definition amqp_value.cpp:717
AmqpList AsList() const
convert the current AMQP Value to an AmqpList.
Definition amqp_value.cpp:605
AmqpDescribed AsDescribed() const
convert the current AMQP Value to an AMQP Described value.
Definition amqp_value.cpp:607
bool IsNull() const
Returns 'true' if the AMQP value is "null".
Definition amqp_value.cpp:1212
AmqpArray AsArray() const
convert the current AMQP Value to an AmqpArray.
Definition amqp_value.cpp:600
AmqpValue & operator=(AmqpValue const &that)
Copy an AMQP value to the current AMQP value.
Definition amqp_value.cpp:336
static size_t GetSerializedSize(AmqpValue const &value)
Returns the size (in bytes) of the serialized form of this value.
Definition amqp_value.cpp:721
AmqpComposite AsComposite() const
convert the current AMQP Value to an AMQP Composite value.
Definition amqp_value.cpp:604
bool operator<(AmqpValue const &that) const
Less Than comparison operator.
Definition amqp_value.cpp:536
AmqpValue() noexcept
Construct an AMQP null (empty) value.
Definition amqp_value.cpp:318
bool operator==(AmqpValue const &that) const
Equality comparison operator.
Definition amqp_value.cpp:499