17 #ifndef INCLUDED_BMQA_MESSAGEPROPERTIES
18 #define INCLUDED_BMQA_MESSAGEPROPERTIES
66 #include <bdlbb_blob.h>
67 #include <bsl_cstdint.h>
68 #include <bsl_string.h>
69 #include <bslma_allocator.h>
70 #include <bslma_usesbslmaallocator.h>
71 #include <bslmf_nestedtraitdeclaration.h>
72 #include <bsls_alignedbuffer.h>
73 #include <bsls_types.h>
79 class MessageProperties;
82 class MessagePropertiesIterator;
102 static const int k_MAX_SIZEOF_BMQP_MESSAGEPROPERTIES = 184;
105 typedef bsls::AlignedBuffer<k_MAX_SIZEOF_BMQP_MESSAGEPROPERTIES>
115 mutable bmqp::MessageProperties* d_impl_p;
120 bslma::Allocator* d_allocator_p;
146 bslma::UsesBslmaAllocator)
161 bslma::Allocator* basicAllocator = 0);
175 bool remove(const bsl::
string& name, bmqt::PropertyType::Enum* buffer = 0);
195 const bsl::vector<
char>& value);
216 bmqt::PropertyType::Enum* type = 0) const;
232 const bsl::vector<
char>&
239 bsl::int32_t value) const;
241 bsls::Types::Int64 value) const;
243 const bsl::
string& value) const;
248 const bsl::vector<
char>&
250 const bsl::vector<
char>& value) const;
259 streamOut(bdlbb::BlobBufferFactory* bufferFactory) const;
271 print(bsl::ostream& stream,
int level = 0,
int spacesPerLevel = 4) const;
297 static const int k_MAX_SIZEOF_BMQP_MESSAGEPROPERTIESITER = 64;
300 typedef bsls::AlignedBuffer<k_MAX_SIZEOF_BMQP_MESSAGEPROPERTIESITER>
305 mutable bmqp::MessagePropertiesIterator* d_impl_p;
353 const bsl::string&
name()
const;
386 return rhs.
print(stream, 0, -1);
Provide enum for the supported data types for a message property.
Provide enums for various publicly exposed result code.
Definition: bmqa_messageproperties.h:290
MessagePropertiesIterator & operator=(const MessagePropertiesIterator &rhs)
Assignment operator from the specified rhs.
bmqt::PropertyType::Enum type() const
bsls::Types::Int64 getAsInt64() const
~MessagePropertiesIterator()
Destroy this iterator.
const bsl::vector< char > & getAsBinary() const
MessagePropertiesIterator(const MessagePropertiesIterator &other)
Copy constructor from the specified other.
bsl::int32_t getAsInt32() const
const bsl::string & getAsString() const
MessagePropertiesIterator(const MessageProperties *properties)
MessagePropertiesIterator()
const bsl::string & name() const
Provide a VST representing message properties.
Definition: bmqa_messageproperties.h:92
bmqt::PropertyType::Enum propertyType(const bsl::string &name) const
static const int k_MAX_PROPERTY_VALUE_LENGTH
Definition: bmqa_messageproperties.h:141
bool getPropertyAsBool(const bsl::string &name) const
int setPropertyAsShort(const bsl::string &name, short value)
bsls::Types::Int64 getPropertyAsInt64Or(const bsl::string &name, bsls::Types::Int64 value) const
bsls::Types::Int64 getPropertyAsInt64(const bsl::string &name) const
bsl::int32_t getPropertyAsInt32(const bsl::string &name) const
const bsl::string & getPropertyAsString(const bsl::string &name) const
const bsl::string & getPropertyAsStringOr(const bsl::string &name, const bsl::string &value) const
bool remove(const bsl::string &name, bmqt::PropertyType::Enum *buffer=0)
int setPropertyAsString(const bsl::string &name, const bsl::string &value)
int setPropertyAsInt64(const bsl::string &name, bsls::Types::Int64 value)
short getPropertyAsShortOr(const bsl::string &name, short value) const
char getPropertyAsCharOr(const bsl::string &name, char value) const
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static const int k_MAX_PROPERTIES_AREA_LENGTH
Definition: bmqa_messageproperties.h:131
short getPropertyAsShort(const bsl::string &name) const
bool hasProperty(const bsl::string &name, bmqt::PropertyType::Enum *type=0) const
char getPropertyAsChar(const bsl::string &name) const
int setPropertyAsBinary(const bsl::string &name, const bsl::vector< char > &value)
const bsl::vector< char > & getPropertyAsBinary(const bsl::string &name) const
int setPropertyAsChar(const bsl::string &name, char value)
int numProperties() const
Return the total number of properties set in this instance.
static const int k_MAX_PROPERTY_NAME_LENGTH
Maximum length of a property name.
Definition: bmqa_messageproperties.h:134
const bdlbb::Blob & streamOut(bdlbb::BlobBufferFactory *bufferFactory) const
bool getPropertyAsBoolOr(const bsl::string &name, bool value) const
int setPropertyAsBool(const bsl::string &name, bool value)
int setPropertyAsInt32(const bsl::string &name, bsl::int32_t value)
int streamIn(const bdlbb::Blob &blob)
const bsl::vector< char > & getPropertyAsBinaryOr(const bsl::string &name, const bsl::vector< char > &value) const
static const int k_MAX_NUM_PROPERTIES
Maximum number of properties that can appear in a bmqa::Message.
Definition: bmqa_messageproperties.h:126
bsl::int32_t getPropertyAsInt32Or(const bsl::string &name, bsl::int32_t value) const
bsl::ostream & operator<<(bsl::ostream &stream, const CloseQueueStatus &rhs)
Definition: bmqa_closequeuestatus.h:227
Definition: bmqa_abstractsession.h:42
Enum
Definition: bmqt_propertytype.h:61