8#ifndef INCLUDED_S_BALTST_SEQUENCEWITHANONYMITY
9#define INCLUDED_S_BALTST_SEQUENCEWITHANONYMITY
43#include <bslalg_typetraits.h>
59#include <bsl_string.h>
67#include <bsl_iosfwd.h>
68#include <bsl_limits.h>
72namespace bslma {
class Allocator; }
74namespace s_baltst {
class SequenceWithAnonymityChoice1; }
75namespace s_baltst {
class SequenceWithAnonymityChoice; }
76namespace s_baltst {
class SequenceWithAnonymityChoice2; }
77namespace s_baltst {
class SequenceWithAnonymity; }
149#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
150 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
175#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
176 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
206#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
207 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
219 template <
typename t_MANIPULATOR>
248 bsl::ostream&
print(bsl::ostream& stream,
250 int spacesPerLevel = 4)
const;
260 template <
typename t_ACCESSOR>
300 return lhs.isEqualTo(rhs);
309 return !(lhs == rhs);
317 return rhs.print(stream, 0, -1);
404#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
405 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
430#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
431 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
455#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
456 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
471#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
472 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
481#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
482 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
494 template <
typename t_MANIPULATOR>
535 bsl::ostream&
print(bsl::ostream& stream,
537 int spacesPerLevel = 4)
const;
547 template <
typename t_ACCESSOR>
607 return lhs.isEqualTo(rhs);
616 return !(lhs == rhs);
624 return rhs.print(stream, 0, -1);
705#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
706 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
731#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
732 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
756#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
757 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
766#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
767 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
779 template <
typename t_MANIPULATOR>
808 bsl::ostream&
print(bsl::ostream& stream,
810 int spacesPerLevel = 4)
const;
820 template <
typename t_ACCESSOR>
860 return lhs.isEqualTo(rhs);
869 return !(lhs == rhs);
877 return rhs.print(stream, 0, -1);
958#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
959 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
983#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
984 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
1001 template <
typename t_MANIPULATOR>
1010 template <
typename t_MANIPULATOR>
1019 template <
typename t_MANIPULATOR>
1054 bsl::ostream&
print(bsl::ostream& stream,
1056 int spacesPerLevel = 4)
const;
1064 template <
typename t_ACCESSOR>
1072 template <
typename t_ACCESSOR>
1081 template <
typename t_ACCESSOR>
1084 int nameLength)
const;
1110 return lhs.isEqualTo(rhs);
1117 return !(lhs == rhs);
1125 return rhs.print(stream, 0, -1);
1150bool SequenceWithAnonymityChoice1::isEqualTo(
const SequenceWithAnonymityChoice1& rhs)
const
1152 typedef SequenceWithAnonymityChoice1 Class;
1154 switch (rhs.selectionId()) {
1155 case Class::SELECTION_ID_SELECTION5:
1156 return this->
selection5() == rhs.selection5();
1157 case Class::SELECTION_ID_SELECTION6:
1158 return this->
selection6() == rhs.selection6();
1160 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId());
1172: d_selectionId(SELECTION_ID_UNDEFINED)
1173, d_allocator_p(
bslma::Default::allocator(basicAllocator))
1184template <
typename t_MANIPULATOR>
1187 switch (d_selectionId) {
1218 return d_selectionId;
1221template <
typename t_ACCESSOR>
1224 switch (d_selectionId) {
1281 switch (rhs.selectionId()) {
1282 case Class::SELECTION_ID_SELECTION1:
1284 case Class::SELECTION_ID_SELECTION2:
1286 case Class::SELECTION_ID_SELECTION3:
1288 case Class::SELECTION_ID_SELECTION4:
1291 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId());
1303: d_selectionId(SELECTION_ID_UNDEFINED)
1304, d_allocator_p(
bslma::Default::allocator(basicAllocator))
1315template <
typename t_MANIPULATOR>
1318 switch (d_selectionId) {
1369 return d_selectionId;
1372template <
typename t_ACCESSOR>
1375 switch (d_selectionId) {
1464 switch (rhs.selectionId()) {
1465 case Class::SELECTION_ID_SELECTION7:
1467 case Class::SELECTION_ID_SELECTION8:
1470 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId());
1482: d_selectionId(SELECTION_ID_UNDEFINED)
1483, d_allocator_p(
bslma::Default::allocator(basicAllocator))
1494template <
typename t_MANIPULATOR>
1497 switch (d_selectionId) {
1528 return d_selectionId;
1531template <
typename t_ACCESSOR>
1534 switch (d_selectionId) {
1596template <
typename t_MANIPULATOR>
1624template <
typename t_MANIPULATOR>
1627 enum { NOT_FOUND = -1 };
1647template <
typename t_MANIPULATOR>
1649 t_MANIPULATOR& manipulator,
1653 enum { NOT_FOUND = -1 };
1657 if (0 == attributeInfo) {
1689template <
typename t_ACCESSOR>
1717template <
typename t_ACCESSOR>
1720 enum { NOT_FOUND = -1 };
1740template <
typename t_ACCESSOR>
1742 t_ACCESSOR& accessor,
1744 int nameLength)
const
1746 enum { NOT_FOUND = -1 };
1750 if (0 == attributeInfo) {
Definition bdlb_nullablevalue.h:262
Definition bslstl_string.h:1252
Definition bslma_allocator.h:545
Definition s_baltst_ratsnest.h:1611
Definition s_baltst_customint.h:65
Definition s_baltst_customstring.h:71
Definition s_baltst_ratsnest.h:1909
Definition s_baltst_ratsnest.h:645
Definition s_baltst_sequencewithanonymity.h:84
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
bool & makeSelection5(bool value)
@ SELECTION_ID_SELECTION5
Definition s_baltst_sequencewithanonymity.h:103
@ SELECTION_ID_UNDEFINED
Definition s_baltst_sequencewithanonymity.h:102
@ SELECTION_ID_SELECTION6
Definition s_baltst_sequencewithanonymity.h:104
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_sequencewithanonymity.h:119
static const char CLASS_NAME[]
Definition s_baltst_sequencewithanonymity.h:117
bsl::string & makeSelection6()
friend bsl::ostream & operator<<(bsl::ostream &stream, const SequenceWithAnonymityChoice1 &rhs)
Definition s_baltst_sequencewithanonymity.h:314
int makeSelection(int selectionId)
const char * selectionName() const
Return the symbolic name of the current selection of this object.
bsls::ObjectBuffer< bool > d_selection5
Definition s_baltst_sequencewithanonymity.h:88
bool isSelection5Value() const
Definition s_baltst_sequencewithanonymity.h:1252
int accessSelection(t_ACCESSOR &accessor) const
Definition s_baltst_sequencewithanonymity.h:1222
bsls::ObjectBuffer< bsl::string > d_selection6
Definition s_baltst_sequencewithanonymity.h:89
@ NUM_SELECTIONS
Definition s_baltst_sequencewithanonymity.h:108
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
bool isUndefinedValue() const
Definition s_baltst_sequencewithanonymity.h:1264
SequenceWithAnonymityChoice1 & operator=(const SequenceWithAnonymityChoice1 &rhs)
Assign to this object the value of the specified rhs object.
SequenceWithAnonymityChoice1(bslma::Allocator *basicAllocator=0)
Definition s_baltst_sequencewithanonymity.h:1171
bool isSelection6Value() const
Definition s_baltst_sequencewithanonymity.h:1258
friend bool operator!=(const SequenceWithAnonymityChoice1 &lhs, const SequenceWithAnonymityChoice1 &rhs)
Definition s_baltst_sequencewithanonymity.h:306
int selectionId() const
Definition s_baltst_sequencewithanonymity.h:1216
bool & selection5()
Definition s_baltst_sequencewithanonymity.h:1201
SequenceWithAnonymityChoice1(const SequenceWithAnonymityChoice1 &original, bslma::Allocator *basicAllocator=0)
~SequenceWithAnonymityChoice1()
Destroy this object.
Definition s_baltst_sequencewithanonymity.h:1178
friend bool operator==(const SequenceWithAnonymityChoice1 &lhs, const SequenceWithAnonymityChoice1 &rhs)
Definition s_baltst_sequencewithanonymity.h:297
bsl::string & makeSelection6(const bsl::string &value)
int manipulateSelection(t_MANIPULATOR &manipulator)
Definition s_baltst_sequencewithanonymity.h:1185
@ SELECTION_INDEX_SELECTION6
Definition s_baltst_sequencewithanonymity.h:113
@ SELECTION_INDEX_SELECTION5
Definition s_baltst_sequencewithanonymity.h:112
static const bdlat_SelectionInfo * lookupSelectionInfo(const char *name, int nameLength)
int makeSelection(const char *name, int nameLength)
bsl::string & selection6()
Definition s_baltst_sequencewithanonymity.h:1208
Definition s_baltst_sequencewithanonymity.h:640
s_baltst::Choice2 & makeSelection8()
s_baltst::Choice2 & makeSelection8(const s_baltst::Choice2 &value)
@ SELECTION_ID_UNDEFINED
Definition s_baltst_sequencewithanonymity.h:658
@ SELECTION_ID_SELECTION7
Definition s_baltst_sequencewithanonymity.h:659
@ SELECTION_ID_SELECTION8
Definition s_baltst_sequencewithanonymity.h:660
s_baltst::Choice2 * d_selection8
Definition s_baltst_sequencewithanonymity.h:645
s_baltst::Choice2 & selection8()
Definition s_baltst_sequencewithanonymity.h:1518
~SequenceWithAnonymityChoice2()
Destroy this object.
Definition s_baltst_sequencewithanonymity.h:1488
bool isUndefinedValue() const
Definition s_baltst_sequencewithanonymity.h:1574
int accessSelection(t_ACCESSOR &accessor) const
Definition s_baltst_sequencewithanonymity.h:1532
SequenceWithAnonymityChoice2(bslma::Allocator *basicAllocator=0)
Definition s_baltst_sequencewithanonymity.h:1481
s_baltst::Sequence4 & makeSelection7()
s_baltst::Sequence4 & selection7()
Definition s_baltst_sequencewithanonymity.h:1511
friend bool operator!=(const SequenceWithAnonymityChoice2 &lhs, const SequenceWithAnonymityChoice2 &rhs)
Definition s_baltst_sequencewithanonymity.h:866
static const bdlat_SelectionInfo * lookupSelectionInfo(const char *name, int nameLength)
@ SELECTION_INDEX_SELECTION8
Definition s_baltst_sequencewithanonymity.h:669
@ SELECTION_INDEX_SELECTION7
Definition s_baltst_sequencewithanonymity.h:668
@ NUM_SELECTIONS
Definition s_baltst_sequencewithanonymity.h:664
int manipulateSelection(t_MANIPULATOR &manipulator)
Definition s_baltst_sequencewithanonymity.h:1495
s_baltst::Sequence4 & makeSelection7(const s_baltst::Sequence4 &value)
static const char CLASS_NAME[]
Definition s_baltst_sequencewithanonymity.h:673
int makeSelection(int selectionId)
const char * selectionName() const
Return the symbolic name of the current selection of this object.
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
bool isSelection8Value() const
Definition s_baltst_sequencewithanonymity.h:1568
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_sequencewithanonymity.h:675
bool isSelection7Value() const
Definition s_baltst_sequencewithanonymity.h:1562
friend bsl::ostream & operator<<(bsl::ostream &stream, const SequenceWithAnonymityChoice2 &rhs)
Definition s_baltst_sequencewithanonymity.h:874
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
SequenceWithAnonymityChoice2(const SequenceWithAnonymityChoice2 &original, bslma::Allocator *basicAllocator=0)
int selectionId() const
Definition s_baltst_sequencewithanonymity.h:1526
friend bool operator==(const SequenceWithAnonymityChoice2 &lhs, const SequenceWithAnonymityChoice2 &rhs)
Definition s_baltst_sequencewithanonymity.h:857
s_baltst::Sequence4 * d_selection7
Definition s_baltst_sequencewithanonymity.h:644
int makeSelection(const char *name, int nameLength)
SequenceWithAnonymityChoice2 & operator=(const SequenceWithAnonymityChoice2 &rhs)
Assign to this object the value of the specified rhs object.
Definition s_baltst_sequencewithanonymity.h:333
bsls::ObjectBuffer< s_baltst::CustomInt > d_selection4
Definition s_baltst_sequencewithanonymity.h:340
bsls::ObjectBuffer< s_baltst::Sequence6 > d_selection1
Definition s_baltst_sequencewithanonymity.h:337
s_baltst::CustomInt & makeSelection4()
unsigned char & makeSelection2(unsigned char value)
bsls::ObjectBuffer< s_baltst::CustomString > d_selection3
Definition s_baltst_sequencewithanonymity.h:339
bool isSelection1Value() const
Definition s_baltst_sequencewithanonymity.h:1423
s_baltst::Sequence6 & selection1()
Definition s_baltst_sequencewithanonymity.h:1338
~SequenceWithAnonymityChoice()
Destroy this object.
Definition s_baltst_sequencewithanonymity.h:1309
@ NUM_SELECTIONS
Definition s_baltst_sequencewithanonymity.h:361
unsigned char & selection2()
Definition s_baltst_sequencewithanonymity.h:1345
int manipulateSelection(t_MANIPULATOR &manipulator)
Definition s_baltst_sequencewithanonymity.h:1316
bool isSelection3Value() const
Definition s_baltst_sequencewithanonymity.h:1435
s_baltst::CustomString & makeSelection3()
SequenceWithAnonymityChoice(bslma::Allocator *basicAllocator=0)
Definition s_baltst_sequencewithanonymity.h:1302
int accessSelection(t_ACCESSOR &accessor) const
Definition s_baltst_sequencewithanonymity.h:1373
int selectionId() const
Definition s_baltst_sequencewithanonymity.h:1367
s_baltst::CustomString & makeSelection3(const s_baltst::CustomString &value)
unsigned char & makeSelection2()
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
s_baltst::CustomString & selection3()
Definition s_baltst_sequencewithanonymity.h:1352
SequenceWithAnonymityChoice & operator=(const SequenceWithAnonymityChoice &rhs)
Assign to this object the value of the specified rhs object.
int makeSelection(int selectionId)
@ SELECTION_ID_SELECTION2
Definition s_baltst_sequencewithanonymity.h:355
@ SELECTION_ID_SELECTION1
Definition s_baltst_sequencewithanonymity.h:354
@ SELECTION_ID_SELECTION4
Definition s_baltst_sequencewithanonymity.h:357
@ SELECTION_ID_SELECTION3
Definition s_baltst_sequencewithanonymity.h:356
@ SELECTION_ID_UNDEFINED
Definition s_baltst_sequencewithanonymity.h:353
static const char CLASS_NAME[]
Definition s_baltst_sequencewithanonymity.h:372
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_sequencewithanonymity.h:374
bsls::ObjectBuffer< unsigned char > d_selection2
Definition s_baltst_sequencewithanonymity.h:338
bool isSelection4Value() const
Definition s_baltst_sequencewithanonymity.h:1441
SequenceWithAnonymityChoice(const SequenceWithAnonymityChoice &original, bslma::Allocator *basicAllocator=0)
static const bdlat_SelectionInfo * lookupSelectionInfo(const char *name, int nameLength)
s_baltst::CustomInt & makeSelection4(const s_baltst::CustomInt &value)
friend bool operator==(const SequenceWithAnonymityChoice &lhs, const SequenceWithAnonymityChoice &rhs)
Definition s_baltst_sequencewithanonymity.h:604
friend bool operator!=(const SequenceWithAnonymityChoice &lhs, const SequenceWithAnonymityChoice &rhs)
Definition s_baltst_sequencewithanonymity.h:613
bool isSelection2Value() const
Definition s_baltst_sequencewithanonymity.h:1429
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
const char * selectionName() const
Return the symbolic name of the current selection of this object.
s_baltst::Sequence6 & makeSelection1()
int makeSelection(const char *name, int nameLength)
s_baltst::CustomInt & selection4()
Definition s_baltst_sequencewithanonymity.h:1359
friend bsl::ostream & operator<<(bsl::ostream &stream, const SequenceWithAnonymityChoice &rhs)
Definition s_baltst_sequencewithanonymity.h:621
bool isUndefinedValue() const
Definition s_baltst_sequencewithanonymity.h:1447
@ SELECTION_INDEX_SELECTION3
Definition s_baltst_sequencewithanonymity.h:367
@ SELECTION_INDEX_SELECTION2
Definition s_baltst_sequencewithanonymity.h:366
@ SELECTION_INDEX_SELECTION4
Definition s_baltst_sequencewithanonymity.h:368
@ SELECTION_INDEX_SELECTION1
Definition s_baltst_sequencewithanonymity.h:365
s_baltst::Sequence6 & makeSelection1(const s_baltst::Sequence6 &value)
Definition s_baltst_sequencewithanonymity.h:893
~SequenceWithAnonymity()
Destroy this object.
int manipulateAttributes(t_MANIPULATOR &manipulator)
Definition s_baltst_sequencewithanonymity.h:1597
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
@ ATTRIBUTE_INDEX_CHOICE2
Definition s_baltst_sequencewithanonymity.h:920
@ ATTRIBUTE_INDEX_CHOICE
Definition s_baltst_sequencewithanonymity.h:918
@ ATTRIBUTE_INDEX_CHOICE1
Definition s_baltst_sequencewithanonymity.h:919
@ ATTRIBUTE_INDEX_ELEMENT4
Definition s_baltst_sequencewithanonymity.h:921
static const char CLASS_NAME[]
Definition s_baltst_sequencewithanonymity.h:925
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
@ NUM_ATTRIBUTES
Definition s_baltst_sequencewithanonymity.h:914
friend bool operator==(const SequenceWithAnonymity &lhs, const SequenceWithAnonymity &rhs)
Definition s_baltst_sequencewithanonymity.h:1107
friend bool operator!=(const SequenceWithAnonymity &lhs, const SequenceWithAnonymity &rhs)
Returns !(lhs == rhs)
Definition s_baltst_sequencewithanonymity.h:1114
SequenceWithAnonymityChoice & choice()
Definition s_baltst_sequencewithanonymity.h:1665
SequenceWithAnonymity(bslma::Allocator *basicAllocator=0)
SequenceWithAnonymity & operator=(const SequenceWithAnonymity &rhs)
Assign to this object the value of the specified rhs object.
SequenceWithAnonymity(const SequenceWithAnonymity &original, bslma::Allocator *basicAllocator=0)
int accessAttribute(t_ACCESSOR &accessor, int id) const
Definition s_baltst_sequencewithanonymity.h:1718
friend bsl::ostream & operator<<(bsl::ostream &stream, const SequenceWithAnonymity &rhs)
Definition s_baltst_sequencewithanonymity.h:1122
int accessAttributes(t_ACCESSOR &accessor) const
Definition s_baltst_sequencewithanonymity.h:1690
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_sequencewithanonymity.h:927
s_baltst::Sequence6 & element4()
Definition s_baltst_sequencewithanonymity.h:1683
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
SequenceWithAnonymityChoice1 & choice1()
Definition s_baltst_sequencewithanonymity.h:1671
@ ATTRIBUTE_ID_CHOICE2
Definition s_baltst_sequencewithanonymity.h:909
@ ATTRIBUTE_ID_ELEMENT4
Definition s_baltst_sequencewithanonymity.h:910
@ ATTRIBUTE_ID_CHOICE1
Definition s_baltst_sequencewithanonymity.h:908
@ ATTRIBUTE_ID_CHOICE
Definition s_baltst_sequencewithanonymity.h:907
int manipulateAttribute(t_MANIPULATOR &manipulator, int id)
Definition s_baltst_sequencewithanonymity.h:1625
bdlb::NullableValue< SequenceWithAnonymityChoice2 > & choice2()
Definition s_baltst_sequencewithanonymity.h:1677
#define BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:268
#define BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:301
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#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_selectioninfo.h:138
Definition bdlat_typetraits.h:146
TYPE & object()
Definition bsls_objectbuffer.h:352