8#ifndef INCLUDED_S_BALTST_MYSEQUENCEWITHCHOICE
9#define INCLUDED_S_BALTST_MYSEQUENCEWITHCHOICE
43#include <bslalg_typetraits.h>
55#include <bsl_iosfwd.h>
56#include <bsl_limits.h>
60namespace s_baltst {
class MySequenceWithChoiceChoice; }
61namespace s_baltst {
class MySequenceWithChoice; }
121#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
122 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
138#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
139 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
172 template<
class MANIPULATOR>
193 bsl::ostream&
print(bsl::ostream& stream,
195 int spacesPerLevel = 4)
const;
205 template<
class ACCESSOR>
304#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
305 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
320#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
321 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
338 template<
class MANIPULATOR>
347 template<
class MANIPULATOR>
356 template<
class MANIPULATOR>
378 bsl::ostream&
print(bsl::ostream& stream,
380 int spacesPerLevel = 4)
const;
388 template<
class ACCESSOR>
396 template<
class ACCESSOR>
405 template<
class ACCESSOR>
408 int nameLength)
const;
455: d_selectionId(SELECTION_ID_UNDEFINED)
466template <
class MANIPULATOR>
469 switch (d_selectionId) {
490 return d_selectionId;
493template <
class ACCESSOR>
496 switch (d_selectionId) {
532template <
class MANIPULATOR>
545template <
class MANIPULATOR>
548 enum { NOT_FOUND = -1 };
559template <
class MANIPULATOR>
561 MANIPULATOR& manipulator,
565 enum { NOT_FOUND = -1 };
569 if (0 == attributeInfo) {
583template <
class ACCESSOR>
596template <
class ACCESSOR>
599 enum { NOT_FOUND = -1 };
610template <
class ACCESSOR>
614 int nameLength)
const
616 enum { NOT_FOUND = -1 };
620 if (0 == attributeInfo) {
645 case Class::SELECTION_ID_CHOICE_A:
662 return !(lhs == rhs);
667 bsl::ostream& stream,
670 return rhs.
print(stream, 0, -1);
687 return !(lhs == rhs);
692 bsl::ostream& stream,
695 return rhs.
print(stream, 0, -1);
Definition s_baltst_mysequencewithchoice.h:68
const char * selectionName() const
Return the symbolic name of the current selection of this object.
int & makeChoiceA(int value)
static const bdlat_SelectionInfo * lookupSelectionInfo(const char *name, int nameLength)
@ NUM_SELECTIONS
Definition s_baltst_mysequencewithchoice.h:86
int manipulateSelection(MANIPULATOR &manipulator)
Definition s_baltst_mysequencewithchoice.h:467
@ SELECTION_INDEX_CHOICE_A
Definition s_baltst_mysequencewithchoice.h:90
int makeSelection(const char *name, int nameLength)
@ SELECTION_ID_UNDEFINED
Definition s_baltst_mysequencewithchoice.h:81
@ SELECTION_ID_CHOICE_A
Definition s_baltst_mysequencewithchoice.h:82
MySequenceWithChoiceChoice & operator=(const MySequenceWithChoiceChoice &rhs)
Assign to this object the value of the specified rhs object.
bool isUndefinedValue() const
Definition s_baltst_mysequencewithchoice.h:520
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_mysequencewithchoice.h:96
~MySequenceWithChoiceChoice()
Destroy this object.
Definition s_baltst_mysequencewithchoice.h:460
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
bsls::ObjectBuffer< int > d_choiceA
Definition s_baltst_mysequencewithchoice.h:72
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
bool isChoiceAValue() const
Definition s_baltst_mysequencewithchoice.h:514
int makeSelection(int selectionId)
MySequenceWithChoiceChoice(const MySequenceWithChoiceChoice &original)
static const char CLASS_NAME[]
Definition s_baltst_mysequencewithchoice.h:94
int accessSelection(ACCESSOR &accessor) const
Definition s_baltst_mysequencewithchoice.h:494
int & choiceA()
Definition s_baltst_mysequencewithchoice.h:480
MySequenceWithChoiceChoice()
Definition s_baltst_mysequencewithchoice.h:454
int selectionId() const
Definition s_baltst_mysequencewithchoice.h:488
Definition s_baltst_mysequencewithchoice.h:256
@ ATTRIBUTE_ID_MODE
Definition s_baltst_mysequencewithchoice.h:264
MySequenceWithChoiceChoice & mode()
Definition s_baltst_mysequencewithchoice.h:577
MySequenceWithChoice(const MySequenceWithChoice &original)
int manipulateAttribute(MANIPULATOR &manipulator, int id)
Definition s_baltst_mysequencewithchoice.h:546
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
int manipulateAttributes(MANIPULATOR &manipulator)
Definition s_baltst_mysequencewithchoice.h:533
MySequenceWithChoice & operator=(const MySequenceWithChoice &rhs)
Assign to this object the value of the specified rhs object.
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_mysequencewithchoice.h:278
static const char CLASS_NAME[]
Definition s_baltst_mysequencewithchoice.h:276
@ ATTRIBUTE_INDEX_MODE
Definition s_baltst_mysequencewithchoice.h:272
~MySequenceWithChoice()
Destroy this object.
int accessAttribute(ACCESSOR &accessor, int id) const
Definition s_baltst_mysequencewithchoice.h:597
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
int accessAttributes(ACCESSOR &accessor) const
Definition s_baltst_mysequencewithchoice.h:584
@ NUM_ATTRIBUTES
Definition s_baltst_mysequencewithchoice.h:268
#define BDLAT_DECL_CHOICE_WITH_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:242
#define BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:275
#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 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