8#ifndef INCLUDED_S_BALTST_MYSEQUENCEWITHCHOICEARRAY
9#define INCLUDED_S_BALTST_MYSEQUENCEWITHCHOICEARRAY
43#include <bslalg_typetraits.h>
57#include <bsl_vector.h>
59#include <bsl_iosfwd.h>
60#include <bsl_limits.h>
64namespace bslma {
class Allocator; }
66namespace s_baltst {
class MySequenceWithChoiceArrayChoice; }
67namespace s_baltst {
class MySequenceWithChoiceArray; }
130#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
131 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
147#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
148 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
187 template<
class MANIPULATOR>
213 bsl::ostream&
print(bsl::ostream& stream,
215 int spacesPerLevel = 4)
const;
225 template<
class ACCESSOR>
338#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
339 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
364#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
365 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
382 template<
class MANIPULATOR>
391 template<
class MANIPULATOR>
400 template<
class MANIPULATOR>
422 bsl::ostream&
print(bsl::ostream& stream,
424 int spacesPerLevel = 4)
const;
432 template<
class ACCESSOR>
440 template<
class ACCESSOR>
449 template<
class ACCESSOR>
452 int nameLength)
const;
499: d_selectionId(SELECTION_ID_UNDEFINED)
510template <
class MANIPULATOR>
513 switch (d_selectionId) {
544 return d_selectionId;
547template <
class ACCESSOR>
550 switch (d_selectionId) {
602template <
class MANIPULATOR>
615template <
class MANIPULATOR>
618 enum { NOT_FOUND = -1 };
629template <
class MANIPULATOR>
631 MANIPULATOR& manipulator,
635 enum { NOT_FOUND = -1 };
639 if (0 == attributeInfo) {
653template <
class ACCESSOR>
666template <
class ACCESSOR>
669 enum { NOT_FOUND = -1 };
680template <
class ACCESSOR>
684 int nameLength)
const
686 enum { NOT_FOUND = -1 };
690 if (0 == attributeInfo) {
715 case Class::SELECTION_ID_CHOICE_A:
717 case Class::SELECTION_ID_CHOICE_B:
734 return !(lhs == rhs);
739 bsl::ostream& stream,
742 return rhs.
print(stream, 0, -1);
759 return !(lhs == rhs);
764 bsl::ostream& stream,
767 return rhs.
print(stream, 0, -1);
Definition bslstl_vector.h:1025
Definition bslma_allocator.h:457
Definition s_baltst_mysequencewithchoicearray.h:74
const char * selectionName() const
Return the symbolic name of the current selection of this object.
bsls::ObjectBuffer< int > d_choiceB
Definition s_baltst_mysequencewithchoicearray.h:79
int accessSelection(ACCESSOR &accessor) const
Definition s_baltst_mysequencewithchoicearray.h:548
int & choiceA()
Definition s_baltst_mysequencewithchoicearray.h:527
int makeSelection(const char *name, int nameLength)
int makeSelection(int selectionId)
int & makeChoiceA(int value)
MySequenceWithChoiceArrayChoice()
Definition s_baltst_mysequencewithchoicearray.h:498
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
int & makeChoiceB(int value)
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_mysequencewithchoicearray.h:105
@ SELECTION_ID_CHOICE_B
Definition s_baltst_mysequencewithchoicearray.h:90
@ SELECTION_ID_UNDEFINED
Definition s_baltst_mysequencewithchoicearray.h:88
@ SELECTION_ID_CHOICE_A
Definition s_baltst_mysequencewithchoicearray.h:89
MySequenceWithChoiceArrayChoice & operator=(const MySequenceWithChoiceArrayChoice &rhs)
Assign to this object the value of the specified rhs object.
~MySequenceWithChoiceArrayChoice()
Destroy this object.
Definition s_baltst_mysequencewithchoicearray.h:504
int manipulateSelection(MANIPULATOR &manipulator)
Definition s_baltst_mysequencewithchoicearray.h:511
bsls::ObjectBuffer< int > d_choiceA
Definition s_baltst_mysequencewithchoicearray.h:78
MySequenceWithChoiceArrayChoice(const MySequenceWithChoiceArrayChoice &original)
static const bdlat_SelectionInfo * lookupSelectionInfo(const char *name, int nameLength)
int & choiceB()
Definition s_baltst_mysequencewithchoicearray.h:534
bool isUndefinedValue() const
Definition s_baltst_mysequencewithchoicearray.h:590
static const char CLASS_NAME[]
Definition s_baltst_mysequencewithchoicearray.h:103
bool isChoiceAValue() const
Definition s_baltst_mysequencewithchoicearray.h:578
@ NUM_SELECTIONS
Definition s_baltst_mysequencewithchoicearray.h:94
@ SELECTION_INDEX_CHOICE_B
Definition s_baltst_mysequencewithchoicearray.h:99
@ SELECTION_INDEX_CHOICE_A
Definition s_baltst_mysequencewithchoicearray.h:98
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
bool isChoiceBValue() const
Definition s_baltst_mysequencewithchoicearray.h:584
int selectionId() const
Definition s_baltst_mysequencewithchoicearray.h:542
Definition s_baltst_mysequencewithchoicearray.h:285
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
int manipulateAttributes(MANIPULATOR &manipulator)
Definition s_baltst_mysequencewithchoicearray.h:603
MySequenceWithChoiceArray(const MySequenceWithChoiceArray &original, bslma::Allocator *basicAllocator=0)
@ ATTRIBUTE_ID_CHOICES
Definition s_baltst_mysequencewithchoicearray.h:293
~MySequenceWithChoiceArray()
Destroy this object.
static const char CLASS_NAME[]
Definition s_baltst_mysequencewithchoicearray.h:305
int accessAttribute(ACCESSOR &accessor, int id) const
Definition s_baltst_mysequencewithchoicearray.h:667
int manipulateAttribute(MANIPULATOR &manipulator, int id)
Definition s_baltst_mysequencewithchoicearray.h:616
MySequenceWithChoiceArray & operator=(const MySequenceWithChoiceArray &rhs)
Assign to this object the value of the specified rhs object.
bsl::vector< MySequenceWithChoiceArrayChoice > & choices()
Definition s_baltst_mysequencewithchoicearray.h:647
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
MySequenceWithChoiceArray(bslma::Allocator *basicAllocator=0)
int accessAttributes(ACCESSOR &accessor) const
Definition s_baltst_mysequencewithchoicearray.h:654
@ NUM_ATTRIBUTES
Definition s_baltst_mysequencewithchoicearray.h:297
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_mysequencewithchoicearray.h:307
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
@ ATTRIBUTE_INDEX_CHOICES
Definition s_baltst_mysequencewithchoicearray.h:301
#define BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:282
#define BDLAT_DECL_CHOICE_WITH_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:242
#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