8#ifndef INCLUDED_S_BALTST_MYSEQUENCEWITHATTRIBUTES
9#define INCLUDED_S_BALTST_MYSEQUENCEWITHATTRIBUTES
43#include <bslalg_typetraits.h>
59#include <bsl_string.h>
61#include <bsl_iosfwd.h>
62#include <bsl_limits.h>
66namespace bslma {
class Allocator; }
68namespace s_baltst {
class MySequenceWithAttributes; }
140#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
141 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
166#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
167 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
184 template <
typename t_MANIPULATOR>
193 template <
typename t_MANIPULATOR>
202 template <
typename t_MANIPULATOR>
237 bsl::ostream&
print(bsl::ostream& stream,
239 int spacesPerLevel = 4)
const;
247 template <
typename t_ACCESSOR>
255 template <
typename t_ACCESSOR>
264 template <
typename t_ACCESSOR>
267 int nameLength)
const;
292 return lhs.isEqualTo(rhs);
299 return !(lhs == rhs);
307 return rhs.print(stream, 0, -1);
331bool MySequenceWithAttributes::isEqualTo(
const MySequenceWithAttributes& rhs)
const
333 return this->
attribute1() == rhs.attribute1() &&
335 this->
element1() == rhs.element1() &&
341template <
typename t_MANIPULATOR>
369template <
typename t_MANIPULATOR>
372 enum { NOT_FOUND = -1 };
392template <
typename t_MANIPULATOR>
394 t_MANIPULATOR& manipulator,
398 enum { NOT_FOUND = -1 };
402 if (0 == attributeInfo) {
434template <
typename t_ACCESSOR>
462template <
typename t_ACCESSOR>
465 enum { NOT_FOUND = -1 };
485template <
typename t_ACCESSOR>
487 t_ACCESSOR& accessor,
489 int nameLength)
const
491 enum { NOT_FOUND = -1 };
495 if (0 == attributeInfo) {
Definition bdlb_nullablevalue.h:262
Definition bslma_allocator.h:545
Definition s_baltst_mysequencewithattributes.h:75
friend bsl::ostream & operator<<(bsl::ostream &stream, const MySequenceWithAttributes &rhs)
Definition s_baltst_mysequencewithattributes.h:304
@ ATTRIBUTE_INDEX_ELEMENT1
Definition s_baltst_mysequencewithattributes.h:102
@ ATTRIBUTE_INDEX_ELEMENT2
Definition s_baltst_mysequencewithattributes.h:103
@ ATTRIBUTE_INDEX_ATTRIBUTE1
Definition s_baltst_mysequencewithattributes.h:100
@ ATTRIBUTE_INDEX_ATTRIBUTE2
Definition s_baltst_mysequencewithattributes.h:101
friend bool operator==(const MySequenceWithAttributes &lhs, const MySequenceWithAttributes &rhs)
Definition s_baltst_mysequencewithattributes.h:289
bdlb::NullableValue< bsl::string > & element2()
Definition s_baltst_mysequencewithattributes.h:428
bdlb::NullableValue< int > & element1()
Definition s_baltst_mysequencewithattributes.h:422
MySequenceWithAttributes(bslma::Allocator *basicAllocator=0)
friend bool operator!=(const MySequenceWithAttributes &lhs, const MySequenceWithAttributes &rhs)
Returns !(lhs == rhs)
Definition s_baltst_mysequencewithattributes.h:296
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_mysequencewithattributes.h:109
int accessAttributes(t_ACCESSOR &accessor) const
Definition s_baltst_mysequencewithattributes.h:435
~MySequenceWithAttributes()
Destroy this object.
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
@ NUM_ATTRIBUTES
Definition s_baltst_mysequencewithattributes.h:96
int manipulateAttributes(t_MANIPULATOR &manipulator)
Definition s_baltst_mysequencewithattributes.h:342
bdlb::NullableValue< bsl::string > & attribute2()
Definition s_baltst_mysequencewithattributes.h:416
MySequenceWithAttributes(const MySequenceWithAttributes &original, bslma::Allocator *basicAllocator=0)
MySequenceWithAttributes & operator=(const MySequenceWithAttributes &rhs)
Assign to this object the value of the specified rhs object.
int manipulateAttribute(t_MANIPULATOR &manipulator, int id)
Definition s_baltst_mysequencewithattributes.h:370
int accessAttribute(t_ACCESSOR &accessor, int id) const
Definition s_baltst_mysequencewithattributes.h:463
static const char CLASS_NAME[]
Definition s_baltst_mysequencewithattributes.h:107
int & attribute1()
Definition s_baltst_mysequencewithattributes.h:410
@ ATTRIBUTE_ID_ATTRIBUTE2
Definition s_baltst_mysequencewithattributes.h:90
@ ATTRIBUTE_ID_ATTRIBUTE1
Definition s_baltst_mysequencewithattributes.h:89
@ ATTRIBUTE_ID_ELEMENT1
Definition s_baltst_mysequencewithattributes.h:91
@ ATTRIBUTE_ID_ELEMENT2
Definition s_baltst_mysequencewithattributes.h:92
#define BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:301
#define BSLS_IDENT_RCSID(tag, str)
BSLS_IDENT_RCSID() - insert ident str (specific to platform/compiler)
Definition bsls_ident.h:244
#define BSLS_IDENT_PRAGMA_ONCE
BSLS_IDENT_PRAGMA_ONCE - macro to avoid multiple inclusion
Definition bsls_ident.h:263
Definition baljsn_encoder_testtypes.h:76
Definition s_baltst_address.h:66
Definition bdlat_attributeinfo.h:139
int d_id
Definition bdlat_attributeinfo.h:142
Definition bdlat_typetraits.h:146