8#ifndef INCLUDED_S_BALTST_MYSEQUENCEWITHNULLABLEANONYMOUSCHOICE
9#define INCLUDED_S_BALTST_MYSEQUENCEWITHNULLABLEANONYMOUSCHOICE
12BSLS_IDENT_RCSID(s_baltst_mysequencewithnullableanonymouschoice_h,
"$Id$ $CSID$")
43#include <bslalg_typetraits.h>
57#include <bsl_iosfwd.h>
58#include <bsl_limits.h>
62namespace s_baltst {
class MySequenceWithNullableAnonymousChoiceChoice; }
63namespace s_baltst {
class MySequenceWithNullableAnonymousChoice; }
128#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
129 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
145#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
146 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
185 template<
class MANIPULATOR>
214 bsl::ostream&
print(bsl::ostream& stream,
216 int spacesPerLevel = 4)
const;
226 template<
class ACCESSOR>
336#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
337 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
353#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
354 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
371 template<
class MANIPULATOR>
380 template<
class MANIPULATOR>
389 template<
class MANIPULATOR>
412 bsl::ostream&
print(bsl::ostream& stream,
414 int spacesPerLevel = 4)
const;
422 template<
class ACCESSOR>
430 template<
class ACCESSOR>
439 template<
class ACCESSOR>
442 int nameLength)
const;
489: d_selectionId(SELECTION_ID_UNDEFINED)
500template <
class MANIPULATOR>
503 switch (d_selectionId) {
534 return d_selectionId;
537template <
class ACCESSOR>
540 switch (d_selectionId) {
592template <
class MANIPULATOR>
605template <
class MANIPULATOR>
608 enum { NOT_FOUND = -1 };
619template <
class MANIPULATOR>
621 MANIPULATOR& manipulator,
625 enum { NOT_FOUND = -1 };
629 if (0 == attributeInfo) {
643template <
class ACCESSOR>
656template <
class ACCESSOR>
659 enum { NOT_FOUND = -1 };
670template <
class ACCESSOR>
674 int nameLength)
const
676 enum { NOT_FOUND = -1 };
680 if (0 == attributeInfo) {
703 if (lhs.selectionId() == rhs.selectionId()) {
704 switch (rhs.selectionId()) {
705 case Class::SELECTION_ID_CHOICE_A:
706 return lhs.choiceA() == rhs.choiceA();
707 case Class::SELECTION_ID_CHOICE_B:
708 return lhs.choiceB() == rhs.choiceB();
710 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId());
729 bsl::ostream& stream,
732 return rhs.print(stream, 0, -1);
741 return lhs.choice() ==
rhs.choice();
754 bsl::ostream& stream,
757 return rhs.print(stream, 0, -1);
Definition bdlb_nullablevalue.h:262
Definition s_baltst_mysequencewithnullableanonymouschoice.h:70
int & choiceB()
Definition s_baltst_mysequencewithnullableanonymouschoice.h:524
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.
bsls::ObjectBuffer< int > d_choiceA
Definition s_baltst_mysequencewithnullableanonymouschoice.h:74
int makeSelection(const char *name, int nameLength)
@ NUM_SELECTIONS
Definition s_baltst_mysequencewithnullableanonymouschoice.h:90
bool isUndefinedValue() const
Definition s_baltst_mysequencewithnullableanonymouschoice.h:580
static const char CLASS_NAME[]
Definition s_baltst_mysequencewithnullableanonymouschoice.h:99
static const bdlat_SelectionInfo * lookupSelectionInfo(const char *name, int nameLength)
MySequenceWithNullableAnonymousChoiceChoice(const MySequenceWithNullableAnonymousChoiceChoice &original)
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_mysequencewithnullableanonymouschoice.h:101
int manipulateSelection(MANIPULATOR &manipulator)
Definition s_baltst_mysequencewithnullableanonymouschoice.h:501
MySequenceWithNullableAnonymousChoiceChoice()
Definition s_baltst_mysequencewithnullableanonymouschoice.h:488
@ SELECTION_ID_CHOICE_B
Definition s_baltst_mysequencewithnullableanonymouschoice.h:86
@ SELECTION_ID_CHOICE_A
Definition s_baltst_mysequencewithnullableanonymouschoice.h:85
@ SELECTION_ID_UNDEFINED
Definition s_baltst_mysequencewithnullableanonymouschoice.h:84
bsls::ObjectBuffer< int > d_choiceB
Definition s_baltst_mysequencewithnullableanonymouschoice.h:75
~MySequenceWithNullableAnonymousChoiceChoice()
Destroy this object.
Definition s_baltst_mysequencewithnullableanonymouschoice.h:494
@ SELECTION_INDEX_CHOICE_A
Definition s_baltst_mysequencewithnullableanonymouschoice.h:94
@ SELECTION_INDEX_CHOICE_B
Definition s_baltst_mysequencewithnullableanonymouschoice.h:95
bool isChoiceBValue() const
Definition s_baltst_mysequencewithnullableanonymouschoice.h:574
MySequenceWithNullableAnonymousChoiceChoice & operator=(const MySequenceWithNullableAnonymousChoiceChoice &rhs)
Assign to this object the value of the specified rhs object.
bool isChoiceAValue() const
Definition s_baltst_mysequencewithnullableanonymouschoice.h:568
int makeSelection(int selectionId)
int & makeChoiceA(int value)
int & choiceA()
Definition s_baltst_mysequencewithnullableanonymouschoice.h:517
int selectionId() const
Definition s_baltst_mysequencewithnullableanonymouschoice.h:532
int accessSelection(ACCESSOR &accessor) const
Definition s_baltst_mysequencewithnullableanonymouschoice.h:538
int & makeChoiceB(int value)
Definition s_baltst_mysequencewithnullableanonymouschoice.h:288
int accessAttributes(ACCESSOR &accessor) const
Definition s_baltst_mysequencewithnullableanonymouschoice.h:644
static const char CLASS_NAME[]
Definition s_baltst_mysequencewithnullableanonymouschoice.h:308
bdlb::NullableValue< MySequenceWithNullableAnonymousChoiceChoice > & choice()
Definition s_baltst_mysequencewithnullableanonymouschoice.h:637
@ ATTRIBUTE_INDEX_CHOICE
Definition s_baltst_mysequencewithnullableanonymouschoice.h:304
~MySequenceWithNullableAnonymousChoice()
Destroy this object.
MySequenceWithNullableAnonymousChoice()
int manipulateAttribute(MANIPULATOR &manipulator, int id)
Definition s_baltst_mysequencewithnullableanonymouschoice.h:606
MySequenceWithNullableAnonymousChoice(const MySequenceWithNullableAnonymousChoice &original)
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
int accessAttribute(ACCESSOR &accessor, int id) const
Definition s_baltst_mysequencewithnullableanonymouschoice.h:657
@ ATTRIBUTE_ID_CHOICE
Definition s_baltst_mysequencewithnullableanonymouschoice.h:296
@ NUM_ATTRIBUTES
Definition s_baltst_mysequencewithnullableanonymouschoice.h:300
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_mysequencewithnullableanonymouschoice.h:310
int manipulateAttributes(MANIPULATOR &manipulator)
Definition s_baltst_mysequencewithnullableanonymouschoice.h:593
MySequenceWithNullableAnonymousChoice & operator=(const MySequenceWithNullableAnonymousChoice &rhs)
Assign to this object the value of the specified rhs object.
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
#define BDLAT_DECL_CHOICE_WITH_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:261
#define BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:294
#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
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
ALLOCATOR & lhs
Definition bslstl_string.h:3917
Definition s_baltst_address.h:66
bsl::ostream & operator<<(bsl::ostream &stream, const BasicSchemaAnnotationElement &rhs)
bool operator==(const BasicSchemaAnnotationElement &lhs, const BasicSchemaAnnotationElement &rhs)
bool operator!=(const BasicSchemaAnnotationElement &lhs, const BasicSchemaAnnotationElement &rhs)
Definition bdlat_attributeinfo.h:139
int d_id
Definition bdlat_attributeinfo.h:142
Definition bdlat_selectioninfo.h:138
TYPE & object()
Definition bsls_objectbuffer.h:352