8#ifndef INCLUDED_BALL_ATTRIBUTE
9#define INCLUDED_BALL_ATTRIBUTE
171#include <balscm_version.h>
184#include <bsl_cstring.h>
185#include <bsl_string.h>
186#include <bsl_string_view.h>
221 mutable int d_hashValue;
223 mutable int d_hashSize;
295 unsigned long long value,
357 const char *
name()
const;
372 bsl::ostream&
print(bsl::ostream& stream,
374 int spacesPerLevel = 4)
const;
418, d_value(allocator.mechanism())
430, d_value(allocator.mechanism())
442, d_value(value, allocator.mechanism())
453, d_value(value, allocator.mechanism())
464, d_value(value, allocator.mechanism())
475, d_value(value, allocator.mechanism())
486, d_value(value, allocator.mechanism())
494 unsigned long long value,
497, d_value(value, allocator.mechanism())
508, d_value(value, allocator.mechanism())
519, d_value(value, allocator.mechanism())
530, d_value(value, allocator.mechanism())
539: d_name(original.d_name)
540, d_value(original.d_value, allocator.mechanism())
541, d_hashValue(original.d_hashValue)
542, d_hashSize(original.d_hashSize)
551 d_value = rhs.d_value;
552 d_hashValue = rhs.d_hashValue;
553 d_hashSize = rhs.d_hashSize;
647 return d_name.
data();
662 return d_value.getAllocator();
671 return lhs.d_name == rhs.d_name && lhs.d_value == rhs.d_value;
Definition ball_attribute.h:199
Attribute(const char *name, const bsl::string_view &value, const allocator_type &allocator=allocator_type())
Definition ball_attribute.h:414
friend bool operator!=(const Attribute &, const Attribute &)
void setName(const char *name)
Definition ball_attribute.h:558
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
BSLMF_NESTED_TRAIT_DECLARATION(Attribute, bslma::UsesBslmaAllocator)
allocator_type get_allocator() const
Definition ball_attribute.h:659
friend bool operator==(const Attribute &, const Attribute &)
void setValue(const Value &value)
Set the attribute value of this object to the specified value.
Definition ball_attribute.h:565
bsl::allocator< char > allocator_type
Definition ball_attribute.h:234
Attribute & operator=(const Attribute &rhs)
Assign the value of the specified rhs object to this object.
Definition ball_attribute.h:548
const char * name() const
Return the name of this object.
Definition ball_attribute.h:643
static int hash(const Attribute &attribute, int size)
friend bsl::ostream & operator<<(bsl::ostream &, const Attribute &)
bdlb::Variant< int, long, long long, unsigned int, unsigned long, unsigned long long, bsl::string, const void *, bdlb::Guid > Value
Value is an alias for the attribute type variant.
Definition ball_attribute.h:213
const Value & value() const
Definition ball_attribute.h:651
~Attribute()=default
Destroy this object.
Definition bdlb_guid.h:201
TYPE & createInPlace(ARGS &&... arguments)
Definition bdlb_variant.h:7574
Definition bdlb_variant.h:2389
Definition bslma_bslallocator.h:588
Definition bslstl_stringview.h:471
BSLS_KEYWORD_CONSTEXPR const_pointer data() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_stringview.h:1988
Definition bslstl_string.h:1252
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition ball_administration.h:214
bsl::ostream & operator<<(bsl::ostream &output, const Attribute &attribute)
bool operator!=(const Attribute &lhs, const Attribute &rhs)
bool operator==(const Attribute &lhs, const Attribute &rhs)
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
ALLOCATOR & lhs
Definition bslstl_string.h:3917
basic_string< char > string
Definition bslstl_string.h:844
Definition bslma_usesbslmaallocator.h:344