BDE 4.39.x Production Release
Loading...
Searching...
No Matches
s_baltst_mysequencewithchoicearray.h
Go to the documentation of this file.
1/// @file s_baltst_mysequencewithchoicearray.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// s_baltst_mysequencewithchoicearray.h *DO NOT EDIT* @generated -*-C++-*-
8#ifndef INCLUDED_S_BALTST_MYSEQUENCEWITHCHOICEARRAY
9#define INCLUDED_S_BALTST_MYSEQUENCEWITHCHOICEARRAY
10
11#include <bsls_ident.h>
12BSLS_IDENT_RCSID(s_baltst_mysequencewithchoicearray_h, "$Id$ $CSID$")
14
15/// @defgroup s_baltst_mysequencewithchoicearray s_baltst_mysequencewithchoicearray
16/// @brief Provide value-semantic attribute classes
17/// @addtogroup Standalones
18/// @{
19/// @addtogroup s_baltst
20/// @{
21/// @addtogroup s_baltst_mysequencewithchoicearray
22/// @{
23///
24/// <h1> Outline </h1>
25/// * <a href="#s_baltst_mysequencewithchoicearray-purpose"> Purpose</a>
26///
27/// # Purpose {#s_baltst_mysequencewithchoicearray-purpose}
28/// Provide value-semantic attribute classes
29/// @}
30/** @} */
31/** @} */
32
33/** @addtogroup Standalones
34 * @{
35 */
36/** @addtogroup s_baltst
37 * @{
38 */
39/** @addtogroup s_baltst_mysequencewithchoicearray
40 * @{
41 */
42
43#include <bslalg_typetraits.h>
44
45#include <bdlat_attributeinfo.h>
46
47#include <bdlat_selectioninfo.h>
48
49#include <bdlat_typetraits.h>
50
51#include <bsls_objectbuffer.h>
52
53#include <bslma_default.h>
54
55#include <bsls_assert.h>
56
57#include <bsl_vector.h>
58
59#include <bsl_iosfwd.h>
60#include <bsl_limits.h>
61
62
63
64namespace bslma { class Allocator; }
65
66namespace s_baltst { class MySequenceWithChoiceArrayChoice; }
67namespace s_baltst { class MySequenceWithChoiceArray; }
68namespace s_baltst {
69
70 // =====================================
71 // class MySequenceWithChoiceArrayChoice
72 // =====================================
73
75
76 // INSTANCE DATA
77 union {
80 };
81
82 int d_selectionId;
83
84 // PRIVATE ACCESSORS
85 bool isEqualTo(const MySequenceWithChoiceArrayChoice& rhs) const;
86
87 public:
88 // TYPES
89
90 enum {
94 };
95
96 enum {
98 };
99
100 enum {
103 };
104
105 // CONSTANTS
106 static const char CLASS_NAME[];
107
109
110 // CLASS METHODS
111
112 /// Return selection information for the selection indicated by the
113 /// specified `id` if the selection exists, and 0 otherwise.
115
116 /// Return selection information for the selection indicated by the
117 /// specified `name` of the specified `nameLength` if the selection
118 /// exists, and 0 otherwise.
120 const char *name,
121 int nameLength);
122
123 // CREATORS
124
125 /// Create an object of type `MySequenceWithChoiceArrayChoice` having
126 /// the default value.
128
129 /// Create an object of type `MySequenceWithChoiceArrayChoice` having
130 /// the value of the specified `original` object.
132
133#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
134 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
135 /// Create an object of type `MySequenceWithChoiceArrayChoice` having
136 /// the value of the specified `original` object. After performing this
137 /// action, the `original` object will be left in a valid, but
138 /// unspecified state.
140#endif
141
142 /// Destroy this object.
144
145 // MANIPULATORS
146
147 /// Assign to this object the value of the specified `rhs` object.
149
150#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
151 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
152 /// Assign to this object the value of the specified `rhs` object.
153 /// After performing this action, the `rhs` object will be left in a
154 /// valid, but unspecified state.
156#endif
157
158 /// Reset this object to the default value (i.e., its value upon default
159 /// construction).
160 void reset();
161
162 /// Set the value of this object to be the default for the selection
163 /// indicated by the specified `selectionId`. Return 0 on success, and
164 /// non-zero value otherwise (i.e., the selection is not found).
166
167 /// Set the value of this object to be the default for the selection
168 /// indicated by the specified `name` of the specified `nameLength`.
169 /// Return 0 on success, and non-zero value otherwise (i.e., the
170 /// selection is not found).
171 int makeSelection(const char *name, int nameLength);
172
173 /// Set the value of this object to be a "ChoiceA" value. Optionally
174 /// specify the `value` of the "ChoiceA". If `value` is not specified,
175 /// the default "ChoiceA" value is used.
177 int& makeChoiceA(int value);
178
179 /// Set the value of this object to be a "ChoiceB" value. Optionally
180 /// specify the `value` of the "ChoiceB". If `value` is not specified,
181 /// the default "ChoiceB" value is used.
183 int& makeChoiceB(int value);
184
185 /// Invoke the specified `manipulator` on the address of the modifiable
186 /// selection, supplying `manipulator` with the corresponding selection
187 /// information structure. Return the value returned from the
188 /// invocation of `manipulator` if this object has a defined selection,
189 /// and -1 otherwise.
190 template <typename t_MANIPULATOR>
191 int manipulateSelection(t_MANIPULATOR& manipulator);
192
193 /// Return a reference to the modifiable "ChoiceA" selection of this
194 /// object if "ChoiceA" is the current selection.
195 ///
196 /// \pre The behavior is undefined unless "ChoiceA" is the selection of this object.
197 int& choiceA();
198
199 /// Return a reference to the modifiable "ChoiceB" selection of this
200 /// object if "ChoiceB" is the current selection.
201 ///
202 /// \pre The behavior is undefined unless "ChoiceB" is the selection of this object.
203 int& choiceB();
204
205 // ACCESSORS
206
207 /// Format this object to the specified output `stream` at the
208 /// optionally specified indentation `level` and return a reference to
209 /// the modifiable `stream`. If `level` is specified, optionally
210 /// specify `spacesPerLevel`, the number of spaces per indentation level
211 /// for this and all of its nested objects. Each line is indented by
212 /// the absolute value of `level * spacesPerLevel`. If `level` is
213 /// negative, suppress indentation of the first line. If
214 /// `spacesPerLevel` is negative, suppress line breaks and format the
215 /// entire output on one line. If `stream` is initially invalid, this operation has no effect.
216 ///
217 /// \note Note that a trailing newline is provided
218 /// in multiline mode only.
219 bsl::ostream& print(bsl::ostream& stream,
220 int level = 0,
221 int spacesPerLevel = 4) const;
222
223 /// Return the id of the current selection if the selection is defined,
224 /// and -1 otherwise.
225 int selectionId() const;
226
227 /// Invoke the specified `accessor` on the non-modifiable selection,
228 /// supplying `accessor` with the corresponding selection information
229 /// structure. Return the value returned from the invocation of
230 /// `accessor` if this object has a defined selection, and -1 otherwise.
231 template <typename t_ACCESSOR>
232 int accessSelection(t_ACCESSOR& accessor) const;
233
234 /// Return a reference to the non-modifiable "ChoiceA" selection of this
235 /// object if "ChoiceA" is the current selection.
236 ///
237 /// \pre The behavior is undefined unless "ChoiceA" is the selection of this object.
238 const int& choiceA() const;
239
240 /// Return a reference to the non-modifiable "ChoiceB" selection of this
241 /// object if "ChoiceB" is the current selection.
242 ///
243 /// \pre The behavior is undefined unless "ChoiceB" is the selection of this object.
244 const int& choiceB() const;
245
246 /// Return `true` if the value of this object is a "ChoiceA" value, and
247 /// return `false` otherwise.
248 bool isChoiceAValue() const;
249
250 /// Return `true` if the value of this object is a "ChoiceB" value, and
251 /// return `false` otherwise.
252 bool isChoiceBValue() const;
253
254 /// Return `true` if the value of this object is undefined, and `false`
255 /// otherwise.
256 bool isUndefinedValue() const;
257
258 /// Return the symbolic name of the current selection of this object.
259 const char *selectionName() const;
260
261 // HIDDEN FRIENDS
262
263 /// Return `true` if the specified `lhs` and `rhs` objects have the same
264 /// value, and `false` otherwise. Two `MySequenceWithChoiceArrayChoice`
265 /// objects have the same value if either the selections in both objects
266 /// have the same ids and the same values, or both selections are
267 /// undefined.
270 {
271 return lhs.isEqualTo(rhs);
272 }
273
274 /// Return `true` if the specified `lhs` and `rhs` objects do not have
275 /// the same values, as determined by `operator==`, and `false`
276 /// otherwise.
279 {
280 return !(lhs == rhs);
281 }
282
283 /// Format the specified `rhs` to the specified output `stream` and
284 /// return a reference to the modifiable `stream`.
285 friend bsl::ostream& operator<<(
286 bsl::ostream& stream,
288 {
289 return rhs.print(stream, 0, -1);
290 }
291};
292
293} // close package namespace
294
295// TRAITS
296
298
299namespace s_baltst {
300
301 // ===============================
302 // class MySequenceWithChoiceArray
303 // ===============================
304
306
307 // INSTANCE DATA
309
310 public:
311 // TYPES
312 enum {
314 };
315
316 enum {
318 };
319
320 enum {
322 };
323
324 // CONSTANTS
325 static const char CLASS_NAME[];
326
328
329 public:
330 // CLASS METHODS
331
332 /// Return attribute information for the attribute indicated by the
333 /// specified `id` if the attribute exists, and 0 otherwise.
335
336 /// Return attribute information for the attribute indicated by the
337 /// specified `name` of the specified `nameLength` if the attribute
338 /// exists, and 0 otherwise.
340 const char *name,
341 int nameLength);
342
343 // CREATORS
344
345 /// Create an object of type `MySequenceWithChoiceArray` having the
346 /// default value. Use the optionally specified `basicAllocator` to
347 /// supply memory. If `basicAllocator` is 0, the currently installed
348 /// default allocator is used.
349 explicit MySequenceWithChoiceArray(bslma::Allocator *basicAllocator = 0);
350
351 /// Create an object of type `MySequenceWithChoiceArray` having the
352 /// value of the specified `original` object. Use the optionally
353 /// specified `basicAllocator` to supply memory. If `basicAllocator` is
354 /// 0, the currently installed default allocator is used.
356 bslma::Allocator *basicAllocator = 0);
357
358#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
359 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
360 /// Create an object of type `MySequenceWithChoiceArray` having the
361 /// value of the specified `original` object. After performing this
362 /// action, the `original` object will be left in a valid, but
363 /// unspecified state.
365
366 /// Create an object of type `MySequenceWithChoiceArray` having the
367 /// value of the specified `original` object. After performing this
368 /// action, the `original` object will be left in a valid, but
369 /// unspecified state. Use the optionally specified `basicAllocator` to
370 /// supply memory. If `basicAllocator` is 0, the currently installed
371 /// default allocator is used.
373 bslma::Allocator *basicAllocator);
374#endif
375
376 /// Destroy this object.
378
379 // MANIPULATORS
380
381 /// Assign to this object the value of the specified `rhs` object.
383
384#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
385 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
386 /// Assign to this object the value of the specified `rhs` object.
387 /// After performing this action, the `rhs` object will be left in a
388 /// valid, but unspecified state.
390#endif
391
392 /// Reset this object to the default value (i.e., its value upon
393 /// default construction).
394 void reset();
395
396 /// Invoke the specified `manipulator` sequentially on the address of
397 /// each (modifiable) attribute of this object, supplying `manipulator`
398 /// with the corresponding attribute information structure until such
399 /// invocation returns a non-zero value. Return the value from the
400 /// last invocation of `manipulator` (i.e., the invocation that
401 /// terminated the sequence).
402 template <typename t_MANIPULATOR>
403 int manipulateAttributes(t_MANIPULATOR& manipulator);
404
405 /// Invoke the specified `manipulator` on the address of
406 /// the (modifiable) attribute indicated by the specified `id`,
407 /// supplying `manipulator` with the corresponding attribute
408 /// information structure. Return the value returned from the
409 /// invocation of `manipulator` if `id` identifies an attribute of this
410 /// class, and -1 otherwise.
411 template <typename t_MANIPULATOR>
412 int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
413
414 /// Invoke the specified `manipulator` on the address of
415 /// the (modifiable) attribute indicated by the specified `name` of the
416 /// specified `nameLength`, supplying `manipulator` with the
417 /// corresponding attribute information structure. Return the value
418 /// returned from the invocation of `manipulator` if `name` identifies
419 /// an attribute of this class, and -1 otherwise.
420 template <typename t_MANIPULATOR>
421 int manipulateAttribute(t_MANIPULATOR& manipulator,
422 const char *name,
423 int nameLength);
424
425 /// Return a reference to the modifiable "Choices" attribute of this
426 /// object.
428
429 // ACCESSORS
430
431 /// Format this object to the specified output `stream` at the
432 /// optionally specified indentation `level` and return a reference to
433 /// the modifiable `stream`. If `level` is specified, optionally
434 /// specify `spacesPerLevel`, the number of spaces per indentation level
435 /// for this and all of its nested objects. Each line is indented by
436 /// the absolute value of `level * spacesPerLevel`. If `level` is
437 /// negative, suppress indentation of the first line. If
438 /// `spacesPerLevel` is negative, suppress line breaks and format the
439 /// entire output on one line. If `stream` is initially invalid, this operation has no effect.
440 ///
441 /// \note Note that a trailing newline is provided
442 /// in multiline mode only.
443 bsl::ostream& print(bsl::ostream& stream,
444 int level = 0,
445 int spacesPerLevel = 4) const;
446
447 /// Invoke the specified `accessor` sequentially on each
448 /// (non-modifiable) attribute of this object, supplying `accessor`
449 /// with the corresponding attribute information structure until such
450 /// invocation returns a non-zero value. Return the value from the
451 /// last invocation of `accessor` (i.e., the invocation that terminated
452 /// the sequence).
453 template <typename t_ACCESSOR>
454 int accessAttributes(t_ACCESSOR& accessor) const;
455
456 /// Invoke the specified `accessor` on the (non-modifiable) attribute
457 /// of this object indicated by the specified `id`, supplying `accessor`
458 /// with the corresponding attribute information structure. Return the
459 /// value returned from the invocation of `accessor` if `id` identifies
460 /// an attribute of this class, and -1 otherwise.
461 template <typename t_ACCESSOR>
462 int accessAttribute(t_ACCESSOR& accessor, int id) const;
463
464 /// Invoke the specified `accessor` on the (non-modifiable) attribute
465 /// of this object indicated by the specified `name` of the specified
466 /// `nameLength`, supplying `accessor` with the corresponding attribute
467 /// information structure. Return the value returned from the
468 /// invocation of `accessor` if `name` identifies an attribute of this
469 /// class, and -1 otherwise.
470 template <typename t_ACCESSOR>
471 int accessAttribute(t_ACCESSOR& accessor,
472 const char *name,
473 int nameLength) const;
474
475 /// Return a reference offering non-modifiable access to the "Choices"
476 /// attribute of this object.
478
479 // HIDDEN FRIENDS
480
481 /// Return `true` if the specified `lhs` and `rhs` attribute objects
482 /// have the same value, and `false` otherwise. Two attribute objects
483 /// have the same value if each respective attribute has the same value.
484 friend bool operator==(const MySequenceWithChoiceArray& lhs,
485 const MySequenceWithChoiceArray& rhs)
486 {
487 return lhs.choices() == rhs.choices();
488 }
489
490 /// Returns `!(lhs == rhs)`
491 friend bool operator!=(const MySequenceWithChoiceArray& lhs,
492 const MySequenceWithChoiceArray& rhs)
493 {
494 return !(lhs == rhs);
495 }
496
497 /// Format the specified `rhs` to the specified output `stream` and
498 /// return a reference to the modifiable `stream`.
499 friend bsl::ostream& operator<<(bsl::ostream& stream,
500 const MySequenceWithChoiceArray& rhs)
501 {
502 return rhs.print(stream, 0, -1);
503 }
504};
505
506} // close package namespace
507
508// TRAITS
509
511template <>
512struct bdlat_UsesDefaultValueFlag<s_baltst::MySequenceWithChoiceArray> : bsl::true_type {};
513
514// ============================================================================
515// INLINE DEFINITIONS
516// ============================================================================
517
518namespace s_baltst {
519
520 // -------------------------------------
521 // class MySequenceWithChoiceArrayChoice
522 // -------------------------------------
523
524// CLASS METHODS
525// PRIVATE ACCESSORS
526inline
527bool MySequenceWithChoiceArrayChoice::isEqualTo(const MySequenceWithChoiceArrayChoice& rhs) const
528{
530 if (this->selectionId() == rhs.selectionId()) {
531 switch (rhs.selectionId()) {
532 case Class::SELECTION_ID_CHOICE_A:
533 return this->choiceA() == rhs.choiceA();
534 case Class::SELECTION_ID_CHOICE_B:
535 return this->choiceB() == rhs.choiceB();
536 default:
537 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId());
538 return true;
539 }
540 }
541 else {
542 return false;
543 }
544}
545
546// CREATORS
547inline
549: d_selectionId(SELECTION_ID_UNDEFINED)
550{
551}
552
553inline
558
559// MANIPULATORS
560template <typename t_MANIPULATOR>
575
576inline
582
583inline
589
590// ACCESSORS
591inline
593{
594 return d_selectionId;
595}
596
597template <typename t_ACCESSOR>
599{
600 switch (d_selectionId) {
602 return accessor(d_choiceA.object(),
605 return accessor(d_choiceB.object(),
607 default:
608 BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
609 return -1;
610 }
611}
612
613inline
615{
616 BSLS_ASSERT(SELECTION_ID_CHOICE_A == d_selectionId);
617 return d_choiceA.object();
618}
619
620inline
622{
623 BSLS_ASSERT(SELECTION_ID_CHOICE_B == d_selectionId);
624 return d_choiceB.object();
625}
626
627inline
629{
630 return SELECTION_ID_CHOICE_A == d_selectionId;
631}
632
633inline
635{
636 return SELECTION_ID_CHOICE_B == d_selectionId;
637}
638
639inline
641{
642 return SELECTION_ID_UNDEFINED == d_selectionId;
643}
644
645
646 // -------------------------------
647 // class MySequenceWithChoiceArray
648 // -------------------------------
649
650// CLASS METHODS
651// MANIPULATORS
652template <typename t_MANIPULATOR>
654{
655 int ret;
656
657 ret = manipulator(&d_choices, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICES]);
658 if (ret) {
659 return ret;
660 }
661
662 return 0;
663}
664
665template <typename t_MANIPULATOR>
666int MySequenceWithChoiceArray::manipulateAttribute(t_MANIPULATOR& manipulator, int id)
667{
668 enum { NOT_FOUND = -1 };
669
670 switch (id) {
672 return manipulator(&d_choices, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICES]);
673 }
674 default:
675 return NOT_FOUND;
676 }
677}
678
679template <typename t_MANIPULATOR>
681 t_MANIPULATOR& manipulator,
682 const char *name,
683 int nameLength)
684{
685 enum { NOT_FOUND = -1 };
686
687 const bdlat_AttributeInfo *attributeInfo =
688 lookupAttributeInfo(name, nameLength);
689 if (0 == attributeInfo) {
690 return NOT_FOUND;
691 }
692
693 return manipulateAttribute(manipulator, attributeInfo->d_id);
694}
695
696inline
701
702// ACCESSORS
703template <typename t_ACCESSOR>
704int MySequenceWithChoiceArray::accessAttributes(t_ACCESSOR& accessor) const
705{
706 int ret;
707
708 ret = accessor(d_choices, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICES]);
709 if (ret) {
710 return ret;
711 }
712
713 return 0;
714}
715
716template <typename t_ACCESSOR>
717int MySequenceWithChoiceArray::accessAttribute(t_ACCESSOR& accessor, int id) const
718{
719 enum { NOT_FOUND = -1 };
720
721 switch (id) {
723 return accessor(d_choices, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICES]);
724 }
725 default:
726 return NOT_FOUND;
727 }
728}
729
730template <typename t_ACCESSOR>
732 t_ACCESSOR& accessor,
733 const char *name,
734 int nameLength) const
735{
736 enum { NOT_FOUND = -1 };
737
738 const bdlat_AttributeInfo *attributeInfo =
739 lookupAttributeInfo(name, nameLength);
740 if (0 == attributeInfo) {
741 return NOT_FOUND;
742 }
743
744 return accessAttribute(accessor, attributeInfo->d_id);
745}
746
747inline
752
753} // close package namespace
754
755// FREE FUNCTIONS
756
757
758#endif
759
760// GENERATED BY BLP_BAS_CODEGEN_2025.08.21
761// USING bas_codegen.pl s_baltst_mysequencewithchoicearray.xsd --mode msg --includedir . --msgComponent mysequencewithchoicearray --noRecurse --noExternalization --noHashSupport --noAggregateConversion
762// ----------------------------------------------------------------------------
763// NOTICE:
764// Copyright 2025 Bloomberg Finance L.P. All rights reserved.
765// Property of Bloomberg Finance L.P. (BFLP)
766// This software is made available solely pursuant to the
767// terms of a BFLP license agreement which governs its use.
768// ------------------------------- END-OF-FILE --------------------------------
769
770/** @} */
771/** @} */
772/** @} */
Definition bslstl_vector.h:1120
Definition bslma_allocator.h:545
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
friend bool operator==(const MySequenceWithChoiceArrayChoice &lhs, const MySequenceWithChoiceArrayChoice &rhs)
Definition s_baltst_mysequencewithchoicearray.h:268
@ NUM_SELECTIONS
Definition s_baltst_mysequencewithchoicearray.h:97
int & choiceA()
Definition s_baltst_mysequencewithchoicearray.h:577
friend bsl::ostream & operator<<(bsl::ostream &stream, const MySequenceWithChoiceArrayChoice &rhs)
Definition s_baltst_mysequencewithchoicearray.h:285
int makeSelection(const char *name, int nameLength)
friend bool operator!=(const MySequenceWithChoiceArrayChoice &lhs, const MySequenceWithChoiceArrayChoice &rhs)
Definition s_baltst_mysequencewithchoicearray.h:277
@ SELECTION_INDEX_CHOICE_B
Definition s_baltst_mysequencewithchoicearray.h:102
@ SELECTION_INDEX_CHOICE_A
Definition s_baltst_mysequencewithchoicearray.h:101
MySequenceWithChoiceArrayChoice()
Definition s_baltst_mysequencewithchoicearray.h:548
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_mysequencewithchoicearray.h:108
MySequenceWithChoiceArrayChoice & operator=(const MySequenceWithChoiceArrayChoice &rhs)
Assign to this object the value of the specified rhs object.
int accessSelection(t_ACCESSOR &accessor) const
Definition s_baltst_mysequencewithchoicearray.h:598
~MySequenceWithChoiceArrayChoice()
Destroy this object.
Definition s_baltst_mysequencewithchoicearray.h:554
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 manipulateSelection(t_MANIPULATOR &manipulator)
Definition s_baltst_mysequencewithchoicearray.h:561
int & choiceB()
Definition s_baltst_mysequencewithchoicearray.h:584
@ SELECTION_ID_CHOICE_B
Definition s_baltst_mysequencewithchoicearray.h:93
@ SELECTION_ID_UNDEFINED
Definition s_baltst_mysequencewithchoicearray.h:91
@ SELECTION_ID_CHOICE_A
Definition s_baltst_mysequencewithchoicearray.h:92
bool isUndefinedValue() const
Definition s_baltst_mysequencewithchoicearray.h:640
static const char CLASS_NAME[]
Definition s_baltst_mysequencewithchoicearray.h:106
bool isChoiceAValue() const
Definition s_baltst_mysequencewithchoicearray.h:628
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
bool isChoiceBValue() const
Definition s_baltst_mysequencewithchoicearray.h:634
int selectionId() const
Definition s_baltst_mysequencewithchoicearray.h:592
Definition s_baltst_mysequencewithchoicearray.h:305
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
MySequenceWithChoiceArray(const MySequenceWithChoiceArray &original, bslma::Allocator *basicAllocator=0)
friend bsl::ostream & operator<<(bsl::ostream &stream, const MySequenceWithChoiceArray &rhs)
Definition s_baltst_mysequencewithchoicearray.h:499
~MySequenceWithChoiceArray()
Destroy this object.
@ ATTRIBUTE_ID_CHOICES
Definition s_baltst_mysequencewithchoicearray.h:313
static const char CLASS_NAME[]
Definition s_baltst_mysequencewithchoicearray.h:325
int manipulateAttributes(t_MANIPULATOR &manipulator)
Definition s_baltst_mysequencewithchoicearray.h:653
friend bool operator!=(const MySequenceWithChoiceArray &lhs, const MySequenceWithChoiceArray &rhs)
Returns !(lhs == rhs)
Definition s_baltst_mysequencewithchoicearray.h:491
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:697
friend bool operator==(const MySequenceWithChoiceArray &lhs, const MySequenceWithChoiceArray &rhs)
Definition s_baltst_mysequencewithchoicearray.h:484
@ NUM_ATTRIBUTES
Definition s_baltst_mysequencewithchoicearray.h:317
@ ATTRIBUTE_INDEX_CHOICES
Definition s_baltst_mysequencewithchoicearray.h:321
int manipulateAttribute(t_MANIPULATOR &manipulator, int id)
Definition s_baltst_mysequencewithchoicearray.h:666
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
MySequenceWithChoiceArray(bslma::Allocator *basicAllocator=0)
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_mysequencewithchoicearray.h:327
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
int accessAttributes(t_ACCESSOR &accessor) const
Definition s_baltst_mysequencewithchoicearray.h:704
int accessAttribute(t_ACCESSOR &accessor, int id) const
Definition s_baltst_mysequencewithchoicearray.h:717
#define BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:301
#define BDLAT_DECL_CHOICE_WITH_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:261
#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