8#ifndef INCLUDED_S_BALTST_MYSEQUENCEWITHANONYMOUSCHOICE
9#define INCLUDED_S_BALTST_MYSEQUENCEWITHANONYMOUSCHOICE
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 MySequenceWithAnonymousChoiceChoice; }
69namespace s_baltst {
class MySequenceWithAnonymousChoice; }
139#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
140 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
165#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
166 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
196#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
197 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
209 template<
class MANIPULATOR>
235 bsl::ostream&
print(bsl::ostream& stream,
237 int spacesPerLevel = 4)
const;
247 template<
class ACCESSOR>
366#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
367 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
392#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
393 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
410 template<
class MANIPULATOR>
419 template<
class MANIPULATOR>
428 template<
class MANIPULATOR>
458 bsl::ostream&
print(bsl::ostream& stream,
460 int spacesPerLevel = 4)
const;
468 template<
class ACCESSOR>
476 template<
class ACCESSOR>
485 template<
class ACCESSOR>
488 int nameLength)
const;
543: d_selectionId(SELECTION_ID_UNDEFINED)
544, d_allocator_p(
bslma::Default::allocator(basicAllocator))
555template <
class MANIPULATOR>
558 switch (d_selectionId) {
589 return d_selectionId;
592template <
class ACCESSOR>
595 switch (d_selectionId) {
647template <
class MANIPULATOR>
670template <
class MANIPULATOR>
673 enum { NOT_FOUND = -1 };
690template <
class MANIPULATOR>
692 MANIPULATOR& manipulator,
696 enum { NOT_FOUND = -1 };
700 if (0 == attributeInfo) {
726template <
class ACCESSOR>
749template <
class ACCESSOR>
752 enum { NOT_FOUND = -1 };
769template <
class ACCESSOR>
773 int nameLength)
const
775 enum { NOT_FOUND = -1 };
779 if (0 == attributeInfo) {
816 case Class::SELECTION_ID_MY_CHOICE1:
818 case Class::SELECTION_ID_MY_CHOICE2:
835 return !(lhs == rhs);
840 bsl::ostream& stream,
843 return rhs.
print(stream, 0, -1);
862 return !(lhs == rhs);
867 bsl::ostream& stream,
870 return rhs.
print(stream, 0, -1);
Definition bdlb_nullablevalue.h:257
Definition bslstl_string.h:1281
Definition bslma_allocator.h:457
Definition s_baltst_mysequencewithanonymouschoice.h:76
bsls::ObjectBuffer< int > d_myChoice1
Definition s_baltst_mysequencewithanonymouschoice.h:80
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
bsl::string & makeMyChoice2()
bsls::ObjectBuffer< bsl::string > d_myChoice2
Definition s_baltst_mysequencewithanonymouschoice.h:81
static const char CLASS_NAME[]
Definition s_baltst_mysequencewithanonymouschoice.h:106
const char * selectionName() const
Return the symbolic name of the current selection of this object.
int makeSelection(int selectionId)
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
bool isMyChoice2Value() const
Definition s_baltst_mysequencewithanonymouschoice.h:629
bsl::string & myChoice2()
Definition s_baltst_mysequencewithanonymouschoice.h:579
MySequenceWithAnonymousChoiceChoice(bslma::Allocator *basicAllocator=0)
Definition s_baltst_mysequencewithanonymouschoice.h:542
bool isMyChoice1Value() const
Definition s_baltst_mysequencewithanonymouschoice.h:623
~MySequenceWithAnonymousChoiceChoice()
Destroy this object.
Definition s_baltst_mysequencewithanonymouschoice.h:549
int selectionId() const
Definition s_baltst_mysequencewithanonymouschoice.h:587
int & myChoice1()
Definition s_baltst_mysequencewithanonymouschoice.h:572
int makeSelection(const char *name, int nameLength)
@ SELECTION_INDEX_MY_CHOICE2
Definition s_baltst_mysequencewithanonymouschoice.h:102
@ SELECTION_INDEX_MY_CHOICE1
Definition s_baltst_mysequencewithanonymouschoice.h:101
@ SELECTION_ID_UNDEFINED
Definition s_baltst_mysequencewithanonymouschoice.h:91
@ SELECTION_ID_MY_CHOICE1
Definition s_baltst_mysequencewithanonymouschoice.h:92
@ SELECTION_ID_MY_CHOICE2
Definition s_baltst_mysequencewithanonymouschoice.h:93
MySequenceWithAnonymousChoiceChoice & operator=(const MySequenceWithAnonymousChoiceChoice &rhs)
Assign to this object the value of the specified rhs object.
bool isUndefinedValue() const
Definition s_baltst_mysequencewithanonymouschoice.h:635
MySequenceWithAnonymousChoiceChoice(const MySequenceWithAnonymousChoiceChoice &original, bslma::Allocator *basicAllocator=0)
@ NUM_SELECTIONS
Definition s_baltst_mysequencewithanonymouschoice.h:97
static const bdlat_SelectionInfo * lookupSelectionInfo(const char *name, int nameLength)
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_mysequencewithanonymouschoice.h:108
bsl::string & makeMyChoice2(const bsl::string &value)
int accessSelection(ACCESSOR &accessor) const
Definition s_baltst_mysequencewithanonymouschoice.h:593
int manipulateSelection(MANIPULATOR &manipulator)
Definition s_baltst_mysequencewithanonymouschoice.h:556
int & makeMyChoice1(int value)
Definition s_baltst_mysequencewithanonymouschoice.h:307
int manipulateAttributes(MANIPULATOR &manipulator)
Definition s_baltst_mysequencewithanonymouschoice.h:648
int accessAttribute(ACCESSOR &accessor, int id) const
Definition s_baltst_mysequencewithanonymouschoice.h:750
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_mysequencewithanonymouschoice.h:335
MySequenceWithAnonymousChoice & operator=(const MySequenceWithAnonymousChoice &rhs)
Assign to this object the value of the specified rhs object.
MySequenceWithAnonymousChoice(const MySequenceWithAnonymousChoice &original, bslma::Allocator *basicAllocator=0)
int manipulateAttribute(MANIPULATOR &manipulator, int id)
Definition s_baltst_mysequencewithanonymouschoice.h:671
@ ATTRIBUTE_ID_ATTRIBUTE1
Definition s_baltst_mysequencewithanonymouschoice.h:317
@ ATTRIBUTE_ID_CHOICE
Definition s_baltst_mysequencewithanonymouschoice.h:318
@ ATTRIBUTE_ID_ATTRIBUTE2
Definition s_baltst_mysequencewithanonymouschoice.h:319
int accessAttributes(ACCESSOR &accessor) const
Definition s_baltst_mysequencewithanonymouschoice.h:727
static const char CLASS_NAME[]
Definition s_baltst_mysequencewithanonymouschoice.h:333
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
~MySequenceWithAnonymousChoice()
Destroy this object.
MySequenceWithAnonymousChoiceChoice & choice()
Definition s_baltst_mysequencewithanonymouschoice.h:714
@ ATTRIBUTE_INDEX_ATTRIBUTE2
Definition s_baltst_mysequencewithanonymouschoice.h:329
@ ATTRIBUTE_INDEX_ATTRIBUTE1
Definition s_baltst_mysequencewithanonymouschoice.h:327
@ ATTRIBUTE_INDEX_CHOICE
Definition s_baltst_mysequencewithanonymouschoice.h:328
@ NUM_ATTRIBUTES
Definition s_baltst_mysequencewithanonymouschoice.h:323
MySequenceWithAnonymousChoice(bslma::Allocator *basicAllocator=0)
bdlb::NullableValue< int > & attribute1()
Definition s_baltst_mysequencewithanonymouschoice.h:708
bdlb::NullableValue< bsl::string > & attribute2()
Definition s_baltst_mysequencewithanonymouschoice.h:720
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
#define BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:249
#define BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:282
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT_RCSID(tag, str)
Definition bsls_ident.h:260
#define BSLS_IDENT_PRAGMA_ONCE
Definition bsls_ident.h:310
Definition balxml_encoderoptions.h:68
Definition s_baltst_address.h:66
bool operator!=(const Address &lhs, const Address &rhs)
bool operator==(const Address &lhs, const Address &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, const Address &rhs)
Definition bdlat_attributeinfo.h:137
int d_id
Definition bdlat_attributeinfo.h:140
Definition bdlat_selectioninfo.h:136
TYPE & object()
Definition bsls_objectbuffer.h:351