BDE 4.14.0 Production release
Loading...
Searching...
No Matches
s_baltst_basicschema.h
Go to the documentation of this file.
1/// @file s_baltst_basicschema.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// s_baltst_basicschema.h *DO NOT EDIT* @generated -*-C++-*-
8#ifndef INCLUDED_S_BALTST_BASICSCHEMA
9#define INCLUDED_S_BALTST_BASICSCHEMA
10
11#include <bsls_ident.h>
12BSLS_IDENT_RCSID(s_baltst_basicschema_h,"$Id$ $CSID$")
14
15/// @defgroup s_baltst_basicschema s_baltst_basicschema
16/// @brief Provide value-semantic attribute classes
17/// @addtogroup Standalones
18/// @{
19/// @addtogroup s_baltst
20/// @{
21/// @addtogroup s_baltst_basicschema
22/// @{
23///
24/// <h1> Outline </h1>
25/// * <a href="#s_baltst_basicschema-purpose"> Purpose</a>
26///
27/// # Purpose {#s_baltst_basicschema-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_basicschema
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 <bslh_hash.h>
52#include <bsls_objectbuffer.h>
53
54#include <bslma_default.h>
55
56#include <bsls_assert.h>
57
58#include <bdlb_nullablevalue.h>
59
60#include <bsl_string.h>
61
62#include <bsl_vector.h>
63
64#include <bsl_iosfwd.h>
65#include <bsl_limits.h>
66
67#include <bslma_allocator.h>
68
69
70
71
72namespace s_baltst { class BasicSchemaAnnotationElement; }
73namespace s_baltst { class BasicSchemaEnumerationElementChoice; }
74namespace s_baltst { class BasicSchemaEnumerationElement; }
75namespace s_baltst { class BasicSchemaRestrictionElementChoice; }
76namespace s_baltst { class BasicSchemaRestrictionElement; }
77namespace s_baltst { class BasicSchemaSimpleTypeElementChoice; }
78namespace s_baltst { class BasicSchemaSimpleTypeElement; }
79namespace s_baltst { class BasicSchemaChoiceElement; }
80namespace s_baltst { class BasicSchemaChoiceElementChoice; }
81namespace s_baltst { class BasicSchemaComplexTypeElement; }
82namespace s_baltst { class BasicSchemaComplexTypeElementChoice; }
83namespace s_baltst { class BasicSchemaElement; }
84namespace s_baltst { class BasicSchemaElementChoice; }
85namespace s_baltst { class BasicSchemaSequenceElement; }
86namespace s_baltst { class BasicSchemaSequenceElementChoice; }
87namespace s_baltst { class BasicSchemaChoice; }
88namespace s_baltst { class BasicSchema; }
89namespace s_baltst {
90
91 // ==================================
92 // class BasicSchemaAnnotationElement
93 // ==================================
94
96
97 // INSTANCE DATA
99
100 public:
101 // TYPES
102 enum {
104 };
105
106 enum {
108 };
109
110 enum {
112 };
113
114 // CONSTANTS
115 static const char CLASS_NAME[];
116
118
119 public:
120 // CLASS METHODS
121
122 /// Return attribute information for the attribute indicated by the
123 /// specified `id` if the attribute exists, and 0 otherwise.
125
126 /// Return attribute information for the attribute indicated by the
127 /// specified `name` of the specified `nameLength` if the attribute
128 /// exists, and 0 otherwise.
130 const char *name,
131 int nameLength);
132
133 // CREATORS
134
135 /// Create an object of type `BasicSchemaAnnotationElement` having the
136 /// default value. Use the optionally specified `basicAllocator` to
137 /// supply memory. If `basicAllocator` is 0, the currently installed
138 /// default allocator is used.
139 explicit BasicSchemaAnnotationElement(bslma::Allocator *basicAllocator = 0);
140
141 /// Create an object of type `BasicSchemaAnnotationElement` having the
142 /// value of the specified `original` object. Use the optionally
143 /// specified `basicAllocator` to supply memory. If `basicAllocator` is
144 /// 0, the currently installed default allocator is used.
146 bslma::Allocator *basicAllocator = 0);
147
148#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
149 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
150 /// Create an object of type `BasicSchemaAnnotationElement` having the
151 /// value of the specified `original` object. After performing this
152 /// action, the `original` object will be left in a valid, but
153 /// unspecified state.
155
156 /// Create an object of type `BasicSchemaAnnotationElement` having the
157 /// value of the specified `original` object. After performing this
158 /// action, the `original` object will be left in a valid, but
159 /// unspecified state. Use the optionally specified `basicAllocator` to
160 /// supply memory. If `basicAllocator` is 0, the currently installed
161 /// default allocator is used.
163 bslma::Allocator *basicAllocator);
164#endif
165
166 /// Destroy this object.
168
169 // MANIPULATORS
170
171 /// Assign to this object the value of the specified `rhs` object.
173
174#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
175 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
176 /// Assign to this object the value of the specified `rhs` object.
177 /// After performing this action, the `rhs` object will be left in a
178 /// valid, but unspecified state.
180#endif
181
182 /// Reset this object to the default value (i.e., its value upon
183 /// default construction).
184 void reset();
185
186 /// Invoke the specified `manipulator` sequentially on the address of
187 /// each (modifiable) attribute of this object, supplying `manipulator`
188 /// with the corresponding attribute information structure until such
189 /// invocation returns a non-zero value. Return the value from the
190 /// last invocation of `manipulator` (i.e., the invocation that
191 /// terminated the sequence).
192 template<class MANIPULATOR>
193 int manipulateAttributes(MANIPULATOR& manipulator);
194
195 /// Invoke the specified `manipulator` on the address of
196 /// the (modifiable) attribute indicated by the specified `id`,
197 /// supplying `manipulator` with the corresponding attribute
198 /// information structure. Return the value returned from the
199 /// invocation of `manipulator` if `id` identifies an attribute of this
200 /// class, and -1 otherwise.
201 template<class MANIPULATOR>
202 int manipulateAttribute(MANIPULATOR& manipulator, int id);
203
204 /// Invoke the specified `manipulator` on the address of
205 /// the (modifiable) attribute indicated by the specified `name` of the
206 /// specified `nameLength`, supplying `manipulator` with the
207 /// corresponding attribute information structure. Return the value
208 /// returned from the invocation of `manipulator` if `name` identifies
209 /// an attribute of this class, and -1 otherwise.
210 template<class MANIPULATOR>
211 int manipulateAttribute(MANIPULATOR& manipulator,
212 const char *name,
213 int nameLength);
214
215 /// Return a reference to the modifiable "Documentation" attribute of
216 /// this object.
218
219 // ACCESSORS
220
221 /// Format this object to the specified output `stream` at the
222 /// optionally specified indentation `level` and return a reference to
223 /// the modifiable `stream`. If `level` is specified, optionally
224 /// specify `spacesPerLevel`, the number of spaces per indentation level
225 /// for this and all of its nested objects. Each line is indented by
226 /// the absolute value of `level * spacesPerLevel`. If `level` is
227 /// negative, suppress indentation of the first line. If
228 /// `spacesPerLevel` is negative, suppress line breaks and format the
229 /// entire output on one line. If `stream` is initially invalid, this
230 /// operation has no effect. Note that a trailing newline is provided
231 /// in multiline mode only.
232 bsl::ostream& print(bsl::ostream& stream,
233 int level = 0,
234 int spacesPerLevel = 4) const;
235
236 /// Invoke the specified `accessor` sequentially on each
237 /// (non-modifiable) attribute of this object, supplying `accessor`
238 /// with the corresponding attribute information structure until such
239 /// invocation returns a non-zero value. Return the value from the
240 /// last invocation of `accessor` (i.e., the invocation that terminated
241 /// the sequence).
242 template<class ACCESSOR>
243 int accessAttributes(ACCESSOR& accessor) const;
244
245 /// Invoke the specified `accessor` on the (non-modifiable) attribute
246 /// of this object indicated by the specified `id`, supplying `accessor`
247 /// with the corresponding attribute information structure. Return the
248 /// value returned from the invocation of `accessor` if `id` identifies
249 /// an attribute of this class, and -1 otherwise.
250 template<class ACCESSOR>
251 int accessAttribute(ACCESSOR& accessor, int id) const;
252
253 /// Invoke the specified `accessor` on the (non-modifiable) attribute
254 /// of this object indicated by the specified `name` of the specified
255 /// `nameLength`, supplying `accessor` with the corresponding attribute
256 /// information structure. Return the value returned from the
257 /// invocation of `accessor` if `name` identifies an attribute of this
258 /// class, and -1 otherwise.
259 template<class ACCESSOR>
260 int accessAttribute(ACCESSOR& accessor,
261 const char *name,
262 int nameLength) const;
263
264 /// Return a reference to the non-modifiable "Documentation" attribute
265 /// of this object.
267};
268
269// FREE OPERATORS
270
271/// Return `true` if the specified `lhs` and `rhs` attribute objects have
272/// the same value, and `false` otherwise. Two attribute objects have the
273/// same value if each respective attribute has the same value.
274inline
275bool operator==(const BasicSchemaAnnotationElement& lhs, const BasicSchemaAnnotationElement& rhs);
276
277/// Return `true` if the specified `lhs` and `rhs` attribute objects do not
278/// have the same value, and `false` otherwise. Two attribute objects do
279/// not have the same value if one or more respective attributes differ in
280/// values.
281inline
282bool operator!=(const BasicSchemaAnnotationElement& lhs, const BasicSchemaAnnotationElement& rhs);
283
284/// Format the specified `rhs` to the specified output `stream` and
285/// return a reference to the modifiable `stream`.
286inline
287bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaAnnotationElement& rhs);
288
289/// Pass the specified `object` to the specified `hashAlg`. This function
290/// integrates with the `bslh` modular hashing system and effectively
291/// provides a `bsl::hash` specialization for `BasicSchemaAnnotationElement`.
292template <typename HASH_ALGORITHM>
293void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaAnnotationElement& object);
294
295} // close package namespace
296
297// TRAITS
298
300
301namespace s_baltst {
302
303 // =========================================
304 // class BasicSchemaEnumerationElementChoice
305 // =========================================
306
308
309 // INSTANCE DATA
310 union {
312 };
313
314 int d_selectionId;
315 bslma::Allocator *d_allocator_p;
316
317 public:
318 // TYPES
319
320 enum {
323 };
324
325 enum {
327 };
328
329 enum {
331 };
332
333 // CONSTANTS
334 static const char CLASS_NAME[];
335
337
338 // CLASS METHODS
339
340 /// Return selection information for the selection indicated by the
341 /// specified `id` if the selection exists, and 0 otherwise.
343
344 /// Return selection information for the selection indicated by the
345 /// specified `name` of the specified `nameLength` if the selection
346 /// exists, and 0 otherwise.
348 const char *name,
349 int nameLength);
350
351 // CREATORS
352
353 /// Create an object of type `BasicSchemaEnumerationElementChoice`
354 /// having the default value. Use the optionally specified
355 /// `basicAllocator` to supply memory. If `basicAllocator` is 0, the
356 /// currently installed default allocator is used.
357 explicit BasicSchemaEnumerationElementChoice(bslma::Allocator *basicAllocator = 0);
358
359 /// Create an object of type `BasicSchemaEnumerationElementChoice`
360 /// having the value of the specified `original` object. Use the
361 /// optionally specified `basicAllocator` to supply memory. If
362 /// `basicAllocator` is 0, the currently installed default allocator is
363 /// used.
365 bslma::Allocator *basicAllocator = 0);
366
367#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
368 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
369 /// Create an object of type `BasicSchemaEnumerationElementChoice`
370 /// having the value of the specified `original` object. After
371 /// performing this action, the `original` object will be left in a
372 /// valid, but unspecified state.
374
375 /// Create an object of type `BasicSchemaEnumerationElementChoice`
376 /// having the value of the specified `original` object. After
377 /// performing this action, the `original` object will be left in a
378 /// valid, but unspecified state. Use the optionally specified
379 /// `basicAllocator` to supply memory. If `basicAllocator` is 0, the
380 /// currently installed default allocator is used.
382 bslma::Allocator *basicAllocator);
383#endif
384
385 /// Destroy this object.
387
388 // MANIPULATORS
389
390 /// Assign to this object the value of the specified `rhs` object.
392
393#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
394 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
395 /// Assign to this object the value of the specified `rhs` object.
396 /// After performing this action, the `rhs` object will be left in a
397 /// valid, but unspecified state.
399#endif
400
401 /// Reset this object to the default value (i.e., its value upon default
402 /// construction).
403 void reset();
404
405 /// Set the value of this object to be the default for the selection
406 /// indicated by the specified `selectionId`. Return 0 on success, and
407 /// non-zero value otherwise (i.e., the selection is not found).
409
410 /// Set the value of this object to be the default for the selection
411 /// indicated by the specified `name` of the specified `nameLength`.
412 /// Return 0 on success, and non-zero value otherwise (i.e., the
413 /// selection is not found).
414 int makeSelection(const char *name, int nameLength);
415
418#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
419 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
421#endif
422 // Set the value of this object to be a "Annotation" value. Optionally
423 // specify the 'value' of the "Annotation". If 'value' is not
424 // specified, the default "Annotation" value is used.
425
426 /// Invoke the specified `manipulator` on the address of the modifiable
427 /// selection, supplying `manipulator` with the corresponding selection
428 /// information structure. Return the value returned from the
429 /// invocation of `manipulator` if this object has a defined selection,
430 /// and -1 otherwise.
431 template<class MANIPULATOR>
432 int manipulateSelection(MANIPULATOR& manipulator);
433
434 /// Return a reference to the modifiable "Annotation" selection of this
435 /// object if "Annotation" is the current selection. The behavior is
436 /// undefined unless "Annotation" is the selection of this object.
438
439 // ACCESSORS
440
441 /// Format this object to the specified output `stream` at the
442 /// optionally specified indentation `level` and return a reference to
443 /// the modifiable `stream`. If `level` is specified, optionally
444 /// specify `spacesPerLevel`, the number of spaces per indentation level
445 /// for this and all of its nested objects. Each line is indented by
446 /// the absolute value of `level * spacesPerLevel`. If `level` is
447 /// negative, suppress indentation of the first line. If
448 /// `spacesPerLevel` is negative, suppress line breaks and format the
449 /// entire output on one line. If `stream` is initially invalid, this
450 /// operation has no effect. Note that a trailing newline is provided
451 /// in multiline mode only.
452 bsl::ostream& print(bsl::ostream& stream,
453 int level = 0,
454 int spacesPerLevel = 4) const;
455
456 /// Return the id of the current selection if the selection is defined,
457 /// and -1 otherwise.
458 int selectionId() const;
459
460 /// Invoke the specified `accessor` on the non-modifiable selection,
461 /// supplying `accessor` with the corresponding selection information
462 /// structure. Return the value returned from the invocation of
463 /// `accessor` if this object has a defined selection, and -1 otherwise.
464 template<class ACCESSOR>
465 int accessSelection(ACCESSOR& accessor) const;
466
467 /// Return a reference to the non-modifiable "Annotation" selection of
468 /// this object if "Annotation" is the current selection. The behavior
469 /// is undefined unless "Annotation" is the selection of this object.
471
472 /// Return `true` if the value of this object is a "Annotation" value,
473 /// and return `false` otherwise.
474 bool isAnnotationValue() const;
475
476 /// Return `true` if the value of this object is undefined, and `false`
477 /// otherwise.
478 bool isUndefinedValue() const;
479
480 /// Return the symbolic name of the current selection of this object.
481 const char *selectionName() const;
482};
483
484// FREE OPERATORS
485
486/// Return `true` if the specified `lhs` and `rhs` objects have the same
487/// value, and `false` otherwise. Two `BasicSchemaEnumerationElementChoice` objects have the same
488/// value if either the selections in both objects have the same ids and
489/// the same values, or both selections are undefined.
490inline
492
493/// Return `true` if the specified `lhs` and `rhs` objects do not have the
494/// same values, as determined by `operator==`, and `false` otherwise.
495inline
497
498/// Format the specified `rhs` to the specified output `stream` and
499/// return a reference to the modifiable `stream`.
500inline
501bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaEnumerationElementChoice& rhs);
502
503/// Pass the specified `object` to the specified `hashAlg`. This function
504/// integrates with the `bslh` modular hashing system and effectively
505/// provides a `bsl::hash` specialization for `BasicSchemaEnumerationElementChoice`.
506template <typename HASH_ALGORITHM>
507void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaEnumerationElementChoice& object);
508
509} // close package namespace
510
511// TRAITS
512
514
515namespace s_baltst {
516
517 // ===================================
518 // class BasicSchemaEnumerationElement
519 // ===================================
520
522
523 // INSTANCE DATA
526
527 public:
528 // TYPES
529 enum {
532 };
533
534 enum {
536 };
537
538 enum {
541 };
542
543 // CONSTANTS
544 static const char CLASS_NAME[];
545
547
548 public:
549 // CLASS METHODS
550
551 /// Return attribute information for the attribute indicated by the
552 /// specified `id` if the attribute exists, and 0 otherwise.
554
555 /// Return attribute information for the attribute indicated by the
556 /// specified `name` of the specified `nameLength` if the attribute
557 /// exists, and 0 otherwise.
559 const char *name,
560 int nameLength);
561
562 // CREATORS
563
564 /// Create an object of type `BasicSchemaEnumerationElement` having the
565 /// default value. Use the optionally specified `basicAllocator` to
566 /// supply memory. If `basicAllocator` is 0, the currently installed
567 /// default allocator is used.
568 explicit BasicSchemaEnumerationElement(bslma::Allocator *basicAllocator = 0);
569
570 /// Create an object of type `BasicSchemaEnumerationElement` having the
571 /// value of the specified `original` object. Use the optionally
572 /// specified `basicAllocator` to supply memory. If `basicAllocator` is
573 /// 0, the currently installed default allocator is used.
575 bslma::Allocator *basicAllocator = 0);
576
577#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
578 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
579 /// Create an object of type `BasicSchemaEnumerationElement` having the
580 /// value of the specified `original` object. After performing this
581 /// action, the `original` object will be left in a valid, but
582 /// unspecified state.
584
585 /// Create an object of type `BasicSchemaEnumerationElement` having the
586 /// value of the specified `original` object. After performing this
587 /// action, the `original` object will be left in a valid, but
588 /// unspecified state. Use the optionally specified `basicAllocator` to
589 /// supply memory. If `basicAllocator` is 0, the currently installed
590 /// default allocator is used.
592 bslma::Allocator *basicAllocator);
593#endif
594
595 /// Destroy this object.
597
598 // MANIPULATORS
599
600 /// Assign to this object the value of the specified `rhs` object.
602
603#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
604 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
605 /// Assign to this object the value of the specified `rhs` object.
606 /// After performing this action, the `rhs` object will be left in a
607 /// valid, but unspecified state.
609#endif
610
611 /// Reset this object to the default value (i.e., its value upon
612 /// default construction).
613 void reset();
614
615 /// Invoke the specified `manipulator` sequentially on the address of
616 /// each (modifiable) attribute of this object, supplying `manipulator`
617 /// with the corresponding attribute information structure until such
618 /// invocation returns a non-zero value. Return the value from the
619 /// last invocation of `manipulator` (i.e., the invocation that
620 /// terminated the sequence).
621 template<class MANIPULATOR>
622 int manipulateAttributes(MANIPULATOR& manipulator);
623
624 /// Invoke the specified `manipulator` on the address of
625 /// the (modifiable) attribute indicated by the specified `id`,
626 /// supplying `manipulator` with the corresponding attribute
627 /// information structure. Return the value returned from the
628 /// invocation of `manipulator` if `id` identifies an attribute of this
629 /// class, and -1 otherwise.
630 template<class MANIPULATOR>
631 int manipulateAttribute(MANIPULATOR& manipulator, int id);
632
633 /// Invoke the specified `manipulator` on the address of
634 /// the (modifiable) attribute indicated by the specified `name` of the
635 /// specified `nameLength`, supplying `manipulator` with the
636 /// corresponding attribute information structure. Return the value
637 /// returned from the invocation of `manipulator` if `name` identifies
638 /// an attribute of this class, and -1 otherwise.
639 template<class MANIPULATOR>
640 int manipulateAttribute(MANIPULATOR& manipulator,
641 const char *name,
642 int nameLength);
643
644 /// Return a reference to the modifiable "Value" attribute of this
645 /// object.
647
648 /// Return a reference to the modifiable "Choice" attribute of this
649 /// object.
651
652 // ACCESSORS
653
654 /// Format this object to the specified output `stream` at the
655 /// optionally specified indentation `level` and return a reference to
656 /// the modifiable `stream`. If `level` is specified, optionally
657 /// specify `spacesPerLevel`, the number of spaces per indentation level
658 /// for this and all of its nested objects. Each line is indented by
659 /// the absolute value of `level * spacesPerLevel`. If `level` is
660 /// negative, suppress indentation of the first line. If
661 /// `spacesPerLevel` is negative, suppress line breaks and format the
662 /// entire output on one line. If `stream` is initially invalid, this
663 /// operation has no effect. Note that a trailing newline is provided
664 /// in multiline mode only.
665 bsl::ostream& print(bsl::ostream& stream,
666 int level = 0,
667 int spacesPerLevel = 4) const;
668
669 /// Invoke the specified `accessor` sequentially on each
670 /// (non-modifiable) attribute of this object, supplying `accessor`
671 /// with the corresponding attribute information structure until such
672 /// invocation returns a non-zero value. Return the value from the
673 /// last invocation of `accessor` (i.e., the invocation that terminated
674 /// the sequence).
675 template<class ACCESSOR>
676 int accessAttributes(ACCESSOR& accessor) const;
677
678 /// Invoke the specified `accessor` on the (non-modifiable) attribute
679 /// of this object indicated by the specified `id`, supplying `accessor`
680 /// with the corresponding attribute information structure. Return the
681 /// value returned from the invocation of `accessor` if `id` identifies
682 /// an attribute of this class, and -1 otherwise.
683 template<class ACCESSOR>
684 int accessAttribute(ACCESSOR& accessor, int id) const;
685
686 /// Invoke the specified `accessor` on the (non-modifiable) attribute
687 /// of this object indicated by the specified `name` of the specified
688 /// `nameLength`, supplying `accessor` with the corresponding attribute
689 /// information structure. Return the value returned from the
690 /// invocation of `accessor` if `name` identifies an attribute of this
691 /// class, and -1 otherwise.
692 template<class ACCESSOR>
693 int accessAttribute(ACCESSOR& accessor,
694 const char *name,
695 int nameLength) const;
696
697 /// Return a reference to the non-modifiable "Value" attribute of this
698 /// object.
700
701 /// Return a reference to the non-modifiable "Choice" attribute of this
702 /// object.
704};
705
706// FREE OPERATORS
707
708/// Return `true` if the specified `lhs` and `rhs` attribute objects have
709/// the same value, and `false` otherwise. Two attribute objects have the
710/// same value if each respective attribute has the same value.
711inline
712bool operator==(const BasicSchemaEnumerationElement& lhs, const BasicSchemaEnumerationElement& rhs);
713
714/// Return `true` if the specified `lhs` and `rhs` attribute objects do not
715/// have the same value, and `false` otherwise. Two attribute objects do
716/// not have the same value if one or more respective attributes differ in
717/// values.
718inline
719bool operator!=(const BasicSchemaEnumerationElement& lhs, const BasicSchemaEnumerationElement& rhs);
720
721/// Format the specified `rhs` to the specified output `stream` and
722/// return a reference to the modifiable `stream`.
723inline
724bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaEnumerationElement& rhs);
725
726/// Pass the specified `object` to the specified `hashAlg`. This function
727/// integrates with the `bslh` modular hashing system and effectively
728/// provides a `bsl::hash` specialization for `BasicSchemaEnumerationElement`.
729template <typename HASH_ALGORITHM>
730void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaEnumerationElement& object);
731
732} // close package namespace
733
734// TRAITS
735
737
738namespace s_baltst {
739
740 // =========================================
741 // class BasicSchemaRestrictionElementChoice
742 // =========================================
743
745
746 // INSTANCE DATA
747 union {
750 };
751
752 int d_selectionId;
753 bslma::Allocator *d_allocator_p;
754
755 public:
756 // TYPES
757
758 enum {
762 };
763
764 enum {
766 };
767
768 enum {
771 };
772
773 // CONSTANTS
774 static const char CLASS_NAME[];
775
777
778 // CLASS METHODS
779
780 /// Return selection information for the selection indicated by the
781 /// specified `id` if the selection exists, and 0 otherwise.
783
784 /// Return selection information for the selection indicated by the
785 /// specified `name` of the specified `nameLength` if the selection
786 /// exists, and 0 otherwise.
788 const char *name,
789 int nameLength);
790
791 // CREATORS
792
793 /// Create an object of type `BasicSchemaRestrictionElementChoice`
794 /// having the default value. Use the optionally specified
795 /// `basicAllocator` to supply memory. If `basicAllocator` is 0, the
796 /// currently installed default allocator is used.
797 explicit BasicSchemaRestrictionElementChoice(bslma::Allocator *basicAllocator = 0);
798
799 /// Create an object of type `BasicSchemaRestrictionElementChoice`
800 /// having the value of the specified `original` object. Use the
801 /// optionally specified `basicAllocator` to supply memory. If
802 /// `basicAllocator` is 0, the currently installed default allocator is
803 /// used.
805 bslma::Allocator *basicAllocator = 0);
806
807#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
808 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
809 /// Create an object of type `BasicSchemaRestrictionElementChoice`
810 /// having the value of the specified `original` object. After
811 /// performing this action, the `original` object will be left in a
812 /// valid, but unspecified state.
814
815 /// Create an object of type `BasicSchemaRestrictionElementChoice`
816 /// having the value of the specified `original` object. After
817 /// performing this action, the `original` object will be left in a
818 /// valid, but unspecified state. Use the optionally specified
819 /// `basicAllocator` to supply memory. If `basicAllocator` is 0, the
820 /// currently installed default allocator is used.
822 bslma::Allocator *basicAllocator);
823#endif
824
825 /// Destroy this object.
827
828 // MANIPULATORS
829
830 /// Assign to this object the value of the specified `rhs` object.
832
833#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
834 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
835 /// Assign to this object the value of the specified `rhs` object.
836 /// After performing this action, the `rhs` object will be left in a
837 /// valid, but unspecified state.
839#endif
840
841 /// Reset this object to the default value (i.e., its value upon default
842 /// construction).
843 void reset();
844
845 /// Set the value of this object to be the default for the selection
846 /// indicated by the specified `selectionId`. Return 0 on success, and
847 /// non-zero value otherwise (i.e., the selection is not found).
849
850 /// Set the value of this object to be the default for the selection
851 /// indicated by the specified `name` of the specified `nameLength`.
852 /// Return 0 on success, and non-zero value otherwise (i.e., the
853 /// selection is not found).
854 int makeSelection(const char *name, int nameLength);
855
858#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
859 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
861#endif
862 // Set the value of this object to be a "Annotation" value. Optionally
863 // specify the 'value' of the "Annotation". If 'value' is not
864 // specified, the default "Annotation" value is used.
865
868#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
869 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
871#endif
872 // Set the value of this object to be a "Enumeration" value.
873 // Optionally specify the 'value' of the "Enumeration". If 'value' is
874 // not specified, the default "Enumeration" value is used.
875
876 /// Invoke the specified `manipulator` on the address of the modifiable
877 /// selection, supplying `manipulator` with the corresponding selection
878 /// information structure. Return the value returned from the
879 /// invocation of `manipulator` if this object has a defined selection,
880 /// and -1 otherwise.
881 template<class MANIPULATOR>
882 int manipulateSelection(MANIPULATOR& manipulator);
883
884 /// Return a reference to the modifiable "Annotation" selection of this
885 /// object if "Annotation" is the current selection. The behavior is
886 /// undefined unless "Annotation" is the selection of this object.
888
889 /// Return a reference to the modifiable "Enumeration" selection of this
890 /// object if "Enumeration" is the current selection. The behavior is
891 /// undefined unless "Enumeration" is the selection of this object.
893
894 // ACCESSORS
895
896 /// Format this object to the specified output `stream` at the
897 /// optionally specified indentation `level` and return a reference to
898 /// the modifiable `stream`. If `level` is specified, optionally
899 /// specify `spacesPerLevel`, the number of spaces per indentation level
900 /// for this and all of its nested objects. Each line is indented by
901 /// the absolute value of `level * spacesPerLevel`. If `level` is
902 /// negative, suppress indentation of the first line. If
903 /// `spacesPerLevel` is negative, suppress line breaks and format the
904 /// entire output on one line. If `stream` is initially invalid, this
905 /// operation has no effect. Note that a trailing newline is provided
906 /// in multiline mode only.
907 bsl::ostream& print(bsl::ostream& stream,
908 int level = 0,
909 int spacesPerLevel = 4) const;
910
911 /// Return the id of the current selection if the selection is defined,
912 /// and -1 otherwise.
913 int selectionId() const;
914
915 /// Invoke the specified `accessor` on the non-modifiable selection,
916 /// supplying `accessor` with the corresponding selection information
917 /// structure. Return the value returned from the invocation of
918 /// `accessor` if this object has a defined selection, and -1 otherwise.
919 template<class ACCESSOR>
920 int accessSelection(ACCESSOR& accessor) const;
921
922 /// Return a reference to the non-modifiable "Annotation" selection of
923 /// this object if "Annotation" is the current selection. The behavior
924 /// is undefined unless "Annotation" is the selection of this object.
926
927 /// Return a reference to the non-modifiable "Enumeration" selection of
928 /// this object if "Enumeration" is the current selection. The behavior
929 /// is undefined unless "Enumeration" is the selection of this object.
931
932 /// Return `true` if the value of this object is a "Annotation" value,
933 /// and return `false` otherwise.
934 bool isAnnotationValue() const;
935
936 /// Return `true` if the value of this object is a "Enumeration" value,
937 /// and return `false` otherwise.
938 bool isEnumerationValue() const;
939
940 /// Return `true` if the value of this object is undefined, and `false`
941 /// otherwise.
942 bool isUndefinedValue() const;
943
944 /// Return the symbolic name of the current selection of this object.
945 const char *selectionName() const;
946};
947
948// FREE OPERATORS
949
950/// Return `true` if the specified `lhs` and `rhs` objects have the same
951/// value, and `false` otherwise. Two `BasicSchemaRestrictionElementChoice` objects have the same
952/// value if either the selections in both objects have the same ids and
953/// the same values, or both selections are undefined.
954inline
956
957/// Return `true` if the specified `lhs` and `rhs` objects do not have the
958/// same values, as determined by `operator==`, and `false` otherwise.
959inline
961
962/// Format the specified `rhs` to the specified output `stream` and
963/// return a reference to the modifiable `stream`.
964inline
965bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaRestrictionElementChoice& rhs);
966
967/// Pass the specified `object` to the specified `hashAlg`. This function
968/// integrates with the `bslh` modular hashing system and effectively
969/// provides a `bsl::hash` specialization for `BasicSchemaRestrictionElementChoice`.
970template <typename HASH_ALGORITHM>
971void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaRestrictionElementChoice& object);
972
973} // close package namespace
974
975// TRAITS
976
978
979namespace s_baltst {
980
981 // ===================================
982 // class BasicSchemaRestrictionElement
983 // ===================================
984
986
987 // INSTANCE DATA
990
991 public:
992 // TYPES
993 enum {
996 };
997
998 enum {
1001
1002 enum {
1006
1007 // CONSTANTS
1008 static const char CLASS_NAME[];
1009
1011
1012 public:
1013 // CLASS METHODS
1014
1015 /// Return attribute information for the attribute indicated by the
1016 /// specified `id` if the attribute exists, and 0 otherwise.
1018
1019 /// Return attribute information for the attribute indicated by the
1020 /// specified `name` of the specified `nameLength` if the attribute
1021 /// exists, and 0 otherwise.
1023 const char *name,
1024 int nameLength);
1025
1026 // CREATORS
1027
1028 /// Create an object of type `BasicSchemaRestrictionElement` having the
1029 /// default value. Use the optionally specified `basicAllocator` to
1030 /// supply memory. If `basicAllocator` is 0, the currently installed
1031 /// default allocator is used.
1033
1034 /// Create an object of type `BasicSchemaRestrictionElement` having the
1035 /// value of the specified `original` object. Use the optionally
1036 /// specified `basicAllocator` to supply memory. If `basicAllocator` is
1037 /// 0, the currently installed default allocator is used.
1039 bslma::Allocator *basicAllocator = 0);
1040
1041#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
1042 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
1043 /// Create an object of type `BasicSchemaRestrictionElement` having the
1044 /// value of the specified `original` object. After performing this
1045 /// action, the `original` object will be left in a valid, but
1046 /// unspecified state.
1048
1049 /// Create an object of type `BasicSchemaRestrictionElement` having the
1050 /// value of the specified `original` object. After performing this
1051 /// action, the `original` object will be left in a valid, but
1052 /// unspecified state. Use the optionally specified `basicAllocator` to
1053 /// supply memory. If `basicAllocator` is 0, the currently installed
1054 /// default allocator is used.
1056 bslma::Allocator *basicAllocator);
1057#endif
1058
1059 /// Destroy this object.
1061
1062 // MANIPULATORS
1063
1064 /// Assign to this object the value of the specified `rhs` object.
1066
1067#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
1068 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
1069 /// Assign to this object the value of the specified `rhs` object.
1070 /// After performing this action, the `rhs` object will be left in a
1071 /// valid, but unspecified state.
1073#endif
1074
1075 /// Reset this object to the default value (i.e., its value upon
1076 /// default construction).
1077 void reset();
1078
1079 /// Invoke the specified `manipulator` sequentially on the address of
1080 /// each (modifiable) attribute of this object, supplying `manipulator`
1081 /// with the corresponding attribute information structure until such
1082 /// invocation returns a non-zero value. Return the value from the
1083 /// last invocation of `manipulator` (i.e., the invocation that
1084 /// terminated the sequence).
1085 template<class MANIPULATOR>
1086 int manipulateAttributes(MANIPULATOR& manipulator);
1087
1088 /// Invoke the specified `manipulator` on the address of
1089 /// the (modifiable) attribute indicated by the specified `id`,
1090 /// supplying `manipulator` with the corresponding attribute
1091 /// information structure. Return the value returned from the
1092 /// invocation of `manipulator` if `id` identifies an attribute of this
1093 /// class, and -1 otherwise.
1094 template<class MANIPULATOR>
1095 int manipulateAttribute(MANIPULATOR& manipulator, int id);
1096
1097 /// Invoke the specified `manipulator` on the address of
1098 /// the (modifiable) attribute indicated by the specified `name` of the
1099 /// specified `nameLength`, supplying `manipulator` with the
1100 /// corresponding attribute information structure. Return the value
1101 /// returned from the invocation of `manipulator` if `name` identifies
1102 /// an attribute of this class, and -1 otherwise.
1103 template<class MANIPULATOR>
1104 int manipulateAttribute(MANIPULATOR& manipulator,
1105 const char *name,
1106 int nameLength);
1107
1108 /// Return a reference to the modifiable "Base" attribute of this
1109 /// object.
1111
1112 /// Return a reference to the modifiable "Choice" attribute of this
1113 /// object.
1115
1116 // ACCESSORS
1117
1118 /// Format this object to the specified output `stream` at the
1119 /// optionally specified indentation `level` and return a reference to
1120 /// the modifiable `stream`. If `level` is specified, optionally
1121 /// specify `spacesPerLevel`, the number of spaces per indentation level
1122 /// for this and all of its nested objects. Each line is indented by
1123 /// the absolute value of `level * spacesPerLevel`. If `level` is
1124 /// negative, suppress indentation of the first line. If
1125 /// `spacesPerLevel` is negative, suppress line breaks and format the
1126 /// entire output on one line. If `stream` is initially invalid, this
1127 /// operation has no effect. Note that a trailing newline is provided
1128 /// in multiline mode only.
1129 bsl::ostream& print(bsl::ostream& stream,
1130 int level = 0,
1131 int spacesPerLevel = 4) const;
1132
1133 /// Invoke the specified `accessor` sequentially on each
1134 /// (non-modifiable) attribute of this object, supplying `accessor`
1135 /// with the corresponding attribute information structure until such
1136 /// invocation returns a non-zero value. Return the value from the
1137 /// last invocation of `accessor` (i.e., the invocation that terminated
1138 /// the sequence).
1139 template<class ACCESSOR>
1140 int accessAttributes(ACCESSOR& accessor) const;
1141
1142 /// Invoke the specified `accessor` on the (non-modifiable) attribute
1143 /// of this object indicated by the specified `id`, supplying `accessor`
1144 /// with the corresponding attribute information structure. Return the
1145 /// value returned from the invocation of `accessor` if `id` identifies
1146 /// an attribute of this class, and -1 otherwise.
1147 template<class ACCESSOR>
1148 int accessAttribute(ACCESSOR& accessor, int id) const;
1149
1150 /// Invoke the specified `accessor` on the (non-modifiable) attribute
1151 /// of this object indicated by the specified `name` of the specified
1152 /// `nameLength`, supplying `accessor` with the corresponding attribute
1153 /// information structure. Return the value returned from the
1154 /// invocation of `accessor` if `name` identifies an attribute of this
1155 /// class, and -1 otherwise.
1156 template<class ACCESSOR>
1157 int accessAttribute(ACCESSOR& accessor,
1158 const char *name,
1159 int nameLength) const;
1160
1161 /// Return a reference to the non-modifiable "Base" attribute of this
1162 /// object.
1164
1165 /// Return a reference to the non-modifiable "Choice" attribute of this
1166 /// object.
1168};
1169
1170// FREE OPERATORS
1171
1172/// Return `true` if the specified `lhs` and `rhs` attribute objects have
1173/// the same value, and `false` otherwise. Two attribute objects have the
1174/// same value if each respective attribute has the same value.
1175inline
1176bool operator==(const BasicSchemaRestrictionElement& lhs, const BasicSchemaRestrictionElement& rhs);
1177
1178/// Return `true` if the specified `lhs` and `rhs` attribute objects do not
1179/// have the same value, and `false` otherwise. Two attribute objects do
1180/// not have the same value if one or more respective attributes differ in
1181/// values.
1182inline
1183bool operator!=(const BasicSchemaRestrictionElement& lhs, const BasicSchemaRestrictionElement& rhs);
1184
1185/// Format the specified `rhs` to the specified output `stream` and
1186/// return a reference to the modifiable `stream`.
1187inline
1188bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaRestrictionElement& rhs);
1189
1190/// Pass the specified `object` to the specified `hashAlg`. This function
1191/// integrates with the `bslh` modular hashing system and effectively
1192/// provides a `bsl::hash` specialization for `BasicSchemaRestrictionElement`.
1193template <typename HASH_ALGORITHM>
1194void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaRestrictionElement& object);
1195
1196} // close package namespace
1197
1198// TRAITS
1199
1201
1202namespace s_baltst {
1203
1204 // ========================================
1205 // class BasicSchemaSimpleTypeElementChoice
1206 // ========================================
1207
1209
1210 // INSTANCE DATA
1211 union {
1214 };
1215
1216 int d_selectionId;
1217 bslma::Allocator *d_allocator_p;
1218
1219 public:
1220 // TYPES
1221
1222 enum {
1227
1228 enum {
1229 NUM_SELECTIONS = 2
1231
1232 enum {
1236
1237 // CONSTANTS
1238 static const char CLASS_NAME[];
1239
1241
1242 // CLASS METHODS
1243
1244 /// Return selection information for the selection indicated by the
1245 /// specified `id` if the selection exists, and 0 otherwise.
1247
1248 /// Return selection information for the selection indicated by the
1249 /// specified `name` of the specified `nameLength` if the selection
1250 /// exists, and 0 otherwise.
1252 const char *name,
1253 int nameLength);
1254
1255 // CREATORS
1256
1257 /// Create an object of type `BasicSchemaSimpleTypeElementChoice` having
1258 /// the default value. Use the optionally specified `basicAllocator` to
1259 /// supply memory. If `basicAllocator` is 0, the currently installed
1260 /// default allocator is used.
1261 explicit BasicSchemaSimpleTypeElementChoice(bslma::Allocator *basicAllocator = 0);
1262
1263 /// Create an object of type `BasicSchemaSimpleTypeElementChoice` having
1264 /// the value of the specified `original` object. Use the optionally
1265 /// specified `basicAllocator` to supply memory. If `basicAllocator` is
1266 /// 0, the currently installed default allocator is used.
1268 bslma::Allocator *basicAllocator = 0);
1269
1270#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
1271 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
1272 /// Create an object of type `BasicSchemaSimpleTypeElementChoice` having
1273 /// the value of the specified `original` object. After performing this
1274 /// action, the `original` object will be left in a valid, but
1275 /// unspecified state.
1277
1278 /// Create an object of type `BasicSchemaSimpleTypeElementChoice` having
1279 /// the value of the specified `original` object. After performing this
1280 /// action, the `original` object will be left in a valid, but
1281 /// unspecified state. Use the optionally specified `basicAllocator` to
1282 /// supply memory. If `basicAllocator` is 0, the currently installed
1283 /// default allocator is used.
1285 bslma::Allocator *basicAllocator);
1286#endif
1287
1288 /// Destroy this object.
1290
1291 // MANIPULATORS
1292
1293 /// Assign to this object the value of the specified `rhs` object.
1295
1296#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
1297 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
1298 /// Assign to this object the value of the specified `rhs` object.
1299 /// After performing this action, the `rhs` object will be left in a
1300 /// valid, but unspecified state.
1302#endif
1303
1304 /// Reset this object to the default value (i.e., its value upon default
1305 /// construction).
1306 void reset();
1307
1308 /// Set the value of this object to be the default for the selection
1309 /// indicated by the specified `selectionId`. Return 0 on success, and
1310 /// non-zero value otherwise (i.e., the selection is not found).
1312
1313 /// Set the value of this object to be the default for the selection
1314 /// indicated by the specified `name` of the specified `nameLength`.
1315 /// Return 0 on success, and non-zero value otherwise (i.e., the
1316 /// selection is not found).
1317 int makeSelection(const char *name, int nameLength);
1318
1321#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
1322 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
1324#endif
1325 // Set the value of this object to be a "Annotation" value. Optionally
1326 // specify the 'value' of the "Annotation". If 'value' is not
1327 // specified, the default "Annotation" value is used.
1328
1331#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
1332 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
1334#endif
1335 // Set the value of this object to be a "Restriction" value.
1336 // Optionally specify the 'value' of the "Restriction". If 'value' is
1337 // not specified, the default "Restriction" value is used.
1338
1339 /// Invoke the specified `manipulator` on the address of the modifiable
1340 /// selection, supplying `manipulator` with the corresponding selection
1341 /// information structure. Return the value returned from the
1342 /// invocation of `manipulator` if this object has a defined selection,
1343 /// and -1 otherwise.
1344 template<class MANIPULATOR>
1345 int manipulateSelection(MANIPULATOR& manipulator);
1346
1347 /// Return a reference to the modifiable "Annotation" selection of this
1348 /// object if "Annotation" is the current selection. The behavior is
1349 /// undefined unless "Annotation" is the selection of this object.
1351
1352 /// Return a reference to the modifiable "Restriction" selection of this
1353 /// object if "Restriction" is the current selection. The behavior is
1354 /// undefined unless "Restriction" is the selection of this object.
1356
1357 // ACCESSORS
1358
1359 /// Format this object to the specified output `stream` at the
1360 /// optionally specified indentation `level` and return a reference to
1361 /// the modifiable `stream`. If `level` is specified, optionally
1362 /// specify `spacesPerLevel`, the number of spaces per indentation level
1363 /// for this and all of its nested objects. Each line is indented by
1364 /// the absolute value of `level * spacesPerLevel`. If `level` is
1365 /// negative, suppress indentation of the first line. If
1366 /// `spacesPerLevel` is negative, suppress line breaks and format the
1367 /// entire output on one line. If `stream` is initially invalid, this
1368 /// operation has no effect. Note that a trailing newline is provided
1369 /// in multiline mode only.
1370 bsl::ostream& print(bsl::ostream& stream,
1371 int level = 0,
1372 int spacesPerLevel = 4) const;
1373
1374 /// Return the id of the current selection if the selection is defined,
1375 /// and -1 otherwise.
1376 int selectionId() const;
1377
1378 /// Invoke the specified `accessor` on the non-modifiable selection,
1379 /// supplying `accessor` with the corresponding selection information
1380 /// structure. Return the value returned from the invocation of
1381 /// `accessor` if this object has a defined selection, and -1 otherwise.
1382 template<class ACCESSOR>
1383 int accessSelection(ACCESSOR& accessor) const;
1384
1385 /// Return a reference to the non-modifiable "Annotation" selection of
1386 /// this object if "Annotation" is the current selection. The behavior
1387 /// is undefined unless "Annotation" is the selection of this object.
1389
1390 /// Return a reference to the non-modifiable "Restriction" selection of
1391 /// this object if "Restriction" is the current selection. The behavior
1392 /// is undefined unless "Restriction" is the selection of this object.
1394
1395 /// Return `true` if the value of this object is a "Annotation" value,
1396 /// and return `false` otherwise.
1397 bool isAnnotationValue() const;
1398
1399 /// Return `true` if the value of this object is a "Restriction" value,
1400 /// and return `false` otherwise.
1401 bool isRestrictionValue() const;
1402
1403 /// Return `true` if the value of this object is undefined, and `false`
1404 /// otherwise.
1405 bool isUndefinedValue() const;
1406
1407 /// Return the symbolic name of the current selection of this object.
1408 const char *selectionName() const;
1409};
1410
1411// FREE OPERATORS
1412
1413/// Return `true` if the specified `lhs` and `rhs` objects have the same
1414/// value, and `false` otherwise. Two `BasicSchemaSimpleTypeElementChoice` objects have the same
1415/// value if either the selections in both objects have the same ids and
1416/// the same values, or both selections are undefined.
1417inline
1419
1420/// Return `true` if the specified `lhs` and `rhs` objects do not have the
1421/// same values, as determined by `operator==`, and `false` otherwise.
1422inline
1424
1425/// Format the specified `rhs` to the specified output `stream` and
1426/// return a reference to the modifiable `stream`.
1427inline
1428bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaSimpleTypeElementChoice& rhs);
1429
1430/// Pass the specified `object` to the specified `hashAlg`. This function
1431/// integrates with the `bslh` modular hashing system and effectively
1432/// provides a `bsl::hash` specialization for `BasicSchemaSimpleTypeElementChoice`.
1433template <typename HASH_ALGORITHM>
1434void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaSimpleTypeElementChoice& object);
1435
1436} // close package namespace
1437
1438// TRAITS
1439
1441
1442namespace s_baltst {
1443
1444 // ==================================
1445 // class BasicSchemaSimpleTypeElement
1446 // ==================================
1447
1449
1450 // INSTANCE DATA
1453 bdlb::NullableValue<bsl::string> d_preserveEnumOrder;
1454
1455 public:
1456 // TYPES
1457 enum {
1462
1463 enum {
1464 NUM_ATTRIBUTES = 3
1466
1467 enum {
1472
1473 // CONSTANTS
1474 static const char CLASS_NAME[];
1475
1477
1478 public:
1479 // CLASS METHODS
1480
1481 /// Return attribute information for the attribute indicated by the
1482 /// specified `id` if the attribute exists, and 0 otherwise.
1484
1485 /// Return attribute information for the attribute indicated by the
1486 /// specified `name` of the specified `nameLength` if the attribute
1487 /// exists, and 0 otherwise.
1489 const char *name,
1490 int nameLength);
1491
1492 // CREATORS
1493
1494 /// Create an object of type `BasicSchemaSimpleTypeElement` having the
1495 /// default value. Use the optionally specified `basicAllocator` to
1496 /// supply memory. If `basicAllocator` is 0, the currently installed
1497 /// default allocator is used.
1498 explicit BasicSchemaSimpleTypeElement(bslma::Allocator *basicAllocator = 0);
1499
1500 /// Create an object of type `BasicSchemaSimpleTypeElement` having the
1501 /// value of the specified `original` object. Use the optionally
1502 /// specified `basicAllocator` to supply memory. If `basicAllocator` is
1503 /// 0, the currently installed default allocator is used.
1505 bslma::Allocator *basicAllocator = 0);
1506
1507#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
1508 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
1509 /// Create an object of type `BasicSchemaSimpleTypeElement` having the
1510 /// value of the specified `original` object. After performing this
1511 /// action, the `original` object will be left in a valid, but
1512 /// unspecified state.
1514
1515 /// Create an object of type `BasicSchemaSimpleTypeElement` having the
1516 /// value of the specified `original` object. After performing this
1517 /// action, the `original` object will be left in a valid, but
1518 /// unspecified state. Use the optionally specified `basicAllocator` to
1519 /// supply memory. If `basicAllocator` is 0, the currently installed
1520 /// default allocator is used.
1522 bslma::Allocator *basicAllocator);
1523#endif
1524
1525 /// Destroy this object.
1527
1528 // MANIPULATORS
1529
1530 /// Assign to this object the value of the specified `rhs` object.
1532
1533#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
1534 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
1535 /// Assign to this object the value of the specified `rhs` object.
1536 /// After performing this action, the `rhs` object will be left in a
1537 /// valid, but unspecified state.
1539#endif
1540
1541 /// Reset this object to the default value (i.e., its value upon
1542 /// default construction).
1543 void reset();
1544
1545 /// Invoke the specified `manipulator` sequentially on the address of
1546 /// each (modifiable) attribute of this object, supplying `manipulator`
1547 /// with the corresponding attribute information structure until such
1548 /// invocation returns a non-zero value. Return the value from the
1549 /// last invocation of `manipulator` (i.e., the invocation that
1550 /// terminated the sequence).
1551 template<class MANIPULATOR>
1552 int manipulateAttributes(MANIPULATOR& manipulator);
1553
1554 /// Invoke the specified `manipulator` on the address of
1555 /// the (modifiable) attribute indicated by the specified `id`,
1556 /// supplying `manipulator` with the corresponding attribute
1557 /// information structure. Return the value returned from the
1558 /// invocation of `manipulator` if `id` identifies an attribute of this
1559 /// class, and -1 otherwise.
1560 template<class MANIPULATOR>
1561 int manipulateAttribute(MANIPULATOR& manipulator, int id);
1562
1563 /// Invoke the specified `manipulator` on the address of
1564 /// the (modifiable) attribute indicated by the specified `name` of the
1565 /// specified `nameLength`, supplying `manipulator` with the
1566 /// corresponding attribute information structure. Return the value
1567 /// returned from the invocation of `manipulator` if `name` identifies
1568 /// an attribute of this class, and -1 otherwise.
1569 template<class MANIPULATOR>
1570 int manipulateAttribute(MANIPULATOR& manipulator,
1571 const char *name,
1572 int nameLength);
1573
1574 /// Return a reference to the modifiable "Name" attribute of this
1575 /// object.
1577
1578 /// Return a reference to the modifiable "PreserveEnumOrder" attribute
1579 /// of this object.
1581
1582 /// Return a reference to the modifiable "Choice" attribute of this
1583 /// object.
1585
1586 // ACCESSORS
1587
1588 /// Format this object to the specified output `stream` at the
1589 /// optionally specified indentation `level` and return a reference to
1590 /// the modifiable `stream`. If `level` is specified, optionally
1591 /// specify `spacesPerLevel`, the number of spaces per indentation level
1592 /// for this and all of its nested objects. Each line is indented by
1593 /// the absolute value of `level * spacesPerLevel`. If `level` is
1594 /// negative, suppress indentation of the first line. If
1595 /// `spacesPerLevel` is negative, suppress line breaks and format the
1596 /// entire output on one line. If `stream` is initially invalid, this
1597 /// operation has no effect. Note that a trailing newline is provided
1598 /// in multiline mode only.
1599 bsl::ostream& print(bsl::ostream& stream,
1600 int level = 0,
1601 int spacesPerLevel = 4) const;
1602
1603 /// Invoke the specified `accessor` sequentially on each
1604 /// (non-modifiable) attribute of this object, supplying `accessor`
1605 /// with the corresponding attribute information structure until such
1606 /// invocation returns a non-zero value. Return the value from the
1607 /// last invocation of `accessor` (i.e., the invocation that terminated
1608 /// the sequence).
1609 template<class ACCESSOR>
1610 int accessAttributes(ACCESSOR& accessor) const;
1611
1612 /// Invoke the specified `accessor` on the (non-modifiable) attribute
1613 /// of this object indicated by the specified `id`, supplying `accessor`
1614 /// with the corresponding attribute information structure. Return the
1615 /// value returned from the invocation of `accessor` if `id` identifies
1616 /// an attribute of this class, and -1 otherwise.
1617 template<class ACCESSOR>
1618 int accessAttribute(ACCESSOR& accessor, int id) const;
1619
1620 /// Invoke the specified `accessor` on the (non-modifiable) attribute
1621 /// of this object indicated by the specified `name` of the specified
1622 /// `nameLength`, supplying `accessor` with the corresponding attribute
1623 /// information structure. Return the value returned from the
1624 /// invocation of `accessor` if `name` identifies an attribute of this
1625 /// class, and -1 otherwise.
1626 template<class ACCESSOR>
1627 int accessAttribute(ACCESSOR& accessor,
1628 const char *name,
1629 int nameLength) const;
1630
1631 /// Return a reference to the non-modifiable "Name" attribute of this
1632 /// object.
1634
1635 /// Return a reference to the non-modifiable "PreserveEnumOrder"
1636 /// attribute of this object.
1638
1639 /// Return a reference to the non-modifiable "Choice" attribute of this
1640 /// object.
1642};
1643
1644// FREE OPERATORS
1645
1646/// Return `true` if the specified `lhs` and `rhs` attribute objects have
1647/// the same value, and `false` otherwise. Two attribute objects have the
1648/// same value if each respective attribute has the same value.
1649inline
1650bool operator==(const BasicSchemaSimpleTypeElement& lhs, const BasicSchemaSimpleTypeElement& rhs);
1651
1652/// Return `true` if the specified `lhs` and `rhs` attribute objects do not
1653/// have the same value, and `false` otherwise. Two attribute objects do
1654/// not have the same value if one or more respective attributes differ in
1655/// values.
1656inline
1657bool operator!=(const BasicSchemaSimpleTypeElement& lhs, const BasicSchemaSimpleTypeElement& rhs);
1658
1659/// Format the specified `rhs` to the specified output `stream` and
1660/// return a reference to the modifiable `stream`.
1661inline
1662bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaSimpleTypeElement& rhs);
1663
1664/// Pass the specified `object` to the specified `hashAlg`. This function
1665/// integrates with the `bslh` modular hashing system and effectively
1666/// provides a `bsl::hash` specialization for `BasicSchemaSimpleTypeElement`.
1667template <typename HASH_ALGORITHM>
1668void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaSimpleTypeElement& object);
1669
1670} // close package namespace
1671
1672// TRAITS
1673
1675
1676namespace s_baltst {
1677
1678 // ==============================
1679 // class BasicSchemaChoiceElement
1680 // ==============================
1681
1683
1684 // INSTANCE DATA
1686
1687 public:
1688 // TYPES
1689 enum {
1692
1693 enum {
1694 NUM_ATTRIBUTES = 1
1696
1697 enum {
1700
1701 // CONSTANTS
1702 static const char CLASS_NAME[];
1703
1705
1706 public:
1707 // CLASS METHODS
1708
1709 /// Return attribute information for the attribute indicated by the
1710 /// specified `id` if the attribute exists, and 0 otherwise.
1712
1713 /// Return attribute information for the attribute indicated by the
1714 /// specified `name` of the specified `nameLength` if the attribute
1715 /// exists, and 0 otherwise.
1717 const char *name,
1718 int nameLength);
1719
1720 // CREATORS
1721
1722 /// Create an object of type `BasicSchemaChoiceElement` having the
1723 /// default value. Use the optionally specified `basicAllocator` to
1724 /// supply memory. If `basicAllocator` is 0, the currently installed
1725 /// default allocator is used.
1726 explicit BasicSchemaChoiceElement(bslma::Allocator *basicAllocator = 0);
1727
1728 /// Create an object of type `BasicSchemaChoiceElement` having the value
1729 /// of the specified `original` object. Use the optionally specified
1730 /// `basicAllocator` to supply memory. If `basicAllocator` is 0, the
1731 /// currently installed default allocator is used.
1733 bslma::Allocator *basicAllocator = 0);
1734
1735#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
1736 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
1737 /// Create an object of type `BasicSchemaChoiceElement` having the value
1738 /// of the specified `original` object. After performing this action,
1739 /// the `original` object will be left in a valid, but unspecified
1740 /// state.
1742
1743 /// Create an object of type `BasicSchemaChoiceElement` having the value
1744 /// of the specified `original` object. After performing this action,
1745 /// the `original` object will be left in a valid, but unspecified
1746 /// state. Use the optionally specified `basicAllocator` to supply
1747 /// memory. If `basicAllocator` is 0, the currently installed default
1748 /// allocator is used.
1750 bslma::Allocator *basicAllocator);
1751#endif
1752
1753 /// Destroy this object.
1755
1756 // MANIPULATORS
1757
1758 /// Assign to this object the value of the specified `rhs` object.
1760
1761#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
1762 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
1763 /// Assign to this object the value of the specified `rhs` object.
1764 /// After performing this action, the `rhs` object will be left in a
1765 /// valid, but unspecified state.
1767#endif
1768
1769 /// Reset this object to the default value (i.e., its value upon
1770 /// default construction).
1771 void reset();
1772
1773 /// Invoke the specified `manipulator` sequentially on the address of
1774 /// each (modifiable) attribute of this object, supplying `manipulator`
1775 /// with the corresponding attribute information structure until such
1776 /// invocation returns a non-zero value. Return the value from the
1777 /// last invocation of `manipulator` (i.e., the invocation that
1778 /// terminated the sequence).
1779 template<class MANIPULATOR>
1780 int manipulateAttributes(MANIPULATOR& manipulator);
1781
1782 /// Invoke the specified `manipulator` on the address of
1783 /// the (modifiable) attribute indicated by the specified `id`,
1784 /// supplying `manipulator` with the corresponding attribute
1785 /// information structure. Return the value returned from the
1786 /// invocation of `manipulator` if `id` identifies an attribute of this
1787 /// class, and -1 otherwise.
1788 template<class MANIPULATOR>
1789 int manipulateAttribute(MANIPULATOR& manipulator, int id);
1790
1791 /// Invoke the specified `manipulator` on the address of
1792 /// the (modifiable) attribute indicated by the specified `name` of the
1793 /// specified `nameLength`, supplying `manipulator` with the
1794 /// corresponding attribute information structure. Return the value
1795 /// returned from the invocation of `manipulator` if `name` identifies
1796 /// an attribute of this class, and -1 otherwise.
1797 template<class MANIPULATOR>
1798 int manipulateAttribute(MANIPULATOR& manipulator,
1799 const char *name,
1800 int nameLength);
1801
1802 /// Return a reference to the modifiable "Choice" attribute of this
1803 /// object.
1805
1806 // ACCESSORS
1807
1808 /// Format this object to the specified output `stream` at the
1809 /// optionally specified indentation `level` and return a reference to
1810 /// the modifiable `stream`. If `level` is specified, optionally
1811 /// specify `spacesPerLevel`, the number of spaces per indentation level
1812 /// for this and all of its nested objects. Each line is indented by
1813 /// the absolute value of `level * spacesPerLevel`. If `level` is
1814 /// negative, suppress indentation of the first line. If
1815 /// `spacesPerLevel` is negative, suppress line breaks and format the
1816 /// entire output on one line. If `stream` is initially invalid, this
1817 /// operation has no effect. Note that a trailing newline is provided
1818 /// in multiline mode only.
1819 bsl::ostream& print(bsl::ostream& stream,
1820 int level = 0,
1821 int spacesPerLevel = 4) const;
1822
1823 /// Invoke the specified `accessor` sequentially on each
1824 /// (non-modifiable) attribute of this object, supplying `accessor`
1825 /// with the corresponding attribute information structure until such
1826 /// invocation returns a non-zero value. Return the value from the
1827 /// last invocation of `accessor` (i.e., the invocation that terminated
1828 /// the sequence).
1829 template<class ACCESSOR>
1830 int accessAttributes(ACCESSOR& accessor) const;
1831
1832 /// Invoke the specified `accessor` on the (non-modifiable) attribute
1833 /// of this object indicated by the specified `id`, supplying `accessor`
1834 /// with the corresponding attribute information structure. Return the
1835 /// value returned from the invocation of `accessor` if `id` identifies
1836 /// an attribute of this class, and -1 otherwise.
1837 template<class ACCESSOR>
1838 int accessAttribute(ACCESSOR& accessor, int id) const;
1839
1840 /// Invoke the specified `accessor` on the (non-modifiable) attribute
1841 /// of this object indicated by the specified `name` of the specified
1842 /// `nameLength`, supplying `accessor` with the corresponding attribute
1843 /// information structure. Return the value returned from the
1844 /// invocation of `accessor` if `name` identifies an attribute of this
1845 /// class, and -1 otherwise.
1846 template<class ACCESSOR>
1847 int accessAttribute(ACCESSOR& accessor,
1848 const char *name,
1849 int nameLength) const;
1850
1851 /// Return a reference to the non-modifiable "Choice" attribute of this
1852 /// object.
1854};
1855
1856// FREE OPERATORS
1857
1858/// Return `true` if the specified `lhs` and `rhs` attribute objects have
1859/// the same value, and `false` otherwise. Two attribute objects have the
1860/// same value if each respective attribute has the same value.
1861inline
1862bool operator==(const BasicSchemaChoiceElement& lhs, const BasicSchemaChoiceElement& rhs);
1863
1864/// Return `true` if the specified `lhs` and `rhs` attribute objects do not
1865/// have the same value, and `false` otherwise. Two attribute objects do
1866/// not have the same value if one or more respective attributes differ in
1867/// values.
1868inline
1869bool operator!=(const BasicSchemaChoiceElement& lhs, const BasicSchemaChoiceElement& rhs);
1870
1871/// Format the specified `rhs` to the specified output `stream` and
1872/// return a reference to the modifiable `stream`.
1873inline
1874bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaChoiceElement& rhs);
1875
1876/// Pass the specified `object` to the specified `hashAlg`. This function
1877/// integrates with the `bslh` modular hashing system and effectively
1878/// provides a `bsl::hash` specialization for `BasicSchemaChoiceElement`.
1879template <typename HASH_ALGORITHM>
1880void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaChoiceElement& object);
1881
1882} // close package namespace
1883
1884// TRAITS
1885
1887
1888namespace s_baltst {
1889
1890 // ====================================
1891 // class BasicSchemaChoiceElementChoice
1892 // ====================================
1893
1895
1896 // INSTANCE DATA
1897 union {
1900 };
1901
1902 int d_selectionId;
1903 bslma::Allocator *d_allocator_p;
1904
1905 public:
1906 // TYPES
1907
1908 enum {
1913
1914 enum {
1915 NUM_SELECTIONS = 2
1917
1918 enum {
1922
1923 // CONSTANTS
1924 static const char CLASS_NAME[];
1925
1927
1928 // CLASS METHODS
1929
1930 /// Return selection information for the selection indicated by the
1931 /// specified `id` if the selection exists, and 0 otherwise.
1933
1934 /// Return selection information for the selection indicated by the
1935 /// specified `name` of the specified `nameLength` if the selection
1936 /// exists, and 0 otherwise.
1938 const char *name,
1939 int nameLength);
1940
1941 // CREATORS
1942
1943 /// Create an object of type `BasicSchemaChoiceElementChoice` having the
1944 /// default value. Use the optionally specified `basicAllocator` to
1945 /// supply memory. If `basicAllocator` is 0, the currently installed
1946 /// default allocator is used.
1947 explicit BasicSchemaChoiceElementChoice(bslma::Allocator *basicAllocator = 0);
1948
1949 /// Create an object of type `BasicSchemaChoiceElementChoice` having the
1950 /// value of the specified `original` object. Use the optionally
1951 /// specified `basicAllocator` to supply memory. If `basicAllocator` is
1952 /// 0, the currently installed default allocator is used.
1954 bslma::Allocator *basicAllocator = 0);
1955
1956#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
1957 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
1958 /// Create an object of type `BasicSchemaChoiceElementChoice` having the
1959 /// value of the specified `original` object. After performing this
1960 /// action, the `original` object will be left in a valid, but
1961 /// unspecified state.
1963
1964 /// Create an object of type `BasicSchemaChoiceElementChoice` having the
1965 /// value of the specified `original` object. After performing this
1966 /// action, the `original` object will be left in a valid, but
1967 /// unspecified state. Use the optionally specified `basicAllocator` to
1968 /// supply memory. If `basicAllocator` is 0, the currently installed
1969 /// default allocator is used.
1971 bslma::Allocator *basicAllocator);
1972#endif
1973
1974 /// Destroy this object.
1976
1977 // MANIPULATORS
1978
1979 /// Assign to this object the value of the specified `rhs` object.
1981
1982#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
1983 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
1984 /// Assign to this object the value of the specified `rhs` object.
1985 /// After performing this action, the `rhs` object will be left in a
1986 /// valid, but unspecified state.
1988#endif
1989
1990 /// Reset this object to the default value (i.e., its value upon default
1991 /// construction).
1992 void reset();
1993
1994 /// Set the value of this object to be the default for the selection
1995 /// indicated by the specified `selectionId`. Return 0 on success, and
1996 /// non-zero value otherwise (i.e., the selection is not found).
1998
1999 /// Set the value of this object to be the default for the selection
2000 /// indicated by the specified `name` of the specified `nameLength`.
2001 /// Return 0 on success, and non-zero value otherwise (i.e., the
2002 /// selection is not found).
2003 int makeSelection(const char *name, int nameLength);
2004
2007#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
2008 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
2010#endif
2011 // Set the value of this object to be a "Annotation" value. Optionally
2012 // specify the 'value' of the "Annotation". If 'value' is not
2013 // specified, the default "Annotation" value is used.
2014
2017#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
2018 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
2020#endif
2021 // Set the value of this object to be a "Element" value. Optionally
2022 // specify the 'value' of the "Element". If 'value' is not specified,
2023 // the default "Element" value is used.
2024
2025 /// Invoke the specified `manipulator` on the address of the modifiable
2026 /// selection, supplying `manipulator` with the corresponding selection
2027 /// information structure. Return the value returned from the
2028 /// invocation of `manipulator` if this object has a defined selection,
2029 /// and -1 otherwise.
2030 template<class MANIPULATOR>
2031 int manipulateSelection(MANIPULATOR& manipulator);
2032
2033 /// Return a reference to the modifiable "Annotation" selection of this
2034 /// object if "Annotation" is the current selection. The behavior is
2035 /// undefined unless "Annotation" is the selection of this object.
2037
2038 /// Return a reference to the modifiable "Element" selection of this
2039 /// object if "Element" is the current selection. The behavior is
2040 /// undefined unless "Element" is the selection of this object.
2042
2043 // ACCESSORS
2044
2045 /// Format this object to the specified output `stream` at the
2046 /// optionally specified indentation `level` and return a reference to
2047 /// the modifiable `stream`. If `level` is specified, optionally
2048 /// specify `spacesPerLevel`, the number of spaces per indentation level
2049 /// for this and all of its nested objects. Each line is indented by
2050 /// the absolute value of `level * spacesPerLevel`. If `level` is
2051 /// negative, suppress indentation of the first line. If
2052 /// `spacesPerLevel` is negative, suppress line breaks and format the
2053 /// entire output on one line. If `stream` is initially invalid, this
2054 /// operation has no effect. Note that a trailing newline is provided
2055 /// in multiline mode only.
2056 bsl::ostream& print(bsl::ostream& stream,
2057 int level = 0,
2058 int spacesPerLevel = 4) const;
2059
2060 /// Return the id of the current selection if the selection is defined,
2061 /// and -1 otherwise.
2062 int selectionId() const;
2063
2064 /// Invoke the specified `accessor` on the non-modifiable selection,
2065 /// supplying `accessor` with the corresponding selection information
2066 /// structure. Return the value returned from the invocation of
2067 /// `accessor` if this object has a defined selection, and -1 otherwise.
2068 template<class ACCESSOR>
2069 int accessSelection(ACCESSOR& accessor) const;
2070
2071 /// Return a reference to the non-modifiable "Annotation" selection of
2072 /// this object if "Annotation" is the current selection. The behavior
2073 /// is undefined unless "Annotation" is the selection of this object.
2075
2076 /// Return a reference to the non-modifiable "Element" selection of this
2077 /// object if "Element" is the current selection. The behavior is
2078 /// undefined unless "Element" is the selection of this object.
2079 const BasicSchemaElement& element() const;
2080
2081 /// Return `true` if the value of this object is a "Annotation" value,
2082 /// and return `false` otherwise.
2083 bool isAnnotationValue() const;
2084
2085 /// Return `true` if the value of this object is a "Element" value, and
2086 /// return `false` otherwise.
2087 bool isElementValue() const;
2088
2089 /// Return `true` if the value of this object is undefined, and `false`
2090 /// otherwise.
2091 bool isUndefinedValue() const;
2092
2093 /// Return the symbolic name of the current selection of this object.
2094 const char *selectionName() const;
2095};
2096
2097// FREE OPERATORS
2098
2099/// Return `true` if the specified `lhs` and `rhs` objects have the same
2100/// value, and `false` otherwise. Two `BasicSchemaChoiceElementChoice` objects have the same
2101/// value if either the selections in both objects have the same ids and
2102/// the same values, or both selections are undefined.
2103inline
2105
2106/// Return `true` if the specified `lhs` and `rhs` objects do not have the
2107/// same values, as determined by `operator==`, and `false` otherwise.
2108inline
2110
2111/// Format the specified `rhs` to the specified output `stream` and
2112/// return a reference to the modifiable `stream`.
2113inline
2114bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaChoiceElementChoice& rhs);
2115
2116/// Pass the specified `object` to the specified `hashAlg`. This function
2117/// integrates with the `bslh` modular hashing system and effectively
2118/// provides a `bsl::hash` specialization for `BasicSchemaChoiceElementChoice`.
2119template <typename HASH_ALGORITHM>
2120void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaChoiceElementChoice& object);
2121
2122} // close package namespace
2123
2124// TRAITS
2125
2127
2128namespace s_baltst {
2129
2130 // ===================================
2131 // class BasicSchemaComplexTypeElement
2132 // ===================================
2133
2135
2136 // INSTANCE DATA
2139
2140 public:
2141 // TYPES
2142 enum {
2146
2147 enum {
2148 NUM_ATTRIBUTES = 2
2150
2151 enum {
2155
2156 // CONSTANTS
2157 static const char CLASS_NAME[];
2158
2160
2161 public:
2162 // CLASS METHODS
2163
2164 /// Return attribute information for the attribute indicated by the
2165 /// specified `id` if the attribute exists, and 0 otherwise.
2167
2168 /// Return attribute information for the attribute indicated by the
2169 /// specified `name` of the specified `nameLength` if the attribute
2170 /// exists, and 0 otherwise.
2172 const char *name,
2173 int nameLength);
2174
2175 // CREATORS
2176
2177 /// Create an object of type `BasicSchemaComplexTypeElement` having the
2178 /// default value. Use the optionally specified `basicAllocator` to
2179 /// supply memory. If `basicAllocator` is 0, the currently installed
2180 /// default allocator is used.
2182
2183 /// Create an object of type `BasicSchemaComplexTypeElement` having the
2184 /// value of the specified `original` object. Use the optionally
2185 /// specified `basicAllocator` to supply memory. If `basicAllocator` is
2186 /// 0, the currently installed default allocator is used.
2188 bslma::Allocator *basicAllocator = 0);
2189
2190#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
2191 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
2192 /// Create an object of type `BasicSchemaComplexTypeElement` having the
2193 /// value of the specified `original` object. After performing this
2194 /// action, the `original` object will be left in a valid, but
2195 /// unspecified state.
2197
2198 /// Create an object of type `BasicSchemaComplexTypeElement` having the
2199 /// value of the specified `original` object. After performing this
2200 /// action, the `original` object will be left in a valid, but
2201 /// unspecified state. Use the optionally specified `basicAllocator` to
2202 /// supply memory. If `basicAllocator` is 0, the currently installed
2203 /// default allocator is used.
2205 bslma::Allocator *basicAllocator);
2206#endif
2207
2208 /// Destroy this object.
2210
2211 // MANIPULATORS
2212
2213 /// Assign to this object the value of the specified `rhs` object.
2215
2216#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
2217 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
2218 /// Assign to this object the value of the specified `rhs` object.
2219 /// After performing this action, the `rhs` object will be left in a
2220 /// valid, but unspecified state.
2222#endif
2223
2224 /// Reset this object to the default value (i.e., its value upon
2225 /// default construction).
2226 void reset();
2227
2228 /// Invoke the specified `manipulator` sequentially on the address of
2229 /// each (modifiable) attribute of this object, supplying `manipulator`
2230 /// with the corresponding attribute information structure until such
2231 /// invocation returns a non-zero value. Return the value from the
2232 /// last invocation of `manipulator` (i.e., the invocation that
2233 /// terminated the sequence).
2234 template<class MANIPULATOR>
2235 int manipulateAttributes(MANIPULATOR& manipulator);
2236
2237 /// Invoke the specified `manipulator` on the address of
2238 /// the (modifiable) attribute indicated by the specified `id`,
2239 /// supplying `manipulator` with the corresponding attribute
2240 /// information structure. Return the value returned from the
2241 /// invocation of `manipulator` if `id` identifies an attribute of this
2242 /// class, and -1 otherwise.
2243 template<class MANIPULATOR>
2244 int manipulateAttribute(MANIPULATOR& manipulator, int id);
2245
2246 /// Invoke the specified `manipulator` on the address of
2247 /// the (modifiable) attribute indicated by the specified `name` of the
2248 /// specified `nameLength`, supplying `manipulator` with the
2249 /// corresponding attribute information structure. Return the value
2250 /// returned from the invocation of `manipulator` if `name` identifies
2251 /// an attribute of this class, and -1 otherwise.
2252 template<class MANIPULATOR>
2253 int manipulateAttribute(MANIPULATOR& manipulator,
2254 const char *name,
2255 int nameLength);
2256
2257 /// Return a reference to the modifiable "Name" attribute of this
2258 /// object.
2260
2261 /// Return a reference to the modifiable "Choice" attribute of this
2262 /// object.
2264
2265 // ACCESSORS
2266
2267 /// Format this object to the specified output `stream` at the
2268 /// optionally specified indentation `level` and return a reference to
2269 /// the modifiable `stream`. If `level` is specified, optionally
2270 /// specify `spacesPerLevel`, the number of spaces per indentation level
2271 /// for this and all of its nested objects. Each line is indented by
2272 /// the absolute value of `level * spacesPerLevel`. If `level` is
2273 /// negative, suppress indentation of the first line. If
2274 /// `spacesPerLevel` is negative, suppress line breaks and format the
2275 /// entire output on one line. If `stream` is initially invalid, this
2276 /// operation has no effect. Note that a trailing newline is provided
2277 /// in multiline mode only.
2278 bsl::ostream& print(bsl::ostream& stream,
2279 int level = 0,
2280 int spacesPerLevel = 4) const;
2281
2282 /// Invoke the specified `accessor` sequentially on each
2283 /// (non-modifiable) attribute of this object, supplying `accessor`
2284 /// with the corresponding attribute information structure until such
2285 /// invocation returns a non-zero value. Return the value from the
2286 /// last invocation of `accessor` (i.e., the invocation that terminated
2287 /// the sequence).
2288 template<class ACCESSOR>
2289 int accessAttributes(ACCESSOR& accessor) const;
2290
2291 /// Invoke the specified `accessor` on the (non-modifiable) attribute
2292 /// of this object indicated by the specified `id`, supplying `accessor`
2293 /// with the corresponding attribute information structure. Return the
2294 /// value returned from the invocation of `accessor` if `id` identifies
2295 /// an attribute of this class, and -1 otherwise.
2296 template<class ACCESSOR>
2297 int accessAttribute(ACCESSOR& accessor, int id) const;
2298
2299 /// Invoke the specified `accessor` on the (non-modifiable) attribute
2300 /// of this object indicated by the specified `name` of the specified
2301 /// `nameLength`, supplying `accessor` with the corresponding attribute
2302 /// information structure. Return the value returned from the
2303 /// invocation of `accessor` if `name` identifies an attribute of this
2304 /// class, and -1 otherwise.
2305 template<class ACCESSOR>
2306 int accessAttribute(ACCESSOR& accessor,
2307 const char *name,
2308 int nameLength) const;
2309
2310 /// Return a reference to the non-modifiable "Name" attribute of this
2311 /// object.
2313
2314 /// Return a reference to the non-modifiable "Choice" attribute of this
2315 /// object.
2317};
2318
2319// FREE OPERATORS
2320
2321/// Return `true` if the specified `lhs` and `rhs` attribute objects have
2322/// the same value, and `false` otherwise. Two attribute objects have the
2323/// same value if each respective attribute has the same value.
2324inline
2325bool operator==(const BasicSchemaComplexTypeElement& lhs, const BasicSchemaComplexTypeElement& rhs);
2326
2327/// Return `true` if the specified `lhs` and `rhs` attribute objects do not
2328/// have the same value, and `false` otherwise. Two attribute objects do
2329/// not have the same value if one or more respective attributes differ in
2330/// values.
2331inline
2332bool operator!=(const BasicSchemaComplexTypeElement& lhs, const BasicSchemaComplexTypeElement& rhs);
2333
2334/// Format the specified `rhs` to the specified output `stream` and
2335/// return a reference to the modifiable `stream`.
2336inline
2337bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaComplexTypeElement& rhs);
2338
2339/// Pass the specified `object` to the specified `hashAlg`. This function
2340/// integrates with the `bslh` modular hashing system and effectively
2341/// provides a `bsl::hash` specialization for `BasicSchemaComplexTypeElement`.
2342template <typename HASH_ALGORITHM>
2343void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaComplexTypeElement& object);
2344
2345} // close package namespace
2346
2347// TRAITS
2348
2350
2351namespace s_baltst {
2352
2353 // =========================================
2354 // class BasicSchemaComplexTypeElementChoice
2355 // =========================================
2356
2358
2359 // INSTANCE DATA
2360 union {
2364 };
2365
2366 int d_selectionId;
2367 bslma::Allocator *d_allocator_p;
2368
2369 public:
2370 // TYPES
2371
2372 enum {
2378
2379 enum {
2380 NUM_SELECTIONS = 3
2382
2383 enum {
2388
2389 // CONSTANTS
2390 static const char CLASS_NAME[];
2391
2393
2394 // CLASS METHODS
2395
2396 /// Return selection information for the selection indicated by the
2397 /// specified `id` if the selection exists, and 0 otherwise.
2399
2400 /// Return selection information for the selection indicated by the
2401 /// specified `name` of the specified `nameLength` if the selection
2402 /// exists, and 0 otherwise.
2404 const char *name,
2405 int nameLength);
2406
2407 // CREATORS
2408
2409 /// Create an object of type `BasicSchemaComplexTypeElementChoice`
2410 /// having the default value. Use the optionally specified
2411 /// `basicAllocator` to supply memory. If `basicAllocator` is 0, the
2412 /// currently installed default allocator is used.
2413 explicit BasicSchemaComplexTypeElementChoice(bslma::Allocator *basicAllocator = 0);
2414
2415 /// Create an object of type `BasicSchemaComplexTypeElementChoice`
2416 /// having the value of the specified `original` object. Use the
2417 /// optionally specified `basicAllocator` to supply memory. If
2418 /// `basicAllocator` is 0, the currently installed default allocator is
2419 /// used.
2421 bslma::Allocator *basicAllocator = 0);
2422
2423#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
2424 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
2425 /// Create an object of type `BasicSchemaComplexTypeElementChoice`
2426 /// having the value of the specified `original` object. After
2427 /// performing this action, the `original` object will be left in a
2428 /// valid, but unspecified state.
2430
2431 /// Create an object of type `BasicSchemaComplexTypeElementChoice`
2432 /// having the value of the specified `original` object. After
2433 /// performing this action, the `original` object will be left in a
2434 /// valid, but unspecified state. Use the optionally specified
2435 /// `basicAllocator` to supply memory. If `basicAllocator` is 0, the
2436 /// currently installed default allocator is used.
2438 bslma::Allocator *basicAllocator);
2439#endif
2440
2441 /// Destroy this object.
2443
2444 // MANIPULATORS
2445
2446 /// Assign to this object the value of the specified `rhs` object.
2448
2449#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
2450 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
2451 /// Assign to this object the value of the specified `rhs` object.
2452 /// After performing this action, the `rhs` object will be left in a
2453 /// valid, but unspecified state.
2455#endif
2456
2457 /// Reset this object to the default value (i.e., its value upon default
2458 /// construction).
2459 void reset();
2460
2461 /// Set the value of this object to be the default for the selection
2462 /// indicated by the specified `selectionId`. Return 0 on success, and
2463 /// non-zero value otherwise (i.e., the selection is not found).
2465
2466 /// Set the value of this object to be the default for the selection
2467 /// indicated by the specified `name` of the specified `nameLength`.
2468 /// Return 0 on success, and non-zero value otherwise (i.e., the
2469 /// selection is not found).
2470 int makeSelection(const char *name, int nameLength);
2471
2474#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
2475 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
2477#endif
2478 // Set the value of this object to be a "Annotation" value. Optionally
2479 // specify the 'value' of the "Annotation". If 'value' is not
2480 // specified, the default "Annotation" value is used.
2481
2484#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
2485 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
2487#endif
2488 // Set the value of this object to be a "Sequence" value. Optionally
2489 // specify the 'value' of the "Sequence". If 'value' is not specified,
2490 // the default "Sequence" value is used.
2491
2494#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
2495 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
2497#endif
2498 // Set the value of this object to be a "Choice" value. Optionally
2499 // specify the 'value' of the "Choice". If 'value' is not specified,
2500 // the default "Choice" value is used.
2501
2502 /// Invoke the specified `manipulator` on the address of the modifiable
2503 /// selection, supplying `manipulator` with the corresponding selection
2504 /// information structure. Return the value returned from the
2505 /// invocation of `manipulator` if this object has a defined selection,
2506 /// and -1 otherwise.
2507 template<class MANIPULATOR>
2508 int manipulateSelection(MANIPULATOR& manipulator);
2509
2510 /// Return a reference to the modifiable "Annotation" selection of this
2511 /// object if "Annotation" is the current selection. The behavior is
2512 /// undefined unless "Annotation" is the selection of this object.
2514
2515 /// Return a reference to the modifiable "Sequence" selection of this
2516 /// object if "Sequence" is the current selection. The behavior is
2517 /// undefined unless "Sequence" is the selection of this object.
2519
2520 /// Return a reference to the modifiable "Choice" selection of this
2521 /// object if "Choice" is the current selection. The behavior is
2522 /// undefined unless "Choice" is the selection of this object.
2524
2525 // ACCESSORS
2526
2527 /// Format this object to the specified output `stream` at the
2528 /// optionally specified indentation `level` and return a reference to
2529 /// the modifiable `stream`. If `level` is specified, optionally
2530 /// specify `spacesPerLevel`, the number of spaces per indentation level
2531 /// for this and all of its nested objects. Each line is indented by
2532 /// the absolute value of `level * spacesPerLevel`. If `level` is
2533 /// negative, suppress indentation of the first line. If
2534 /// `spacesPerLevel` is negative, suppress line breaks and format the
2535 /// entire output on one line. If `stream` is initially invalid, this
2536 /// operation has no effect. Note that a trailing newline is provided
2537 /// in multiline mode only.
2538 bsl::ostream& print(bsl::ostream& stream,
2539 int level = 0,
2540 int spacesPerLevel = 4) const;
2541
2542 /// Return the id of the current selection if the selection is defined,
2543 /// and -1 otherwise.
2544 int selectionId() const;
2545
2546 /// Invoke the specified `accessor` on the non-modifiable selection,
2547 /// supplying `accessor` with the corresponding selection information
2548 /// structure. Return the value returned from the invocation of
2549 /// `accessor` if this object has a defined selection, and -1 otherwise.
2550 template<class ACCESSOR>
2551 int accessSelection(ACCESSOR& accessor) const;
2552
2553 /// Return a reference to the non-modifiable "Annotation" selection of
2554 /// this object if "Annotation" is the current selection. The behavior
2555 /// is undefined unless "Annotation" is the selection of this object.
2557
2558 /// Return a reference to the non-modifiable "Sequence" selection of
2559 /// this object if "Sequence" is the current selection. The behavior is
2560 /// undefined unless "Sequence" is the selection of this object.
2561 const BasicSchemaSequenceElement& sequence() const;
2562
2563 /// Return a reference to the non-modifiable "Choice" selection of this
2564 /// object if "Choice" is the current selection. The behavior is
2565 /// undefined unless "Choice" is the selection of this object.
2566 const BasicSchemaChoiceElement& choice() const;
2567
2568 /// Return `true` if the value of this object is a "Annotation" value,
2569 /// and return `false` otherwise.
2570 bool isAnnotationValue() const;
2571
2572 /// Return `true` if the value of this object is a "Sequence" value, and
2573 /// return `false` otherwise.
2574 bool isSequenceValue() const;
2575
2576 /// Return `true` if the value of this object is a "Choice" value, and
2577 /// return `false` otherwise.
2578 bool isChoiceValue() const;
2579
2580 /// Return `true` if the value of this object is undefined, and `false`
2581 /// otherwise.
2582 bool isUndefinedValue() const;
2583
2584 /// Return the symbolic name of the current selection of this object.
2585 const char *selectionName() const;
2586};
2587
2588// FREE OPERATORS
2589
2590/// Return `true` if the specified `lhs` and `rhs` objects have the same
2591/// value, and `false` otherwise. Two `BasicSchemaComplexTypeElementChoice` objects have the same
2592/// value if either the selections in both objects have the same ids and
2593/// the same values, or both selections are undefined.
2594inline
2596
2597/// Return `true` if the specified `lhs` and `rhs` objects do not have the
2598/// same values, as determined by `operator==`, and `false` otherwise.
2599inline
2601
2602/// Format the specified `rhs` to the specified output `stream` and
2603/// return a reference to the modifiable `stream`.
2604inline
2605bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaComplexTypeElementChoice& rhs);
2606
2607/// Pass the specified `object` to the specified `hashAlg`. This function
2608/// integrates with the `bslh` modular hashing system and effectively
2609/// provides a `bsl::hash` specialization for `BasicSchemaComplexTypeElementChoice`.
2610template <typename HASH_ALGORITHM>
2611void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaComplexTypeElementChoice& object);
2612
2613} // close package namespace
2614
2615// TRAITS
2616
2618
2619namespace s_baltst {
2620
2621 // ========================
2622 // class BasicSchemaElement
2623 // ========================
2624
2626
2627 // INSTANCE DATA
2636 bdlb::NullableValue<bsl::string> d_allocatesMemory;
2637 bdlb::NullableValue<bsl::string> d_allowsDirectManipulation;
2638
2639 public:
2640 // TYPES
2641 enum {
2653
2654 enum {
2655 NUM_ATTRIBUTES = 10
2657
2658 enum {
2670
2671 // CONSTANTS
2672 static const char CLASS_NAME[];
2673
2675
2676 public:
2677 // CLASS METHODS
2678
2679 /// Return attribute information for the attribute indicated by the
2680 /// specified `id` if the attribute exists, and 0 otherwise.
2682
2683 /// Return attribute information for the attribute indicated by the
2684 /// specified `name` of the specified `nameLength` if the attribute
2685 /// exists, and 0 otherwise.
2687 const char *name,
2688 int nameLength);
2689
2690 // CREATORS
2691
2692 /// Create an object of type `BasicSchemaElement` having the default
2693 /// value. Use the optionally specified `basicAllocator` to supply
2694 /// memory. If `basicAllocator` is 0, the currently installed default
2695 /// allocator is used.
2696 explicit BasicSchemaElement(bslma::Allocator *basicAllocator = 0);
2697
2698 /// Create an object of type `BasicSchemaElement` having the value of
2699 /// the specified `original` object. Use the optionally specified
2700 /// `basicAllocator` to supply memory. If `basicAllocator` is 0, the
2701 /// currently installed default allocator is used.
2703 bslma::Allocator *basicAllocator = 0);
2704
2705#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
2706 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
2707 /// Create an object of type `BasicSchemaElement` having the value of
2708 /// the specified `original` object. After performing this action, the
2709 /// `original` object will be left in a valid, but unspecified state.
2710 BasicSchemaElement(BasicSchemaElement&& original) noexcept;
2711
2712 /// Create an object of type `BasicSchemaElement` having the value of
2713 /// the specified `original` object. After performing this action, the
2714 /// `original` object will be left in a valid, but unspecified state.
2715 /// Use the optionally specified `basicAllocator` to supply memory. If
2716 /// `basicAllocator` is 0, the currently installed default allocator is
2717 /// used.
2719 bslma::Allocator *basicAllocator);
2720#endif
2721
2722 /// Destroy this object.
2724
2725 // MANIPULATORS
2726
2727 /// Assign to this object the value of the specified `rhs` object.
2729
2730#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
2731 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
2732 /// Assign to this object the value of the specified `rhs` object.
2733 /// After performing this action, the `rhs` object will be left in a
2734 /// valid, but unspecified state.
2736#endif
2737
2738 /// Reset this object to the default value (i.e., its value upon
2739 /// default construction).
2740 void reset();
2741
2742 /// Invoke the specified `manipulator` sequentially on the address of
2743 /// each (modifiable) attribute of this object, supplying `manipulator`
2744 /// with the corresponding attribute information structure until such
2745 /// invocation returns a non-zero value. Return the value from the
2746 /// last invocation of `manipulator` (i.e., the invocation that
2747 /// terminated the sequence).
2748 template<class MANIPULATOR>
2749 int manipulateAttributes(MANIPULATOR& manipulator);
2750
2751 /// Invoke the specified `manipulator` on the address of
2752 /// the (modifiable) attribute indicated by the specified `id`,
2753 /// supplying `manipulator` with the corresponding attribute
2754 /// information structure. Return the value returned from the
2755 /// invocation of `manipulator` if `id` identifies an attribute of this
2756 /// class, and -1 otherwise.
2757 template<class MANIPULATOR>
2758 int manipulateAttribute(MANIPULATOR& manipulator, int id);
2759
2760 /// Invoke the specified `manipulator` on the address of
2761 /// the (modifiable) attribute indicated by the specified `name` of the
2762 /// specified `nameLength`, supplying `manipulator` with the
2763 /// corresponding attribute information structure. Return the value
2764 /// returned from the invocation of `manipulator` if `name` identifies
2765 /// an attribute of this class, and -1 otherwise.
2766 template<class MANIPULATOR>
2767 int manipulateAttribute(MANIPULATOR& manipulator,
2768 const char *name,
2769 int nameLength);
2770
2771 /// Return a reference to the modifiable "Name" attribute of this
2772 /// object.
2774
2775 /// Return a reference to the modifiable "Type" attribute of this
2776 /// object.
2778
2779 /// Return a reference to the modifiable "MinOccurs" attribute of this
2780 /// object.
2782
2783 /// Return a reference to the modifiable "MaxOccurs" attribute of this
2784 /// object.
2786
2787 /// Return a reference to the modifiable "DefaultValue" attribute of
2788 /// this object.
2790
2791 /// Return a reference to the modifiable "Cppdefault" attribute of this
2792 /// object.
2794
2795 /// Return a reference to the modifiable "Cpptype" attribute of this
2796 /// object.
2798
2799 /// Return a reference to the modifiable "AllocatesMemory" attribute of
2800 /// this object.
2802
2803 /// Return a reference to the modifiable "AllowsDirectManipulation"
2804 /// attribute of this object.
2806
2807 /// Return a reference to the modifiable "Choice" attribute of this
2808 /// object.
2810
2811 // ACCESSORS
2812
2813 /// Format this object to the specified output `stream` at the
2814 /// optionally specified indentation `level` and return a reference to
2815 /// the modifiable `stream`. If `level` is specified, optionally
2816 /// specify `spacesPerLevel`, the number of spaces per indentation level
2817 /// for this and all of its nested objects. Each line is indented by
2818 /// the absolute value of `level * spacesPerLevel`. If `level` is
2819 /// negative, suppress indentation of the first line. If
2820 /// `spacesPerLevel` is negative, suppress line breaks and format the
2821 /// entire output on one line. If `stream` is initially invalid, this
2822 /// operation has no effect. Note that a trailing newline is provided
2823 /// in multiline mode only.
2824 bsl::ostream& print(bsl::ostream& stream,
2825 int level = 0,
2826 int spacesPerLevel = 4) const;
2827
2828 /// Invoke the specified `accessor` sequentially on each
2829 /// (non-modifiable) attribute of this object, supplying `accessor`
2830 /// with the corresponding attribute information structure until such
2831 /// invocation returns a non-zero value. Return the value from the
2832 /// last invocation of `accessor` (i.e., the invocation that terminated
2833 /// the sequence).
2834 template<class ACCESSOR>
2835 int accessAttributes(ACCESSOR& accessor) const;
2836
2837 /// Invoke the specified `accessor` on the (non-modifiable) attribute
2838 /// of this object indicated by the specified `id`, supplying `accessor`
2839 /// with the corresponding attribute information structure. Return the
2840 /// value returned from the invocation of `accessor` if `id` identifies
2841 /// an attribute of this class, and -1 otherwise.
2842 template<class ACCESSOR>
2843 int accessAttribute(ACCESSOR& accessor, int id) const;
2844
2845 /// Invoke the specified `accessor` on the (non-modifiable) attribute
2846 /// of this object indicated by the specified `name` of the specified
2847 /// `nameLength`, supplying `accessor` with the corresponding attribute
2848 /// information structure. Return the value returned from the
2849 /// invocation of `accessor` if `name` identifies an attribute of this
2850 /// class, and -1 otherwise.
2851 template<class ACCESSOR>
2852 int accessAttribute(ACCESSOR& accessor,
2853 const char *name,
2854 int nameLength) const;
2855
2856 /// Return a reference to the non-modifiable "Name" attribute of this
2857 /// object.
2859
2860 /// Return a reference to the non-modifiable "Type" attribute of this
2861 /// object.
2863
2864 /// Return a reference to the non-modifiable "MinOccurs" attribute of
2865 /// this object.
2867
2868 /// Return a reference to the non-modifiable "MaxOccurs" attribute of
2869 /// this object.
2871
2872 /// Return a reference to the non-modifiable "DefaultValue" attribute of
2873 /// this object.
2875
2876 /// Return a reference to the non-modifiable "Cppdefault" attribute of
2877 /// this object.
2879
2880 /// Return a reference to the non-modifiable "Cpptype" attribute of this
2881 /// object.
2883
2884 /// Return a reference to the non-modifiable "AllocatesMemory" attribute
2885 /// of this object.
2887
2888 /// Return a reference to the non-modifiable "AllowsDirectManipulation"
2889 /// attribute of this object.
2891
2892 /// Return a reference to the non-modifiable "Choice" attribute of this
2893 /// object.
2895};
2896
2897// FREE OPERATORS
2898
2899/// Return `true` if the specified `lhs` and `rhs` attribute objects have
2900/// the same value, and `false` otherwise. Two attribute objects have the
2901/// same value if each respective attribute has the same value.
2902inline
2903bool operator==(const BasicSchemaElement& lhs, const BasicSchemaElement& rhs);
2904
2905/// Return `true` if the specified `lhs` and `rhs` attribute objects do not
2906/// have the same value, and `false` otherwise. Two attribute objects do
2907/// not have the same value if one or more respective attributes differ in
2908/// values.
2909inline
2910bool operator!=(const BasicSchemaElement& lhs, const BasicSchemaElement& rhs);
2911
2912/// Format the specified `rhs` to the specified output `stream` and
2913/// return a reference to the modifiable `stream`.
2914inline
2915bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaElement& rhs);
2916
2917/// Pass the specified `object` to the specified `hashAlg`. This function
2918/// integrates with the `bslh` modular hashing system and effectively
2919/// provides a `bsl::hash` specialization for `BasicSchemaElement`.
2920template <typename HASH_ALGORITHM>
2921void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaElement& object);
2922
2923} // close package namespace
2924
2925// TRAITS
2926
2928
2929namespace s_baltst {
2930
2931 // ==============================
2932 // class BasicSchemaElementChoice
2933 // ==============================
2934
2936
2937 // INSTANCE DATA
2938 union {
2942 };
2943
2944 int d_selectionId;
2945 bslma::Allocator *d_allocator_p;
2946
2947 public:
2948 // TYPES
2949
2950 enum {
2956
2957 enum {
2958 NUM_SELECTIONS = 3
2960
2961 enum {
2966
2967 // CONSTANTS
2968 static const char CLASS_NAME[];
2969
2971
2972 // CLASS METHODS
2973
2974 /// Return selection information for the selection indicated by the
2975 /// specified `id` if the selection exists, and 0 otherwise.
2977
2978 /// Return selection information for the selection indicated by the
2979 /// specified `name` of the specified `nameLength` if the selection
2980 /// exists, and 0 otherwise.
2982 const char *name,
2983 int nameLength);
2984
2985 // CREATORS
2986
2987 /// Create an object of type `BasicSchemaElementChoice` having the
2988 /// default value. Use the optionally specified `basicAllocator` to
2989 /// supply memory. If `basicAllocator` is 0, the currently installed
2990 /// default allocator is used.
2991 explicit BasicSchemaElementChoice(bslma::Allocator *basicAllocator = 0);
2992
2993 /// Create an object of type `BasicSchemaElementChoice` having the value
2994 /// of the specified `original` object. Use the optionally specified
2995 /// `basicAllocator` to supply memory. If `basicAllocator` is 0, the
2996 /// currently installed default allocator is used.
2998 bslma::Allocator *basicAllocator = 0);
2999
3000#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3001 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3002 /// Create an object of type `BasicSchemaElementChoice` having the value
3003 /// of the specified `original` object. After performing this action,
3004 /// the `original` object will be left in a valid, but unspecified
3005 /// state.
3007
3008 /// Create an object of type `BasicSchemaElementChoice` having the value
3009 /// of the specified `original` object. After performing this action,
3010 /// the `original` object will be left in a valid, but unspecified
3011 /// state. Use the optionally specified `basicAllocator` to supply
3012 /// memory. If `basicAllocator` is 0, the currently installed default
3013 /// allocator is used.
3015 bslma::Allocator *basicAllocator);
3016#endif
3017
3018 /// Destroy this object.
3020
3021 // MANIPULATORS
3022
3023 /// Assign to this object the value of the specified `rhs` object.
3025
3026#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3027 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3028 /// Assign to this object the value of the specified `rhs` object.
3029 /// After performing this action, the `rhs` object will be left in a
3030 /// valid, but unspecified state.
3032#endif
3033
3034 /// Reset this object to the default value (i.e., its value upon default
3035 /// construction).
3036 void reset();
3037
3038 /// Set the value of this object to be the default for the selection
3039 /// indicated by the specified `selectionId`. Return 0 on success, and
3040 /// non-zero value otherwise (i.e., the selection is not found).
3042
3043 /// Set the value of this object to be the default for the selection
3044 /// indicated by the specified `name` of the specified `nameLength`.
3045 /// Return 0 on success, and non-zero value otherwise (i.e., the
3046 /// selection is not found).
3047 int makeSelection(const char *name, int nameLength);
3048
3051#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3052 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3054#endif
3055 // Set the value of this object to be a "Annotation" value. Optionally
3056 // specify the 'value' of the "Annotation". If 'value' is not
3057 // specified, the default "Annotation" value is used.
3058
3061#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3062 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3064#endif
3065 // Set the value of this object to be a "SimpleType" value. Optionally
3066 // specify the 'value' of the "SimpleType". If 'value' is not
3067 // specified, the default "SimpleType" value is used.
3068
3071#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3072 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3074#endif
3075 // Set the value of this object to be a "ComplexType" value.
3076 // Optionally specify the 'value' of the "ComplexType". If 'value' is
3077 // not specified, the default "ComplexType" value is used.
3078
3079 /// Invoke the specified `manipulator` on the address of the modifiable
3080 /// selection, supplying `manipulator` with the corresponding selection
3081 /// information structure. Return the value returned from the
3082 /// invocation of `manipulator` if this object has a defined selection,
3083 /// and -1 otherwise.
3084 template<class MANIPULATOR>
3085 int manipulateSelection(MANIPULATOR& manipulator);
3086
3087 /// Return a reference to the modifiable "Annotation" selection of this
3088 /// object if "Annotation" is the current selection. The behavior is
3089 /// undefined unless "Annotation" is the selection of this object.
3091
3092 /// Return a reference to the modifiable "SimpleType" selection of this
3093 /// object if "SimpleType" is the current selection. The behavior is
3094 /// undefined unless "SimpleType" is the selection of this object.
3096
3097 /// Return a reference to the modifiable "ComplexType" selection of this
3098 /// object if "ComplexType" is the current selection. The behavior is
3099 /// undefined unless "ComplexType" is the selection of this object.
3101
3102 // ACCESSORS
3103
3104 /// Format this object to the specified output `stream` at the
3105 /// optionally specified indentation `level` and return a reference to
3106 /// the modifiable `stream`. If `level` is specified, optionally
3107 /// specify `spacesPerLevel`, the number of spaces per indentation level
3108 /// for this and all of its nested objects. Each line is indented by
3109 /// the absolute value of `level * spacesPerLevel`. If `level` is
3110 /// negative, suppress indentation of the first line. If
3111 /// `spacesPerLevel` is negative, suppress line breaks and format the
3112 /// entire output on one line. If `stream` is initially invalid, this
3113 /// operation has no effect. Note that a trailing newline is provided
3114 /// in multiline mode only.
3115 bsl::ostream& print(bsl::ostream& stream,
3116 int level = 0,
3117 int spacesPerLevel = 4) const;
3118
3119 /// Return the id of the current selection if the selection is defined,
3120 /// and -1 otherwise.
3121 int selectionId() const;
3122
3123 /// Invoke the specified `accessor` on the non-modifiable selection,
3124 /// supplying `accessor` with the corresponding selection information
3125 /// structure. Return the value returned from the invocation of
3126 /// `accessor` if this object has a defined selection, and -1 otherwise.
3127 template<class ACCESSOR>
3128 int accessSelection(ACCESSOR& accessor) const;
3129
3130 /// Return a reference to the non-modifiable "Annotation" selection of
3131 /// this object if "Annotation" is the current selection. The behavior
3132 /// is undefined unless "Annotation" is the selection of this object.
3134
3135 /// Return a reference to the non-modifiable "SimpleType" selection of
3136 /// this object if "SimpleType" is the current selection. The behavior
3137 /// is undefined unless "SimpleType" is the selection of this object.
3139
3140 /// Return a reference to the non-modifiable "ComplexType" selection of
3141 /// this object if "ComplexType" is the current selection. The behavior
3142 /// is undefined unless "ComplexType" is the selection of this object.
3144
3145 /// Return `true` if the value of this object is a "Annotation" value,
3146 /// and return `false` otherwise.
3147 bool isAnnotationValue() const;
3148
3149 /// Return `true` if the value of this object is a "SimpleType" value,
3150 /// and return `false` otherwise.
3151 bool isSimpleTypeValue() const;
3152
3153 /// Return `true` if the value of this object is a "ComplexType" value,
3154 /// and return `false` otherwise.
3155 bool isComplexTypeValue() const;
3156
3157 /// Return `true` if the value of this object is undefined, and `false`
3158 /// otherwise.
3159 bool isUndefinedValue() const;
3160
3161 /// Return the symbolic name of the current selection of this object.
3162 const char *selectionName() const;
3163};
3164
3165// FREE OPERATORS
3166
3167/// Return `true` if the specified `lhs` and `rhs` objects have the same
3168/// value, and `false` otherwise. Two `BasicSchemaElementChoice` objects have the same
3169/// value if either the selections in both objects have the same ids and
3170/// the same values, or both selections are undefined.
3171inline
3172bool operator==(const BasicSchemaElementChoice& lhs, const BasicSchemaElementChoice& rhs);
3173
3174/// Return `true` if the specified `lhs` and `rhs` objects do not have the
3175/// same values, as determined by `operator==`, and `false` otherwise.
3176inline
3177bool operator!=(const BasicSchemaElementChoice& lhs, const BasicSchemaElementChoice& rhs);
3178
3179/// Format the specified `rhs` to the specified output `stream` and
3180/// return a reference to the modifiable `stream`.
3181inline
3182bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaElementChoice& rhs);
3183
3184/// Pass the specified `object` to the specified `hashAlg`. This function
3185/// integrates with the `bslh` modular hashing system and effectively
3186/// provides a `bsl::hash` specialization for `BasicSchemaElementChoice`.
3187template <typename HASH_ALGORITHM>
3188void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaElementChoice& object);
3189
3190} // close package namespace
3191
3192// TRAITS
3193
3195
3196namespace s_baltst {
3197
3198 // ================================
3199 // class BasicSchemaSequenceElement
3200 // ================================
3201
3203
3204 // INSTANCE DATA
3206
3207 public:
3208 // TYPES
3209 enum {
3212
3213 enum {
3214 NUM_ATTRIBUTES = 1
3216
3217 enum {
3220
3221 // CONSTANTS
3222 static const char CLASS_NAME[];
3223
3225
3226 public:
3227 // CLASS METHODS
3228
3229 /// Return attribute information for the attribute indicated by the
3230 /// specified `id` if the attribute exists, and 0 otherwise.
3232
3233 /// Return attribute information for the attribute indicated by the
3234 /// specified `name` of the specified `nameLength` if the attribute
3235 /// exists, and 0 otherwise.
3237 const char *name,
3238 int nameLength);
3239
3240 // CREATORS
3241
3242 /// Create an object of type `BasicSchemaSequenceElement` having the
3243 /// default value. Use the optionally specified `basicAllocator` to
3244 /// supply memory. If `basicAllocator` is 0, the currently installed
3245 /// default allocator is used.
3246 explicit BasicSchemaSequenceElement(bslma::Allocator *basicAllocator = 0);
3247
3248 /// Create an object of type `BasicSchemaSequenceElement` having the
3249 /// value of the specified `original` object. Use the optionally
3250 /// specified `basicAllocator` to supply memory. If `basicAllocator` is
3251 /// 0, the currently installed default allocator is used.
3253 bslma::Allocator *basicAllocator = 0);
3254
3255#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3256 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3257 /// Create an object of type `BasicSchemaSequenceElement` having the
3258 /// value of the specified `original` object. After performing this
3259 /// action, the `original` object will be left in a valid, but
3260 /// unspecified state.
3262
3263 /// Create an object of type `BasicSchemaSequenceElement` having the
3264 /// value of the specified `original` object. After performing this
3265 /// action, the `original` object will be left in a valid, but
3266 /// unspecified state. Use the optionally specified `basicAllocator` to
3267 /// supply memory. If `basicAllocator` is 0, the currently installed
3268 /// default allocator is used.
3270 bslma::Allocator *basicAllocator);
3271#endif
3272
3273 /// Destroy this object.
3275
3276 // MANIPULATORS
3277
3278 /// Assign to this object the value of the specified `rhs` object.
3280
3281#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3282 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3283 /// Assign to this object the value of the specified `rhs` object.
3284 /// After performing this action, the `rhs` object will be left in a
3285 /// valid, but unspecified state.
3287#endif
3288
3289 /// Reset this object to the default value (i.e., its value upon
3290 /// default construction).
3291 void reset();
3292
3293 /// Invoke the specified `manipulator` sequentially on the address of
3294 /// each (modifiable) attribute of this object, supplying `manipulator`
3295 /// with the corresponding attribute information structure until such
3296 /// invocation returns a non-zero value. Return the value from the
3297 /// last invocation of `manipulator` (i.e., the invocation that
3298 /// terminated the sequence).
3299 template<class MANIPULATOR>
3300 int manipulateAttributes(MANIPULATOR& manipulator);
3301
3302 /// Invoke the specified `manipulator` on the address of
3303 /// the (modifiable) attribute indicated by the specified `id`,
3304 /// supplying `manipulator` with the corresponding attribute
3305 /// information structure. Return the value returned from the
3306 /// invocation of `manipulator` if `id` identifies an attribute of this
3307 /// class, and -1 otherwise.
3308 template<class MANIPULATOR>
3309 int manipulateAttribute(MANIPULATOR& manipulator, int id);
3310
3311 /// Invoke the specified `manipulator` on the address of
3312 /// the (modifiable) attribute indicated by the specified `name` of the
3313 /// specified `nameLength`, supplying `manipulator` with the
3314 /// corresponding attribute information structure. Return the value
3315 /// returned from the invocation of `manipulator` if `name` identifies
3316 /// an attribute of this class, and -1 otherwise.
3317 template<class MANIPULATOR>
3318 int manipulateAttribute(MANIPULATOR& manipulator,
3319 const char *name,
3320 int nameLength);
3321
3322 /// Return a reference to the modifiable "Choice" attribute of this
3323 /// object.
3325
3326 // ACCESSORS
3327
3328 /// Format this object to the specified output `stream` at the
3329 /// optionally specified indentation `level` and return a reference to
3330 /// the modifiable `stream`. If `level` is specified, optionally
3331 /// specify `spacesPerLevel`, the number of spaces per indentation level
3332 /// for this and all of its nested objects. Each line is indented by
3333 /// the absolute value of `level * spacesPerLevel`. If `level` is
3334 /// negative, suppress indentation of the first line. If
3335 /// `spacesPerLevel` is negative, suppress line breaks and format the
3336 /// entire output on one line. If `stream` is initially invalid, this
3337 /// operation has no effect. Note that a trailing newline is provided
3338 /// in multiline mode only.
3339 bsl::ostream& print(bsl::ostream& stream,
3340 int level = 0,
3341 int spacesPerLevel = 4) const;
3342
3343 /// Invoke the specified `accessor` sequentially on each
3344 /// (non-modifiable) attribute of this object, supplying `accessor`
3345 /// with the corresponding attribute information structure until such
3346 /// invocation returns a non-zero value. Return the value from the
3347 /// last invocation of `accessor` (i.e., the invocation that terminated
3348 /// the sequence).
3349 template<class ACCESSOR>
3350 int accessAttributes(ACCESSOR& accessor) const;
3351
3352 /// Invoke the specified `accessor` on the (non-modifiable) attribute
3353 /// of this object indicated by the specified `id`, supplying `accessor`
3354 /// with the corresponding attribute information structure. Return the
3355 /// value returned from the invocation of `accessor` if `id` identifies
3356 /// an attribute of this class, and -1 otherwise.
3357 template<class ACCESSOR>
3358 int accessAttribute(ACCESSOR& accessor, int id) const;
3359
3360 /// Invoke the specified `accessor` on the (non-modifiable) attribute
3361 /// of this object indicated by the specified `name` of the specified
3362 /// `nameLength`, supplying `accessor` with the corresponding attribute
3363 /// information structure. Return the value returned from the
3364 /// invocation of `accessor` if `name` identifies an attribute of this
3365 /// class, and -1 otherwise.
3366 template<class ACCESSOR>
3367 int accessAttribute(ACCESSOR& accessor,
3368 const char *name,
3369 int nameLength) const;
3370
3371 /// Return a reference to the non-modifiable "Choice" attribute of this
3372 /// object.
3374};
3375
3376// FREE OPERATORS
3377
3378/// Return `true` if the specified `lhs` and `rhs` attribute objects have
3379/// the same value, and `false` otherwise. Two attribute objects have the
3380/// same value if each respective attribute has the same value.
3381inline
3382bool operator==(const BasicSchemaSequenceElement& lhs, const BasicSchemaSequenceElement& rhs);
3383
3384/// Return `true` if the specified `lhs` and `rhs` attribute objects do not
3385/// have the same value, and `false` otherwise. Two attribute objects do
3386/// not have the same value if one or more respective attributes differ in
3387/// values.
3388inline
3389bool operator!=(const BasicSchemaSequenceElement& lhs, const BasicSchemaSequenceElement& rhs);
3390
3391/// Format the specified `rhs` to the specified output `stream` and
3392/// return a reference to the modifiable `stream`.
3393inline
3394bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaSequenceElement& rhs);
3395
3396/// Pass the specified `object` to the specified `hashAlg`. This function
3397/// integrates with the `bslh` modular hashing system and effectively
3398/// provides a `bsl::hash` specialization for `BasicSchemaSequenceElement`.
3399template <typename HASH_ALGORITHM>
3400void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaSequenceElement& object);
3401
3402} // close package namespace
3403
3404// TRAITS
3405
3407
3408namespace s_baltst {
3409
3410 // ======================================
3411 // class BasicSchemaSequenceElementChoice
3412 // ======================================
3413
3415
3416 // INSTANCE DATA
3417 union {
3420 };
3421
3422 int d_selectionId;
3423 bslma::Allocator *d_allocator_p;
3424
3425 public:
3426 // TYPES
3427
3428 enum {
3433
3434 enum {
3435 NUM_SELECTIONS = 2
3437
3438 enum {
3442
3443 // CONSTANTS
3444 static const char CLASS_NAME[];
3445
3447
3448 // CLASS METHODS
3449
3450 /// Return selection information for the selection indicated by the
3451 /// specified `id` if the selection exists, and 0 otherwise.
3453
3454 /// Return selection information for the selection indicated by the
3455 /// specified `name` of the specified `nameLength` if the selection
3456 /// exists, and 0 otherwise.
3458 const char *name,
3459 int nameLength);
3460
3461 // CREATORS
3462
3463 /// Create an object of type `BasicSchemaSequenceElementChoice` having
3464 /// the default value. Use the optionally specified `basicAllocator` to
3465 /// supply memory. If `basicAllocator` is 0, the currently installed
3466 /// default allocator is used.
3467 explicit BasicSchemaSequenceElementChoice(bslma::Allocator *basicAllocator = 0);
3468
3469 /// Create an object of type `BasicSchemaSequenceElementChoice` having
3470 /// the value of the specified `original` object. Use the optionally
3471 /// specified `basicAllocator` to supply memory. If `basicAllocator` is
3472 /// 0, the currently installed default allocator is used.
3474 bslma::Allocator *basicAllocator = 0);
3475
3476#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3477 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3478 /// Create an object of type `BasicSchemaSequenceElementChoice` having
3479 /// the value of the specified `original` object. After performing this
3480 /// action, the `original` object will be left in a valid, but
3481 /// unspecified state.
3483
3484 /// Create an object of type `BasicSchemaSequenceElementChoice` having
3485 /// the value of the specified `original` object. After performing this
3486 /// action, the `original` object will be left in a valid, but
3487 /// unspecified state. Use the optionally specified `basicAllocator` to
3488 /// supply memory. If `basicAllocator` is 0, the currently installed
3489 /// default allocator is used.
3491 bslma::Allocator *basicAllocator);
3492#endif
3493
3494 /// Destroy this object.
3496
3497 // MANIPULATORS
3498
3499 /// Assign to this object the value of the specified `rhs` object.
3501
3502#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3503 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3504 /// Assign to this object the value of the specified `rhs` object.
3505 /// After performing this action, the `rhs` object will be left in a
3506 /// valid, but unspecified state.
3508#endif
3509
3510 /// Reset this object to the default value (i.e., its value upon default
3511 /// construction).
3512 void reset();
3513
3514 /// Set the value of this object to be the default for the selection
3515 /// indicated by the specified `selectionId`. Return 0 on success, and
3516 /// non-zero value otherwise (i.e., the selection is not found).
3518
3519 /// Set the value of this object to be the default for the selection
3520 /// indicated by the specified `name` of the specified `nameLength`.
3521 /// Return 0 on success, and non-zero value otherwise (i.e., the
3522 /// selection is not found).
3523 int makeSelection(const char *name, int nameLength);
3524
3527#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3528 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3530#endif
3531 // Set the value of this object to be a "Annotation" value. Optionally
3532 // specify the 'value' of the "Annotation". If 'value' is not
3533 // specified, the default "Annotation" value is used.
3534
3537#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3538 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3540#endif
3541 // Set the value of this object to be a "Element" value. Optionally
3542 // specify the 'value' of the "Element". If 'value' is not specified,
3543 // the default "Element" value is used.
3544
3545 /// Invoke the specified `manipulator` on the address of the modifiable
3546 /// selection, supplying `manipulator` with the corresponding selection
3547 /// information structure. Return the value returned from the
3548 /// invocation of `manipulator` if this object has a defined selection,
3549 /// and -1 otherwise.
3550 template<class MANIPULATOR>
3551 int manipulateSelection(MANIPULATOR& manipulator);
3552
3553 /// Return a reference to the modifiable "Annotation" selection of this
3554 /// object if "Annotation" is the current selection. The behavior is
3555 /// undefined unless "Annotation" is the selection of this object.
3557
3558 /// Return a reference to the modifiable "Element" selection of this
3559 /// object if "Element" is the current selection. The behavior is
3560 /// undefined unless "Element" is the selection of this object.
3562
3563 // ACCESSORS
3564
3565 /// Format this object to the specified output `stream` at the
3566 /// optionally specified indentation `level` and return a reference to
3567 /// the modifiable `stream`. If `level` is specified, optionally
3568 /// specify `spacesPerLevel`, the number of spaces per indentation level
3569 /// for this and all of its nested objects. Each line is indented by
3570 /// the absolute value of `level * spacesPerLevel`. If `level` is
3571 /// negative, suppress indentation of the first line. If
3572 /// `spacesPerLevel` is negative, suppress line breaks and format the
3573 /// entire output on one line. If `stream` is initially invalid, this
3574 /// operation has no effect. Note that a trailing newline is provided
3575 /// in multiline mode only.
3576 bsl::ostream& print(bsl::ostream& stream,
3577 int level = 0,
3578 int spacesPerLevel = 4) const;
3579
3580 /// Return the id of the current selection if the selection is defined,
3581 /// and -1 otherwise.
3582 int selectionId() const;
3583
3584 /// Invoke the specified `accessor` on the non-modifiable selection,
3585 /// supplying `accessor` with the corresponding selection information
3586 /// structure. Return the value returned from the invocation of
3587 /// `accessor` if this object has a defined selection, and -1 otherwise.
3588 template<class ACCESSOR>
3589 int accessSelection(ACCESSOR& accessor) const;
3590
3591 /// Return a reference to the non-modifiable "Annotation" selection of
3592 /// this object if "Annotation" is the current selection. The behavior
3593 /// is undefined unless "Annotation" is the selection of this object.
3595
3596 /// Return a reference to the non-modifiable "Element" selection of this
3597 /// object if "Element" is the current selection. The behavior is
3598 /// undefined unless "Element" is the selection of this object.
3599 const BasicSchemaElement& element() const;
3600
3601 /// Return `true` if the value of this object is a "Annotation" value,
3602 /// and return `false` otherwise.
3603 bool isAnnotationValue() const;
3604
3605 /// Return `true` if the value of this object is a "Element" value, and
3606 /// return `false` otherwise.
3607 bool isElementValue() const;
3608
3609 /// Return `true` if the value of this object is undefined, and `false`
3610 /// otherwise.
3611 bool isUndefinedValue() const;
3612
3613 /// Return the symbolic name of the current selection of this object.
3614 const char *selectionName() const;
3615};
3616
3617// FREE OPERATORS
3618
3619/// Return `true` if the specified `lhs` and `rhs` objects have the same
3620/// value, and `false` otherwise. Two `BasicSchemaSequenceElementChoice` objects have the same
3621/// value if either the selections in both objects have the same ids and
3622/// the same values, or both selections are undefined.
3623inline
3625
3626/// Return `true` if the specified `lhs` and `rhs` objects do not have the
3627/// same values, as determined by `operator==`, and `false` otherwise.
3628inline
3630
3631/// Format the specified `rhs` to the specified output `stream` and
3632/// return a reference to the modifiable `stream`.
3633inline
3634bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaSequenceElementChoice& rhs);
3635
3636/// Pass the specified `object` to the specified `hashAlg`. This function
3637/// integrates with the `bslh` modular hashing system and effectively
3638/// provides a `bsl::hash` specialization for `BasicSchemaSequenceElementChoice`.
3639template <typename HASH_ALGORITHM>
3640void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaSequenceElementChoice& object);
3641
3642} // close package namespace
3643
3644// TRAITS
3645
3647
3648namespace s_baltst {
3649
3650 // =======================
3651 // class BasicSchemaChoice
3652 // =======================
3653
3655
3656 // INSTANCE DATA
3657 union {
3661 };
3662
3663 int d_selectionId;
3664 bslma::Allocator *d_allocator_p;
3665
3666 public:
3667 // TYPES
3668
3669 enum {
3675
3676 enum {
3677 NUM_SELECTIONS = 3
3679
3680 enum {
3685
3686 // CONSTANTS
3687 static const char CLASS_NAME[];
3688
3690
3691 // CLASS METHODS
3692
3693 /// Return selection information for the selection indicated by the
3694 /// specified `id` if the selection exists, and 0 otherwise.
3696
3697 /// Return selection information for the selection indicated by the
3698 /// specified `name` of the specified `nameLength` if the selection
3699 /// exists, and 0 otherwise.
3701 const char *name,
3702 int nameLength);
3703
3704 // CREATORS
3705
3706 /// Create an object of type `BasicSchemaChoice` having the default
3707 /// value. Use the optionally specified `basicAllocator` to supply
3708 /// memory. If `basicAllocator` is 0, the currently installed default
3709 /// allocator is used.
3710 explicit BasicSchemaChoice(bslma::Allocator *basicAllocator = 0);
3711
3712 /// Create an object of type `BasicSchemaChoice` having the value of the
3713 /// specified `original` object. Use the optionally specified
3714 /// `basicAllocator` to supply memory. If `basicAllocator` is 0, the
3715 /// currently installed default allocator is used.
3717 bslma::Allocator *basicAllocator = 0);
3718
3719#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3720 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3721 /// Create an object of type `BasicSchemaChoice` having the value of the
3722 /// specified `original` object. After performing this action, the
3723 /// `original` object will be left in a valid, but unspecified state.
3724 BasicSchemaChoice(BasicSchemaChoice&& original) noexcept;
3725
3726 /// Create an object of type `BasicSchemaChoice` having the value of the
3727 /// specified `original` object. After performing this action, the
3728 /// `original` object will be left in a valid, but unspecified state.
3729 /// Use the optionally specified `basicAllocator` to supply memory. If
3730 /// `basicAllocator` is 0, the currently installed default allocator is
3731 /// used.
3733 bslma::Allocator *basicAllocator);
3734#endif
3735
3736 /// Destroy this object.
3738
3739 // MANIPULATORS
3740
3741 /// Assign to this object the value of the specified `rhs` object.
3743
3744#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3745 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3746 /// Assign to this object the value of the specified `rhs` object.
3747 /// After performing this action, the `rhs` object will be left in a
3748 /// valid, but unspecified state.
3750#endif
3751
3752 /// Reset this object to the default value (i.e., its value upon default
3753 /// construction).
3754 void reset();
3755
3756 /// Set the value of this object to be the default for the selection
3757 /// indicated by the specified `selectionId`. Return 0 on success, and
3758 /// non-zero value otherwise (i.e., the selection is not found).
3760
3761 /// Set the value of this object to be the default for the selection
3762 /// indicated by the specified `name` of the specified `nameLength`.
3763 /// Return 0 on success, and non-zero value otherwise (i.e., the
3764 /// selection is not found).
3765 int makeSelection(const char *name, int nameLength);
3766
3769#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3770 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3772#endif
3773 // Set the value of this object to be a "Annotation" value. Optionally
3774 // specify the 'value' of the "Annotation". If 'value' is not
3775 // specified, the default "Annotation" value is used.
3776
3779#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3780 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3782#endif
3783 // Set the value of this object to be a "SimpleType" value. Optionally
3784 // specify the 'value' of the "SimpleType". If 'value' is not
3785 // specified, the default "SimpleType" value is used.
3786
3789#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3790 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3792#endif
3793 // Set the value of this object to be a "ComplexType" value.
3794 // Optionally specify the 'value' of the "ComplexType". If 'value' is
3795 // not specified, the default "ComplexType" value is used.
3796
3797 /// Invoke the specified `manipulator` on the address of the modifiable
3798 /// selection, supplying `manipulator` with the corresponding selection
3799 /// information structure. Return the value returned from the
3800 /// invocation of `manipulator` if this object has a defined selection,
3801 /// and -1 otherwise.
3802 template<class MANIPULATOR>
3803 int manipulateSelection(MANIPULATOR& manipulator);
3804
3805 /// Return a reference to the modifiable "Annotation" selection of this
3806 /// object if "Annotation" is the current selection. The behavior is
3807 /// undefined unless "Annotation" is the selection of this object.
3809
3810 /// Return a reference to the modifiable "SimpleType" selection of this
3811 /// object if "SimpleType" is the current selection. The behavior is
3812 /// undefined unless "SimpleType" is the selection of this object.
3814
3815 /// Return a reference to the modifiable "ComplexType" selection of this
3816 /// object if "ComplexType" is the current selection. The behavior is
3817 /// undefined unless "ComplexType" is the selection of this object.
3819
3820 // ACCESSORS
3821
3822 /// Format this object to the specified output `stream` at the
3823 /// optionally specified indentation `level` and return a reference to
3824 /// the modifiable `stream`. If `level` is specified, optionally
3825 /// specify `spacesPerLevel`, the number of spaces per indentation level
3826 /// for this and all of its nested objects. Each line is indented by
3827 /// the absolute value of `level * spacesPerLevel`. If `level` is
3828 /// negative, suppress indentation of the first line. If
3829 /// `spacesPerLevel` is negative, suppress line breaks and format the
3830 /// entire output on one line. If `stream` is initially invalid, this
3831 /// operation has no effect. Note that a trailing newline is provided
3832 /// in multiline mode only.
3833 bsl::ostream& print(bsl::ostream& stream,
3834 int level = 0,
3835 int spacesPerLevel = 4) const;
3836
3837 /// Return the id of the current selection if the selection is defined,
3838 /// and -1 otherwise.
3839 int selectionId() const;
3840
3841 /// Invoke the specified `accessor` on the non-modifiable selection,
3842 /// supplying `accessor` with the corresponding selection information
3843 /// structure. Return the value returned from the invocation of
3844 /// `accessor` if this object has a defined selection, and -1 otherwise.
3845 template<class ACCESSOR>
3846 int accessSelection(ACCESSOR& accessor) const;
3847
3848 /// Return a reference to the non-modifiable "Annotation" selection of
3849 /// this object if "Annotation" is the current selection. The behavior
3850 /// is undefined unless "Annotation" is the selection of this object.
3852
3853 /// Return a reference to the non-modifiable "SimpleType" selection of
3854 /// this object if "SimpleType" is the current selection. The behavior
3855 /// is undefined unless "SimpleType" is the selection of this object.
3857
3858 /// Return a reference to the non-modifiable "ComplexType" selection of
3859 /// this object if "ComplexType" is the current selection. The behavior
3860 /// is undefined unless "ComplexType" is the selection of this object.
3862
3863 /// Return `true` if the value of this object is a "Annotation" value,
3864 /// and return `false` otherwise.
3865 bool isAnnotationValue() const;
3866
3867 /// Return `true` if the value of this object is a "SimpleType" value,
3868 /// and return `false` otherwise.
3869 bool isSimpleTypeValue() const;
3870
3871 /// Return `true` if the value of this object is a "ComplexType" value,
3872 /// and return `false` otherwise.
3873 bool isComplexTypeValue() const;
3874
3875 /// Return `true` if the value of this object is undefined, and `false`
3876 /// otherwise.
3877 bool isUndefinedValue() const;
3878
3879 /// Return the symbolic name of the current selection of this object.
3880 const char *selectionName() const;
3881};
3882
3883// FREE OPERATORS
3884
3885/// Return `true` if the specified `lhs` and `rhs` objects have the same
3886/// value, and `false` otherwise. Two `BasicSchemaChoice` objects have the same
3887/// value if either the selections in both objects have the same ids and
3888/// the same values, or both selections are undefined.
3889inline
3890bool operator==(const BasicSchemaChoice& lhs, const BasicSchemaChoice& rhs);
3891
3892/// Return `true` if the specified `lhs` and `rhs` objects do not have the
3893/// same values, as determined by `operator==`, and `false` otherwise.
3894inline
3895bool operator!=(const BasicSchemaChoice& lhs, const BasicSchemaChoice& rhs);
3896
3897/// Format the specified `rhs` to the specified output `stream` and
3898/// return a reference to the modifiable `stream`.
3899inline
3900bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchemaChoice& rhs);
3901
3902/// Pass the specified `object` to the specified `hashAlg`. This function
3903/// integrates with the `bslh` modular hashing system and effectively
3904/// provides a `bsl::hash` specialization for `BasicSchemaChoice`.
3905template <typename HASH_ALGORITHM>
3906void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaChoice& object);
3907
3908} // close package namespace
3909
3910// TRAITS
3911
3913
3914namespace s_baltst {
3915
3916 // =================
3917 // class BasicSchema
3918 // =================
3919
3921
3922 // INSTANCE DATA
3927 bdlb::NullableValue<bsl::string> d_elementFormDefault;
3928
3929 public:
3930 // TYPES
3931 enum {
3932 ATTRIBUTE_ID_XS = 0
3938
3939 enum {
3940 NUM_ATTRIBUTES = 5
3942
3943 enum {
3950
3951 // CONSTANTS
3952 static const char CLASS_NAME[];
3953
3955
3956 public:
3957 // CLASS METHODS
3958
3959 /// Return attribute information for the attribute indicated by the
3960 /// specified `id` if the attribute exists, and 0 otherwise.
3962
3963 /// Return attribute information for the attribute indicated by the
3964 /// specified `name` of the specified `nameLength` if the attribute
3965 /// exists, and 0 otherwise.
3967 const char *name,
3968 int nameLength);
3969
3970 // CREATORS
3971
3972 /// Create an object of type `BasicSchema` having the default value.
3973 /// Use the optionally specified `basicAllocator` to supply memory. If
3974 /// `basicAllocator` is 0, the currently installed default allocator is
3975 /// used.
3976 explicit BasicSchema(bslma::Allocator *basicAllocator = 0);
3977
3978 /// Create an object of type `BasicSchema` having the value of the
3979 /// specified `original` object. Use the optionally specified
3980 /// `basicAllocator` to supply memory. If `basicAllocator` is 0, the
3981 /// currently installed default allocator is used.
3982 BasicSchema(const BasicSchema& original,
3983 bslma::Allocator *basicAllocator = 0);
3984
3985#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
3986 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
3987 /// Create an object of type `BasicSchema` having the value of the
3988 /// specified `original` object. After performing this action, the
3989 /// `original` object will be left in a valid, but unspecified state.
3990 BasicSchema(BasicSchema&& original) noexcept;
3991
3992 /// Create an object of type `BasicSchema` having the value of the
3993 /// specified `original` object. After performing this action, the
3994 /// `original` object will be left in a valid, but unspecified state.
3995 /// Use the optionally specified `basicAllocator` to supply memory. If
3996 /// `basicAllocator` is 0, the currently installed default allocator is
3997 /// used.
3998 BasicSchema(BasicSchema&& original,
3999 bslma::Allocator *basicAllocator);
4000#endif
4001
4002 /// Destroy this object.
4004
4005 // MANIPULATORS
4006
4007 /// Assign to this object the value of the specified `rhs` object.
4009
4010#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
4011 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
4012 /// Assign to this object the value of the specified `rhs` object.
4013 /// After performing this action, the `rhs` object will be left in a
4014 /// valid, but unspecified state.
4016#endif
4017
4018 /// Reset this object to the default value (i.e., its value upon
4019 /// default construction).
4020 void reset();
4021
4022 /// Invoke the specified `manipulator` sequentially on the address of
4023 /// each (modifiable) attribute of this object, supplying `manipulator`
4024 /// with the corresponding attribute information structure until such
4025 /// invocation returns a non-zero value. Return the value from the
4026 /// last invocation of `manipulator` (i.e., the invocation that
4027 /// terminated the sequence).
4028 template<class MANIPULATOR>
4029 int manipulateAttributes(MANIPULATOR& manipulator);
4030
4031 /// Invoke the specified `manipulator` on the address of
4032 /// the (modifiable) attribute indicated by the specified `id`,
4033 /// supplying `manipulator` with the corresponding attribute
4034 /// information structure. Return the value returned from the
4035 /// invocation of `manipulator` if `id` identifies an attribute of this
4036 /// class, and -1 otherwise.
4037 template<class MANIPULATOR>
4038 int manipulateAttribute(MANIPULATOR& manipulator, int id);
4039
4040 /// Invoke the specified `manipulator` on the address of
4041 /// the (modifiable) attribute indicated by the specified `name` of the
4042 /// specified `nameLength`, supplying `manipulator` with the
4043 /// corresponding attribute information structure. Return the value
4044 /// returned from the invocation of `manipulator` if `name` identifies
4045 /// an attribute of this class, and -1 otherwise.
4046 template<class MANIPULATOR>
4047 int manipulateAttribute(MANIPULATOR& manipulator,
4048 const char *name,
4049 int nameLength);
4050
4051 /// Return a reference to the modifiable "Xs" attribute of this object.
4053
4054 /// Return a reference to the modifiable "Bdem" attribute of this
4055 /// object.
4057
4058 /// Return a reference to the modifiable "Package" attribute of this
4059 /// object.
4061
4062 /// Return a reference to the modifiable "ElementFormDefault" attribute
4063 /// of this object.
4065
4066 /// Return a reference to the modifiable "Choice" attribute of this
4067 /// object.
4069
4070 // ACCESSORS
4071
4072 /// Format this object to the specified output `stream` at the
4073 /// optionally specified indentation `level` and return a reference to
4074 /// the modifiable `stream`. If `level` is specified, optionally
4075 /// specify `spacesPerLevel`, the number of spaces per indentation level
4076 /// for this and all of its nested objects. Each line is indented by
4077 /// the absolute value of `level * spacesPerLevel`. If `level` is
4078 /// negative, suppress indentation of the first line. If
4079 /// `spacesPerLevel` is negative, suppress line breaks and format the
4080 /// entire output on one line. If `stream` is initially invalid, this
4081 /// operation has no effect. Note that a trailing newline is provided
4082 /// in multiline mode only.
4083 bsl::ostream& print(bsl::ostream& stream,
4084 int level = 0,
4085 int spacesPerLevel = 4) const;
4086
4087 /// Invoke the specified `accessor` sequentially on each
4088 /// (non-modifiable) attribute of this object, supplying `accessor`
4089 /// with the corresponding attribute information structure until such
4090 /// invocation returns a non-zero value. Return the value from the
4091 /// last invocation of `accessor` (i.e., the invocation that terminated
4092 /// the sequence).
4093 template<class ACCESSOR>
4094 int accessAttributes(ACCESSOR& accessor) const;
4095
4096 /// Invoke the specified `accessor` on the (non-modifiable) attribute
4097 /// of this object indicated by the specified `id`, supplying `accessor`
4098 /// with the corresponding attribute information structure. Return the
4099 /// value returned from the invocation of `accessor` if `id` identifies
4100 /// an attribute of this class, and -1 otherwise.
4101 template<class ACCESSOR>
4102 int accessAttribute(ACCESSOR& accessor, int id) const;
4103
4104 /// Invoke the specified `accessor` on the (non-modifiable) attribute
4105 /// of this object indicated by the specified `name` of the specified
4106 /// `nameLength`, supplying `accessor` with the corresponding attribute
4107 /// information structure. Return the value returned from the
4108 /// invocation of `accessor` if `name` identifies an attribute of this
4109 /// class, and -1 otherwise.
4110 template<class ACCESSOR>
4111 int accessAttribute(ACCESSOR& accessor,
4112 const char *name,
4113 int nameLength) const;
4114
4115 /// Return a reference to the non-modifiable "Xs" attribute of this
4116 /// object.
4117 const bdlb::NullableValue<bsl::string>& xs() const;
4118
4119 /// Return a reference to the non-modifiable "Bdem" attribute of this
4120 /// object.
4122
4123 /// Return a reference to the non-modifiable "Package" attribute of this
4124 /// object.
4126
4127 /// Return a reference to the non-modifiable "ElementFormDefault"
4128 /// attribute of this object.
4130
4131 /// Return a reference to the non-modifiable "Choice" attribute of this
4132 /// object.
4134};
4135
4136// FREE OPERATORS
4137
4138/// Return `true` if the specified `lhs` and `rhs` attribute objects have
4139/// the same value, and `false` otherwise. Two attribute objects have the
4140/// same value if each respective attribute has the same value.
4141inline
4142bool operator==(const BasicSchema& lhs, const BasicSchema& rhs);
4143
4144/// Return `true` if the specified `lhs` and `rhs` attribute objects do not
4145/// have the same value, and `false` otherwise. Two attribute objects do
4146/// not have the same value if one or more respective attributes differ in
4147/// values.
4148inline
4149bool operator!=(const BasicSchema& lhs, const BasicSchema& rhs);
4150
4151/// Format the specified `rhs` to the specified output `stream` and
4152/// return a reference to the modifiable `stream`.
4153inline
4154bsl::ostream& operator<<(bsl::ostream& stream, const BasicSchema& rhs);
4155
4156/// Pass the specified `object` to the specified `hashAlg`. This function
4157/// integrates with the `bslh` modular hashing system and effectively
4158/// provides a `bsl::hash` specialization for `BasicSchema`.
4159template <typename HASH_ALGORITHM>
4160void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchema& object);
4161
4162} // close package namespace
4163
4164// TRAITS
4165
4167
4168// ============================================================================
4169// INLINE FUNCTION DEFINITIONS
4170// ============================================================================
4171
4172namespace s_baltst {
4173
4174 // ----------------------------------
4175 // class BasicSchemaAnnotationElement
4176 // ----------------------------------
4177
4178// CLASS METHODS
4179// MANIPULATORS
4180template <class MANIPULATOR>
4182{
4183 int ret;
4184
4185 ret = manipulator(&d_documentation, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOCUMENTATION]);
4186 if (ret) {
4187 return ret;
4188 }
4189
4190 return ret;
4191}
4192
4193template <class MANIPULATOR>
4194int BasicSchemaAnnotationElement::manipulateAttribute(MANIPULATOR& manipulator, int id)
4195{
4196 enum { NOT_FOUND = -1 };
4197
4198 switch (id) {
4200 return manipulator(&d_documentation, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOCUMENTATION]);
4201 }
4202 default:
4203 return NOT_FOUND;
4204 }
4205}
4206
4207template <class MANIPULATOR>
4209 MANIPULATOR& manipulator,
4210 const char *name,
4211 int nameLength)
4212{
4213 enum { NOT_FOUND = -1 };
4214
4215 const bdlat_AttributeInfo *attributeInfo =
4216 lookupAttributeInfo(name, nameLength);
4217 if (0 == attributeInfo) {
4218 return NOT_FOUND;
4219 }
4220
4221 return manipulateAttribute(manipulator, attributeInfo->d_id);
4222}
4223
4224inline
4229
4230// ACCESSORS
4231template <class ACCESSOR>
4233{
4234 int ret;
4235
4236 ret = accessor(d_documentation, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOCUMENTATION]);
4237 if (ret) {
4238 return ret;
4239 }
4240
4241 return ret;
4242}
4243
4244template <class ACCESSOR>
4245int BasicSchemaAnnotationElement::accessAttribute(ACCESSOR& accessor, int id) const
4246{
4247 enum { NOT_FOUND = -1 };
4248
4249 switch (id) {
4251 return accessor(d_documentation, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOCUMENTATION]);
4252 }
4253 default:
4254 return NOT_FOUND;
4255 }
4256}
4257
4258template <class ACCESSOR>
4260 ACCESSOR& accessor,
4261 const char *name,
4262 int nameLength) const
4263{
4264 enum { NOT_FOUND = -1 };
4265
4266 const bdlat_AttributeInfo *attributeInfo =
4267 lookupAttributeInfo(name, nameLength);
4268 if (0 == attributeInfo) {
4269 return NOT_FOUND;
4270 }
4271
4272 return accessAttribute(accessor, attributeInfo->d_id);
4273}
4274
4275inline
4277{
4278 return d_documentation;
4279}
4280
4281template <typename HASH_ALGORITHM>
4282void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaAnnotationElement& object)
4283{
4284 (void)hashAlg;
4285 (void)object;
4286 using bslh::hashAppend;
4287 hashAppend(hashAlg, object.documentation());
4288}
4289
4290
4291
4292 // -----------------------------------------
4293 // class BasicSchemaEnumerationElementChoice
4294 // -----------------------------------------
4295
4296// CLASS METHODS
4297// CREATORS
4298inline
4300: d_selectionId(SELECTION_ID_UNDEFINED)
4301, d_allocator_p(bslma::Default::allocator(basicAllocator))
4302{
4303}
4304
4305inline
4310
4311// MANIPULATORS
4312template <class MANIPULATOR>
4314{
4315 switch (d_selectionId) {
4317 return manipulator(&d_annotation.object(),
4319 default:
4321 return -1;
4322 }
4323}
4324
4325inline
4331
4332// ACCESSORS
4333inline
4335{
4336 return d_selectionId;
4337}
4338
4339template <class ACCESSOR>
4341{
4342 switch (d_selectionId) {
4344 return accessor(d_annotation.object(),
4346 default:
4347 BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
4348 return -1;
4349 }
4350}
4351
4352inline
4358
4359inline
4361{
4362 return SELECTION_ID_ANNOTATION == d_selectionId;
4363}
4364
4365inline
4367{
4368 return SELECTION_ID_UNDEFINED == d_selectionId;
4369}
4370
4371template <typename HASH_ALGORITHM>
4372void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaEnumerationElementChoice& object)
4373{
4375 using bslh::hashAppend;
4376 hashAppend(hashAlg, object.selectionId());
4377 switch (object.selectionId()) {
4378 case Class::SELECTION_ID_ANNOTATION:
4379 hashAppend(hashAlg, object.annotation());
4380 break;
4381 default:
4382 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == object.selectionId());
4383 }
4384}
4385
4386
4387 // -----------------------------------
4388 // class BasicSchemaEnumerationElement
4389 // -----------------------------------
4390
4391// CLASS METHODS
4392// MANIPULATORS
4393template <class MANIPULATOR>
4395{
4396 int ret;
4397
4398 ret = manipulator(&d_value, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VALUE]);
4399 if (ret) {
4400 return ret;
4401 }
4402
4403 ret = manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
4404 if (ret) {
4405 return ret;
4406 }
4407
4408 return ret;
4409}
4410
4411template <class MANIPULATOR>
4412int BasicSchemaEnumerationElement::manipulateAttribute(MANIPULATOR& manipulator, int id)
4413{
4414 enum { NOT_FOUND = -1 };
4415
4416 switch (id) {
4417 case ATTRIBUTE_ID_VALUE: {
4418 return manipulator(&d_value, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VALUE]);
4419 }
4420 case ATTRIBUTE_ID_CHOICE: {
4421 return manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
4422 }
4423 default:
4424 return NOT_FOUND;
4425 }
4426}
4427
4428template <class MANIPULATOR>
4430 MANIPULATOR& manipulator,
4431 const char *name,
4432 int nameLength)
4433{
4434 enum { NOT_FOUND = -1 };
4435
4436 const bdlat_AttributeInfo *attributeInfo =
4437 lookupAttributeInfo(name, nameLength);
4438 if (0 == attributeInfo) {
4439 return NOT_FOUND;
4440 }
4441
4442 return manipulateAttribute(manipulator, attributeInfo->d_id);
4443}
4444
4445inline
4450
4451inline
4456
4457// ACCESSORS
4458template <class ACCESSOR>
4460{
4461 int ret;
4462
4463 ret = accessor(d_value, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VALUE]);
4464 if (ret) {
4465 return ret;
4466 }
4467
4468 ret = accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
4469 if (ret) {
4470 return ret;
4471 }
4472
4473 return ret;
4474}
4475
4476template <class ACCESSOR>
4477int BasicSchemaEnumerationElement::accessAttribute(ACCESSOR& accessor, int id) const
4478{
4479 enum { NOT_FOUND = -1 };
4480
4481 switch (id) {
4482 case ATTRIBUTE_ID_VALUE: {
4483 return accessor(d_value, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VALUE]);
4484 }
4485 case ATTRIBUTE_ID_CHOICE: {
4486 return accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
4487 }
4488 default:
4489 return NOT_FOUND;
4490 }
4491}
4492
4493template <class ACCESSOR>
4495 ACCESSOR& accessor,
4496 const char *name,
4497 int nameLength) const
4498{
4499 enum { NOT_FOUND = -1 };
4500
4501 const bdlat_AttributeInfo *attributeInfo =
4502 lookupAttributeInfo(name, nameLength);
4503 if (0 == attributeInfo) {
4504 return NOT_FOUND;
4505 }
4506
4507 return accessAttribute(accessor, attributeInfo->d_id);
4508}
4509
4510inline
4512{
4513 return d_value;
4514}
4515
4516inline
4521
4522template <typename HASH_ALGORITHM>
4523void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaEnumerationElement& object)
4524{
4525 (void)hashAlg;
4526 (void)object;
4527 using bslh::hashAppend;
4528 hashAppend(hashAlg, object.value());
4529 hashAppend(hashAlg, object.choice());
4530}
4531
4532
4533
4534 // -----------------------------------------
4535 // class BasicSchemaRestrictionElementChoice
4536 // -----------------------------------------
4537
4538// CLASS METHODS
4539// CREATORS
4540inline
4542: d_selectionId(SELECTION_ID_UNDEFINED)
4543, d_allocator_p(bslma::Default::allocator(basicAllocator))
4544{
4545}
4546
4547inline
4552
4553// MANIPULATORS
4554template <class MANIPULATOR>
4556{
4557 switch (d_selectionId) {
4559 return manipulator(&d_annotation.object(),
4562 return manipulator(&d_enumeration.object(),
4564 default:
4566 return -1;
4567 }
4568}
4569
4570inline
4576
4577inline
4583
4584// ACCESSORS
4585inline
4587{
4588 return d_selectionId;
4589}
4590
4591template <class ACCESSOR>
4593{
4594 switch (d_selectionId) {
4596 return accessor(d_annotation.object(),
4599 return accessor(d_enumeration.object(),
4601 default:
4602 BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
4603 return -1;
4604 }
4605}
4606
4607inline
4613
4614inline
4620
4621inline
4623{
4624 return SELECTION_ID_ANNOTATION == d_selectionId;
4625}
4626
4627inline
4629{
4630 return SELECTION_ID_ENUMERATION == d_selectionId;
4631}
4632
4633inline
4635{
4636 return SELECTION_ID_UNDEFINED == d_selectionId;
4637}
4638
4639template <typename HASH_ALGORITHM>
4640void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaRestrictionElementChoice& object)
4641{
4643 using bslh::hashAppend;
4644 hashAppend(hashAlg, object.selectionId());
4645 switch (object.selectionId()) {
4646 case Class::SELECTION_ID_ANNOTATION:
4647 hashAppend(hashAlg, object.annotation());
4648 break;
4649 case Class::SELECTION_ID_ENUMERATION:
4650 hashAppend(hashAlg, object.enumeration());
4651 break;
4652 default:
4653 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == object.selectionId());
4654 }
4655}
4656
4657
4658 // -----------------------------------
4659 // class BasicSchemaRestrictionElement
4660 // -----------------------------------
4661
4662// CLASS METHODS
4663// MANIPULATORS
4664template <class MANIPULATOR>
4666{
4667 int ret;
4668
4669 ret = manipulator(&d_base, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BASE]);
4670 if (ret) {
4671 return ret;
4672 }
4673
4674 ret = manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
4675 if (ret) {
4676 return ret;
4677 }
4678
4679 return ret;
4680}
4681
4682template <class MANIPULATOR>
4683int BasicSchemaRestrictionElement::manipulateAttribute(MANIPULATOR& manipulator, int id)
4684{
4685 enum { NOT_FOUND = -1 };
4686
4687 switch (id) {
4688 case ATTRIBUTE_ID_BASE: {
4689 return manipulator(&d_base, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BASE]);
4690 }
4691 case ATTRIBUTE_ID_CHOICE: {
4692 return manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
4693 }
4694 default:
4695 return NOT_FOUND;
4696 }
4697}
4698
4699template <class MANIPULATOR>
4701 MANIPULATOR& manipulator,
4702 const char *name,
4703 int nameLength)
4704{
4705 enum { NOT_FOUND = -1 };
4706
4707 const bdlat_AttributeInfo *attributeInfo =
4708 lookupAttributeInfo(name, nameLength);
4709 if (0 == attributeInfo) {
4710 return NOT_FOUND;
4711 }
4712
4713 return manipulateAttribute(manipulator, attributeInfo->d_id);
4714}
4715
4716inline
4721
4722inline
4727
4728// ACCESSORS
4729template <class ACCESSOR>
4731{
4732 int ret;
4733
4734 ret = accessor(d_base, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BASE]);
4735 if (ret) {
4736 return ret;
4737 }
4738
4739 ret = accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
4740 if (ret) {
4741 return ret;
4742 }
4743
4744 return ret;
4745}
4746
4747template <class ACCESSOR>
4748int BasicSchemaRestrictionElement::accessAttribute(ACCESSOR& accessor, int id) const
4749{
4750 enum { NOT_FOUND = -1 };
4751
4752 switch (id) {
4753 case ATTRIBUTE_ID_BASE: {
4754 return accessor(d_base, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BASE]);
4755 }
4756 case ATTRIBUTE_ID_CHOICE: {
4757 return accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
4758 }
4759 default:
4760 return NOT_FOUND;
4761 }
4762}
4763
4764template <class ACCESSOR>
4766 ACCESSOR& accessor,
4767 const char *name,
4768 int nameLength) const
4769{
4770 enum { NOT_FOUND = -1 };
4771
4772 const bdlat_AttributeInfo *attributeInfo =
4773 lookupAttributeInfo(name, nameLength);
4774 if (0 == attributeInfo) {
4775 return NOT_FOUND;
4776 }
4777
4778 return accessAttribute(accessor, attributeInfo->d_id);
4779}
4780
4781inline
4783{
4784 return d_base;
4785}
4786
4787inline
4792
4793template <typename HASH_ALGORITHM>
4794void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaRestrictionElement& object)
4795{
4796 (void)hashAlg;
4797 (void)object;
4798 using bslh::hashAppend;
4799 hashAppend(hashAlg, object.base());
4800 hashAppend(hashAlg, object.choice());
4801}
4802
4803
4804
4805 // ----------------------------------------
4806 // class BasicSchemaSimpleTypeElementChoice
4807 // ----------------------------------------
4808
4809// CLASS METHODS
4810// CREATORS
4811inline
4813: d_selectionId(SELECTION_ID_UNDEFINED)
4814, d_allocator_p(bslma::Default::allocator(basicAllocator))
4815{
4816}
4817
4818inline
4823
4824// MANIPULATORS
4825template <class MANIPULATOR>
4827{
4828 switch (d_selectionId) {
4830 return manipulator(&d_annotation.object(),
4833 return manipulator(&d_restriction.object(),
4835 default:
4837 return -1;
4838 }
4839}
4840
4841inline
4847
4848inline
4854
4855// ACCESSORS
4856inline
4858{
4859 return d_selectionId;
4860}
4861
4862template <class ACCESSOR>
4864{
4865 switch (d_selectionId) {
4867 return accessor(d_annotation.object(),
4870 return accessor(d_restriction.object(),
4872 default:
4873 BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
4874 return -1;
4875 }
4876}
4877
4878inline
4884
4885inline
4891
4892inline
4894{
4895 return SELECTION_ID_ANNOTATION == d_selectionId;
4896}
4897
4898inline
4900{
4901 return SELECTION_ID_RESTRICTION == d_selectionId;
4902}
4903
4904inline
4906{
4907 return SELECTION_ID_UNDEFINED == d_selectionId;
4908}
4909
4910template <typename HASH_ALGORITHM>
4911void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaSimpleTypeElementChoice& object)
4912{
4914 using bslh::hashAppend;
4915 hashAppend(hashAlg, object.selectionId());
4916 switch (object.selectionId()) {
4917 case Class::SELECTION_ID_ANNOTATION:
4918 hashAppend(hashAlg, object.annotation());
4919 break;
4920 case Class::SELECTION_ID_RESTRICTION:
4921 hashAppend(hashAlg, object.restriction());
4922 break;
4923 default:
4924 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == object.selectionId());
4925 }
4926}
4927
4928
4929 // ----------------------------------
4930 // class BasicSchemaSimpleTypeElement
4931 // ----------------------------------
4932
4933// CLASS METHODS
4934// MANIPULATORS
4935template <class MANIPULATOR>
4937{
4938 int ret;
4939
4940 ret = manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]);
4941 if (ret) {
4942 return ret;
4943 }
4944
4945 ret = manipulator(&d_preserveEnumOrder, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRESERVE_ENUM_ORDER]);
4946 if (ret) {
4947 return ret;
4948 }
4949
4950 ret = manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
4951 if (ret) {
4952 return ret;
4953 }
4954
4955 return ret;
4956}
4957
4958template <class MANIPULATOR>
4959int BasicSchemaSimpleTypeElement::manipulateAttribute(MANIPULATOR& manipulator, int id)
4960{
4961 enum { NOT_FOUND = -1 };
4962
4963 switch (id) {
4964 case ATTRIBUTE_ID_NAME: {
4965 return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]);
4966 }
4968 return manipulator(&d_preserveEnumOrder, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRESERVE_ENUM_ORDER]);
4969 }
4970 case ATTRIBUTE_ID_CHOICE: {
4971 return manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
4972 }
4973 default:
4974 return NOT_FOUND;
4975 }
4976}
4977
4978template <class MANIPULATOR>
4980 MANIPULATOR& manipulator,
4981 const char *name,
4982 int nameLength)
4983{
4984 enum { NOT_FOUND = -1 };
4985
4986 const bdlat_AttributeInfo *attributeInfo =
4987 lookupAttributeInfo(name, nameLength);
4988 if (0 == attributeInfo) {
4989 return NOT_FOUND;
4990 }
4991
4992 return manipulateAttribute(manipulator, attributeInfo->d_id);
4993}
4994
4995inline
5000
5001inline
5006
5007inline
5012
5013// ACCESSORS
5014template <class ACCESSOR>
5016{
5017 int ret;
5018
5019 ret = accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]);
5020 if (ret) {
5021 return ret;
5022 }
5023
5024 ret = accessor(d_preserveEnumOrder, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRESERVE_ENUM_ORDER]);
5025 if (ret) {
5026 return ret;
5027 }
5028
5029 ret = accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
5030 if (ret) {
5031 return ret;
5032 }
5033
5034 return ret;
5035}
5036
5037template <class ACCESSOR>
5038int BasicSchemaSimpleTypeElement::accessAttribute(ACCESSOR& accessor, int id) const
5039{
5040 enum { NOT_FOUND = -1 };
5041
5042 switch (id) {
5043 case ATTRIBUTE_ID_NAME: {
5044 return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]);
5045 }
5047 return accessor(d_preserveEnumOrder, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRESERVE_ENUM_ORDER]);
5048 }
5049 case ATTRIBUTE_ID_CHOICE: {
5050 return accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
5051 }
5052 default:
5053 return NOT_FOUND;
5054 }
5055}
5056
5057template <class ACCESSOR>
5059 ACCESSOR& accessor,
5060 const char *name,
5061 int nameLength) const
5062{
5063 enum { NOT_FOUND = -1 };
5064
5065 const bdlat_AttributeInfo *attributeInfo =
5066 lookupAttributeInfo(name, nameLength);
5067 if (0 == attributeInfo) {
5068 return NOT_FOUND;
5069 }
5070
5071 return accessAttribute(accessor, attributeInfo->d_id);
5072}
5073
5074inline
5076{
5077 return d_name;
5078}
5079
5080inline
5082{
5083 return d_preserveEnumOrder;
5084}
5085
5086inline
5091
5092template <typename HASH_ALGORITHM>
5093void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaSimpleTypeElement& object)
5094{
5095 (void)hashAlg;
5096 (void)object;
5097 using bslh::hashAppend;
5098 hashAppend(hashAlg, object.name());
5099 hashAppend(hashAlg, object.preserveEnumOrder());
5100 hashAppend(hashAlg, object.choice());
5101}
5102
5103
5104
5105 // ------------------------------
5106 // class BasicSchemaChoiceElement
5107 // ------------------------------
5108
5109// CLASS METHODS
5110// MANIPULATORS
5111template <class MANIPULATOR>
5113{
5114 int ret;
5115
5116 ret = manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
5117 if (ret) {
5118 return ret;
5119 }
5120
5121 return ret;
5122}
5123
5124template <class MANIPULATOR>
5125int BasicSchemaChoiceElement::manipulateAttribute(MANIPULATOR& manipulator, int id)
5126{
5127 enum { NOT_FOUND = -1 };
5128
5129 switch (id) {
5130 case ATTRIBUTE_ID_CHOICE: {
5131 return manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
5132 }
5133 default:
5134 return NOT_FOUND;
5135 }
5136}
5137
5138template <class MANIPULATOR>
5140 MANIPULATOR& manipulator,
5141 const char *name,
5142 int nameLength)
5143{
5144 enum { NOT_FOUND = -1 };
5145
5146 const bdlat_AttributeInfo *attributeInfo =
5147 lookupAttributeInfo(name, nameLength);
5148 if (0 == attributeInfo) {
5149 return NOT_FOUND;
5150 }
5151
5152 return manipulateAttribute(manipulator, attributeInfo->d_id);
5153}
5154
5155inline
5160
5161// ACCESSORS
5162template <class ACCESSOR>
5164{
5165 int ret;
5166
5167 ret = accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
5168 if (ret) {
5169 return ret;
5170 }
5171
5172 return ret;
5173}
5174
5175template <class ACCESSOR>
5176int BasicSchemaChoiceElement::accessAttribute(ACCESSOR& accessor, int id) const
5177{
5178 enum { NOT_FOUND = -1 };
5179
5180 switch (id) {
5181 case ATTRIBUTE_ID_CHOICE: {
5182 return accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
5183 }
5184 default:
5185 return NOT_FOUND;
5186 }
5187}
5188
5189template <class ACCESSOR>
5191 ACCESSOR& accessor,
5192 const char *name,
5193 int nameLength) const
5194{
5195 enum { NOT_FOUND = -1 };
5196
5197 const bdlat_AttributeInfo *attributeInfo =
5198 lookupAttributeInfo(name, nameLength);
5199 if (0 == attributeInfo) {
5200 return NOT_FOUND;
5201 }
5202
5203 return accessAttribute(accessor, attributeInfo->d_id);
5204}
5205
5206inline
5211
5212template <typename HASH_ALGORITHM>
5213void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaChoiceElement& object)
5214{
5215 (void)hashAlg;
5216 (void)object;
5217 using bslh::hashAppend;
5218 hashAppend(hashAlg, object.choice());
5219}
5220
5221
5222
5223 // ------------------------------------
5224 // class BasicSchemaChoiceElementChoice
5225 // ------------------------------------
5226
5227// CLASS METHODS
5228// CREATORS
5229inline
5231: d_selectionId(SELECTION_ID_UNDEFINED)
5232, d_allocator_p(bslma::Default::allocator(basicAllocator))
5233{
5234}
5235
5236inline
5241
5242// MANIPULATORS
5243template <class MANIPULATOR>
5245{
5246 switch (d_selectionId) {
5248 return manipulator(&d_annotation.object(),
5251 return manipulator(d_element,
5253 default:
5255 return -1;
5256 }
5257}
5258
5259inline
5265
5266inline
5272
5273// ACCESSORS
5274inline
5276{
5277 return d_selectionId;
5278}
5279
5280template <class ACCESSOR>
5282{
5283 switch (d_selectionId) {
5285 return accessor(d_annotation.object(),
5288 return accessor(*d_element,
5290 default:
5291 BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
5292 return -1;
5293 }
5294}
5295
5296inline
5302
5303inline
5305{
5306 BSLS_ASSERT(SELECTION_ID_ELEMENT == d_selectionId);
5307 return *d_element;
5308}
5309
5310inline
5312{
5313 return SELECTION_ID_ANNOTATION == d_selectionId;
5314}
5315
5316inline
5318{
5319 return SELECTION_ID_ELEMENT == d_selectionId;
5320}
5321
5322inline
5324{
5325 return SELECTION_ID_UNDEFINED == d_selectionId;
5326}
5327
5328template <typename HASH_ALGORITHM>
5329void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaChoiceElementChoice& object)
5330{
5332 using bslh::hashAppend;
5333 hashAppend(hashAlg, object.selectionId());
5334 switch (object.selectionId()) {
5335 case Class::SELECTION_ID_ANNOTATION:
5336 hashAppend(hashAlg, object.annotation());
5337 break;
5338 case Class::SELECTION_ID_ELEMENT:
5339 hashAppend(hashAlg, object.element());
5340 break;
5341 default:
5342 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == object.selectionId());
5343 }
5344}
5345
5346
5347 // -----------------------------------
5348 // class BasicSchemaComplexTypeElement
5349 // -----------------------------------
5350
5351// CLASS METHODS
5352// MANIPULATORS
5353template <class MANIPULATOR>
5355{
5356 int ret;
5357
5358 ret = manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]);
5359 if (ret) {
5360 return ret;
5361 }
5362
5363 ret = manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
5364 if (ret) {
5365 return ret;
5366 }
5367
5368 return ret;
5369}
5370
5371template <class MANIPULATOR>
5372int BasicSchemaComplexTypeElement::manipulateAttribute(MANIPULATOR& manipulator, int id)
5373{
5374 enum { NOT_FOUND = -1 };
5375
5376 switch (id) {
5377 case ATTRIBUTE_ID_NAME: {
5378 return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]);
5379 }
5380 case ATTRIBUTE_ID_CHOICE: {
5381 return manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
5382 }
5383 default:
5384 return NOT_FOUND;
5385 }
5386}
5387
5388template <class MANIPULATOR>
5390 MANIPULATOR& manipulator,
5391 const char *name,
5392 int nameLength)
5393{
5394 enum { NOT_FOUND = -1 };
5395
5396 const bdlat_AttributeInfo *attributeInfo =
5397 lookupAttributeInfo(name, nameLength);
5398 if (0 == attributeInfo) {
5399 return NOT_FOUND;
5400 }
5401
5402 return manipulateAttribute(manipulator, attributeInfo->d_id);
5403}
5404
5405inline
5410
5411inline
5416
5417// ACCESSORS
5418template <class ACCESSOR>
5420{
5421 int ret;
5422
5423 ret = accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]);
5424 if (ret) {
5425 return ret;
5426 }
5427
5428 ret = accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
5429 if (ret) {
5430 return ret;
5431 }
5432
5433 return ret;
5434}
5435
5436template <class ACCESSOR>
5437int BasicSchemaComplexTypeElement::accessAttribute(ACCESSOR& accessor, int id) const
5438{
5439 enum { NOT_FOUND = -1 };
5440
5441 switch (id) {
5442 case ATTRIBUTE_ID_NAME: {
5443 return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]);
5444 }
5445 case ATTRIBUTE_ID_CHOICE: {
5446 return accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
5447 }
5448 default:
5449 return NOT_FOUND;
5450 }
5451}
5452
5453template <class ACCESSOR>
5455 ACCESSOR& accessor,
5456 const char *name,
5457 int nameLength) const
5458{
5459 enum { NOT_FOUND = -1 };
5460
5461 const bdlat_AttributeInfo *attributeInfo =
5462 lookupAttributeInfo(name, nameLength);
5463 if (0 == attributeInfo) {
5464 return NOT_FOUND;
5465 }
5466
5467 return accessAttribute(accessor, attributeInfo->d_id);
5468}
5469
5470inline
5472{
5473 return d_name;
5474}
5475
5476inline
5481
5482template <typename HASH_ALGORITHM>
5483void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaComplexTypeElement& object)
5484{
5485 (void)hashAlg;
5486 (void)object;
5487 using bslh::hashAppend;
5488 hashAppend(hashAlg, object.name());
5489 hashAppend(hashAlg, object.choice());
5490}
5491
5492
5493
5494 // -----------------------------------------
5495 // class BasicSchemaComplexTypeElementChoice
5496 // -----------------------------------------
5497
5498// CLASS METHODS
5499// CREATORS
5500inline
5502: d_selectionId(SELECTION_ID_UNDEFINED)
5503, d_allocator_p(bslma::Default::allocator(basicAllocator))
5504{
5505}
5506
5507inline
5512
5513// MANIPULATORS
5514template <class MANIPULATOR>
5532
5533inline
5539
5540inline
5546
5547inline
5553
5554// ACCESSORS
5555inline
5557{
5558 return d_selectionId;
5559}
5560
5561template <class ACCESSOR>
5563{
5564 switch (d_selectionId) {
5566 return accessor(d_annotation.object(),
5569 return accessor(*d_sequence,
5572 return accessor(*d_choice,
5574 default:
5575 BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
5576 return -1;
5577 }
5578}
5579
5580inline
5586
5587inline
5593
5594inline
5600
5601inline
5603{
5604 return SELECTION_ID_ANNOTATION == d_selectionId;
5605}
5606
5607inline
5609{
5610 return SELECTION_ID_SEQUENCE == d_selectionId;
5611}
5612
5613inline
5615{
5616 return SELECTION_ID_CHOICE == d_selectionId;
5617}
5618
5619inline
5621{
5622 return SELECTION_ID_UNDEFINED == d_selectionId;
5623}
5624
5625template <typename HASH_ALGORITHM>
5626void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaComplexTypeElementChoice& object)
5627{
5629 using bslh::hashAppend;
5630 hashAppend(hashAlg, object.selectionId());
5631 switch (object.selectionId()) {
5632 case Class::SELECTION_ID_ANNOTATION:
5633 hashAppend(hashAlg, object.annotation());
5634 break;
5635 case Class::SELECTION_ID_SEQUENCE:
5636 hashAppend(hashAlg, object.sequence());
5637 break;
5638 case Class::SELECTION_ID_CHOICE:
5639 hashAppend(hashAlg, object.choice());
5640 break;
5641 default:
5642 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == object.selectionId());
5643 }
5644}
5645
5646
5647 // ------------------------
5648 // class BasicSchemaElement
5649 // ------------------------
5650
5651// CLASS METHODS
5652// MANIPULATORS
5653template <class MANIPULATOR>
5654int BasicSchemaElement::manipulateAttributes(MANIPULATOR& manipulator)
5655{
5656 int ret;
5657
5658 ret = manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]);
5659 if (ret) {
5660 return ret;
5661 }
5662
5663 ret = manipulator(&d_type, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TYPE]);
5664 if (ret) {
5665 return ret;
5666 }
5667
5668 ret = manipulator(&d_minOccurs, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MIN_OCCURS]);
5669 if (ret) {
5670 return ret;
5671 }
5672
5673 ret = manipulator(&d_maxOccurs, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_OCCURS]);
5674 if (ret) {
5675 return ret;
5676 }
5677
5678 ret = manipulator(&d_default, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DEFAULT_VALUE]);
5679 if (ret) {
5680 return ret;
5681 }
5682
5683 ret = manipulator(&d_cppdefault, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CPPDEFAULT]);
5684 if (ret) {
5685 return ret;
5686 }
5687
5688 ret = manipulator(&d_cpptype, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CPPTYPE]);
5689 if (ret) {
5690 return ret;
5691 }
5692
5693 ret = manipulator(&d_allocatesMemory, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALLOCATES_MEMORY]);
5694 if (ret) {
5695 return ret;
5696 }
5697
5698 ret = manipulator(&d_allowsDirectManipulation, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALLOWS_DIRECT_MANIPULATION]);
5699 if (ret) {
5700 return ret;
5701 }
5702
5703 ret = manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
5704 if (ret) {
5705 return ret;
5706 }
5707
5708 return ret;
5709}
5710
5711template <class MANIPULATOR>
5712int BasicSchemaElement::manipulateAttribute(MANIPULATOR& manipulator, int id)
5713{
5714 enum { NOT_FOUND = -1 };
5715
5716 switch (id) {
5717 case ATTRIBUTE_ID_NAME: {
5718 return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]);
5719 }
5720 case ATTRIBUTE_ID_TYPE: {
5721 return manipulator(&d_type, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TYPE]);
5722 }
5724 return manipulator(&d_minOccurs, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MIN_OCCURS]);
5725 }
5727 return manipulator(&d_maxOccurs, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_OCCURS]);
5728 }
5730 return manipulator(&d_default, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DEFAULT_VALUE]);
5731 }
5733 return manipulator(&d_cppdefault, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CPPDEFAULT]);
5734 }
5735 case ATTRIBUTE_ID_CPPTYPE: {
5736 return manipulator(&d_cpptype, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CPPTYPE]);
5737 }
5739 return manipulator(&d_allocatesMemory, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALLOCATES_MEMORY]);
5740 }
5742 return manipulator(&d_allowsDirectManipulation, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALLOWS_DIRECT_MANIPULATION]);
5743 }
5744 case ATTRIBUTE_ID_CHOICE: {
5745 return manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
5746 }
5747 default:
5748 return NOT_FOUND;
5749 }
5750}
5751
5752template <class MANIPULATOR>
5754 MANIPULATOR& manipulator,
5755 const char *name,
5756 int nameLength)
5757{
5758 enum { NOT_FOUND = -1 };
5759
5760 const bdlat_AttributeInfo *attributeInfo =
5761 lookupAttributeInfo(name, nameLength);
5762 if (0 == attributeInfo) {
5763 return NOT_FOUND;
5764 }
5765
5766 return manipulateAttribute(manipulator, attributeInfo->d_id);
5767}
5768
5769inline
5774
5775inline
5780
5781inline
5786
5787inline
5792
5793inline
5798
5799inline
5804
5805inline
5810
5811inline
5813{
5814 return d_allocatesMemory;
5815}
5816
5817inline
5819{
5820 return d_allowsDirectManipulation;
5821}
5822
5823inline
5828
5829// ACCESSORS
5830template <class ACCESSOR>
5831int BasicSchemaElement::accessAttributes(ACCESSOR& accessor) const
5832{
5833 int ret;
5834
5835 ret = accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]);
5836 if (ret) {
5837 return ret;
5838 }
5839
5840 ret = accessor(d_type, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TYPE]);
5841 if (ret) {
5842 return ret;
5843 }
5844
5845 ret = accessor(d_minOccurs, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MIN_OCCURS]);
5846 if (ret) {
5847 return ret;
5848 }
5849
5850 ret = accessor(d_maxOccurs, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_OCCURS]);
5851 if (ret) {
5852 return ret;
5853 }
5854
5855 ret = accessor(d_default, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DEFAULT_VALUE]);
5856 if (ret) {
5857 return ret;
5858 }
5859
5860 ret = accessor(d_cppdefault, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CPPDEFAULT]);
5861 if (ret) {
5862 return ret;
5863 }
5864
5865 ret = accessor(d_cpptype, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CPPTYPE]);
5866 if (ret) {
5867 return ret;
5868 }
5869
5870 ret = accessor(d_allocatesMemory, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALLOCATES_MEMORY]);
5871 if (ret) {
5872 return ret;
5873 }
5874
5875 ret = accessor(d_allowsDirectManipulation, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALLOWS_DIRECT_MANIPULATION]);
5876 if (ret) {
5877 return ret;
5878 }
5879
5880 ret = accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
5881 if (ret) {
5882 return ret;
5883 }
5884
5885 return ret;
5886}
5887
5888template <class ACCESSOR>
5889int BasicSchemaElement::accessAttribute(ACCESSOR& accessor, int id) const
5890{
5891 enum { NOT_FOUND = -1 };
5892
5893 switch (id) {
5894 case ATTRIBUTE_ID_NAME: {
5895 return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]);
5896 }
5897 case ATTRIBUTE_ID_TYPE: {
5898 return accessor(d_type, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TYPE]);
5899 }
5901 return accessor(d_minOccurs, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MIN_OCCURS]);
5902 }
5904 return accessor(d_maxOccurs, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_OCCURS]);
5905 }
5907 return accessor(d_default, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DEFAULT_VALUE]);
5908 }
5910 return accessor(d_cppdefault, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CPPDEFAULT]);
5911 }
5912 case ATTRIBUTE_ID_CPPTYPE: {
5913 return accessor(d_cpptype, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CPPTYPE]);
5914 }
5916 return accessor(d_allocatesMemory, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALLOCATES_MEMORY]);
5917 }
5919 return accessor(d_allowsDirectManipulation, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALLOWS_DIRECT_MANIPULATION]);
5920 }
5921 case ATTRIBUTE_ID_CHOICE: {
5922 return accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
5923 }
5924 default:
5925 return NOT_FOUND;
5926 }
5927}
5928
5929template <class ACCESSOR>
5931 ACCESSOR& accessor,
5932 const char *name,
5933 int nameLength) const
5934{
5935 enum { NOT_FOUND = -1 };
5936
5937 const bdlat_AttributeInfo *attributeInfo =
5938 lookupAttributeInfo(name, nameLength);
5939 if (0 == attributeInfo) {
5940 return NOT_FOUND;
5941 }
5942
5943 return accessAttribute(accessor, attributeInfo->d_id);
5944}
5945
5946inline
5948{
5949 return d_name;
5950}
5951
5952inline
5954{
5955 return d_type;
5956}
5957
5958inline
5960{
5961 return d_minOccurs;
5962}
5963
5964inline
5966{
5967 return d_maxOccurs;
5968}
5969
5970inline
5972{
5973 return d_default;
5974}
5975
5976inline
5978{
5979 return d_cppdefault;
5980}
5981
5982inline
5984{
5985 return d_cpptype;
5986}
5987
5988inline
5990{
5991 return d_allocatesMemory;
5992}
5993
5994inline
5996{
5997 return d_allowsDirectManipulation;
5998}
5999
6000inline
6002{
6003 return d_choice;
6004}
6005
6006template <typename HASH_ALGORITHM>
6007void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaElement& object)
6008{
6009 (void)hashAlg;
6010 (void)object;
6011 using bslh::hashAppend;
6012 hashAppend(hashAlg, object.name());
6013 hashAppend(hashAlg, object.type());
6014 hashAppend(hashAlg, object.minOccurs());
6015 hashAppend(hashAlg, object.maxOccurs());
6016 hashAppend(hashAlg, object.defaultValue());
6017 hashAppend(hashAlg, object.cppdefault());
6018 hashAppend(hashAlg, object.cpptype());
6019 hashAppend(hashAlg, object.allocatesMemory());
6020 hashAppend(hashAlg, object.allowsDirectManipulation());
6021 hashAppend(hashAlg, object.choice());
6022}
6023
6024
6025
6026 // ------------------------------
6027 // class BasicSchemaElementChoice
6028 // ------------------------------
6029
6030// CLASS METHODS
6031// CREATORS
6032inline
6034: d_selectionId(SELECTION_ID_UNDEFINED)
6035, d_allocator_p(bslma::Default::allocator(basicAllocator))
6036{
6037}
6038
6039inline
6044
6045// MANIPULATORS
6046template <class MANIPULATOR>
6048{
6049 switch (d_selectionId) {
6051 return manipulator(&d_annotation.object(),
6054 return manipulator(&d_simpleType.object(),
6057 return manipulator(d_complexType,
6059 default:
6061 return -1;
6062 }
6063}
6064
6065inline
6071
6072inline
6078
6079inline
6085
6086// ACCESSORS
6087inline
6089{
6090 return d_selectionId;
6091}
6092
6093template <class ACCESSOR>
6095{
6096 switch (d_selectionId) {
6098 return accessor(d_annotation.object(),
6101 return accessor(d_simpleType.object(),
6104 return accessor(*d_complexType,
6106 default:
6107 BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
6108 return -1;
6109 }
6110}
6111
6112inline
6114{
6115 BSLS_ASSERT(SELECTION_ID_ANNOTATION == d_selectionId);
6116 return d_annotation.object();
6117}
6118
6119inline
6121{
6122 BSLS_ASSERT(SELECTION_ID_SIMPLE_TYPE == d_selectionId);
6123 return d_simpleType.object();
6124}
6125
6126inline
6132
6133inline
6135{
6136 return SELECTION_ID_ANNOTATION == d_selectionId;
6137}
6138
6139inline
6141{
6142 return SELECTION_ID_SIMPLE_TYPE == d_selectionId;
6143}
6144
6145inline
6147{
6148 return SELECTION_ID_COMPLEX_TYPE == d_selectionId;
6149}
6150
6151inline
6153{
6154 return SELECTION_ID_UNDEFINED == d_selectionId;
6155}
6156
6157template <typename HASH_ALGORITHM>
6158void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaElementChoice& object)
6159{
6161 using bslh::hashAppend;
6162 hashAppend(hashAlg, object.selectionId());
6163 switch (object.selectionId()) {
6164 case Class::SELECTION_ID_ANNOTATION:
6165 hashAppend(hashAlg, object.annotation());
6166 break;
6167 case Class::SELECTION_ID_SIMPLE_TYPE:
6168 hashAppend(hashAlg, object.simpleType());
6169 break;
6170 case Class::SELECTION_ID_COMPLEX_TYPE:
6171 hashAppend(hashAlg, object.complexType());
6172 break;
6173 default:
6174 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == object.selectionId());
6175 }
6176}
6177
6178
6179 // --------------------------------
6180 // class BasicSchemaSequenceElement
6181 // --------------------------------
6182
6183// CLASS METHODS
6184// MANIPULATORS
6185template <class MANIPULATOR>
6187{
6188 int ret;
6189
6190 ret = manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
6191 if (ret) {
6192 return ret;
6193 }
6194
6195 return ret;
6196}
6197
6198template <class MANIPULATOR>
6199int BasicSchemaSequenceElement::manipulateAttribute(MANIPULATOR& manipulator, int id)
6200{
6201 enum { NOT_FOUND = -1 };
6202
6203 switch (id) {
6204 case ATTRIBUTE_ID_CHOICE: {
6205 return manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
6206 }
6207 default:
6208 return NOT_FOUND;
6209 }
6210}
6211
6212template <class MANIPULATOR>
6214 MANIPULATOR& manipulator,
6215 const char *name,
6216 int nameLength)
6217{
6218 enum { NOT_FOUND = -1 };
6219
6220 const bdlat_AttributeInfo *attributeInfo =
6221 lookupAttributeInfo(name, nameLength);
6222 if (0 == attributeInfo) {
6223 return NOT_FOUND;
6224 }
6225
6226 return manipulateAttribute(manipulator, attributeInfo->d_id);
6227}
6228
6229inline
6234
6235// ACCESSORS
6236template <class ACCESSOR>
6238{
6239 int ret;
6240
6241 ret = accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
6242 if (ret) {
6243 return ret;
6244 }
6245
6246 return ret;
6247}
6248
6249template <class ACCESSOR>
6250int BasicSchemaSequenceElement::accessAttribute(ACCESSOR& accessor, int id) const
6251{
6252 enum { NOT_FOUND = -1 };
6253
6254 switch (id) {
6255 case ATTRIBUTE_ID_CHOICE: {
6256 return accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
6257 }
6258 default:
6259 return NOT_FOUND;
6260 }
6261}
6262
6263template <class ACCESSOR>
6265 ACCESSOR& accessor,
6266 const char *name,
6267 int nameLength) const
6268{
6269 enum { NOT_FOUND = -1 };
6270
6271 const bdlat_AttributeInfo *attributeInfo =
6272 lookupAttributeInfo(name, nameLength);
6273 if (0 == attributeInfo) {
6274 return NOT_FOUND;
6275 }
6276
6277 return accessAttribute(accessor, attributeInfo->d_id);
6278}
6279
6280inline
6285
6286template <typename HASH_ALGORITHM>
6287void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaSequenceElement& object)
6288{
6289 (void)hashAlg;
6290 (void)object;
6291 using bslh::hashAppend;
6292 hashAppend(hashAlg, object.choice());
6293}
6294
6295
6296
6297 // --------------------------------------
6298 // class BasicSchemaSequenceElementChoice
6299 // --------------------------------------
6300
6301// CLASS METHODS
6302// CREATORS
6303inline
6305: d_selectionId(SELECTION_ID_UNDEFINED)
6306, d_allocator_p(bslma::Default::allocator(basicAllocator))
6307{
6308}
6309
6310inline
6315
6316// MANIPULATORS
6317template <class MANIPULATOR>
6319{
6320 switch (d_selectionId) {
6322 return manipulator(&d_annotation.object(),
6325 return manipulator(d_element,
6327 default:
6329 return -1;
6330 }
6331}
6332
6333inline
6339
6340inline
6346
6347// ACCESSORS
6348inline
6350{
6351 return d_selectionId;
6352}
6353
6354template <class ACCESSOR>
6356{
6357 switch (d_selectionId) {
6359 return accessor(d_annotation.object(),
6362 return accessor(*d_element,
6364 default:
6365 BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
6366 return -1;
6367 }
6368}
6369
6370inline
6376
6377inline
6379{
6380 BSLS_ASSERT(SELECTION_ID_ELEMENT == d_selectionId);
6381 return *d_element;
6382}
6383
6384inline
6386{
6387 return SELECTION_ID_ANNOTATION == d_selectionId;
6388}
6389
6390inline
6392{
6393 return SELECTION_ID_ELEMENT == d_selectionId;
6394}
6395
6396inline
6398{
6399 return SELECTION_ID_UNDEFINED == d_selectionId;
6400}
6401
6402template <typename HASH_ALGORITHM>
6403void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaSequenceElementChoice& object)
6404{
6406 using bslh::hashAppend;
6407 hashAppend(hashAlg, object.selectionId());
6408 switch (object.selectionId()) {
6409 case Class::SELECTION_ID_ANNOTATION:
6410 hashAppend(hashAlg, object.annotation());
6411 break;
6412 case Class::SELECTION_ID_ELEMENT:
6413 hashAppend(hashAlg, object.element());
6414 break;
6415 default:
6416 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == object.selectionId());
6417 }
6418}
6419
6420
6421 // -----------------------
6422 // class BasicSchemaChoice
6423 // -----------------------
6424
6425// CLASS METHODS
6426// CREATORS
6427inline
6429: d_selectionId(SELECTION_ID_UNDEFINED)
6430, d_allocator_p(bslma::Default::allocator(basicAllocator))
6431{
6432}
6433
6434inline
6439
6440// MANIPULATORS
6441template <class MANIPULATOR>
6442int BasicSchemaChoice::manipulateSelection(MANIPULATOR& manipulator)
6443{
6444 switch (d_selectionId) {
6446 return manipulator(&d_annotation.object(),
6449 return manipulator(&d_simpleType.object(),
6452 return manipulator(d_complexType,
6454 default:
6456 return -1;
6457 }
6458}
6459
6460inline
6466
6467inline
6473
6474inline
6480
6481// ACCESSORS
6482inline
6484{
6485 return d_selectionId;
6486}
6487
6488template <class ACCESSOR>
6489int BasicSchemaChoice::accessSelection(ACCESSOR& accessor) const
6490{
6491 switch (d_selectionId) {
6493 return accessor(d_annotation.object(),
6496 return accessor(d_simpleType.object(),
6499 return accessor(*d_complexType,
6501 default:
6502 BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
6503 return -1;
6504 }
6505}
6506
6507inline
6509{
6510 BSLS_ASSERT(SELECTION_ID_ANNOTATION == d_selectionId);
6511 return d_annotation.object();
6512}
6513
6514inline
6516{
6517 BSLS_ASSERT(SELECTION_ID_SIMPLE_TYPE == d_selectionId);
6518 return d_simpleType.object();
6519}
6520
6521inline
6527
6528inline
6530{
6531 return SELECTION_ID_ANNOTATION == d_selectionId;
6532}
6533
6534inline
6536{
6537 return SELECTION_ID_SIMPLE_TYPE == d_selectionId;
6538}
6539
6540inline
6542{
6543 return SELECTION_ID_COMPLEX_TYPE == d_selectionId;
6544}
6545
6546inline
6548{
6549 return SELECTION_ID_UNDEFINED == d_selectionId;
6550}
6551
6552template <typename HASH_ALGORITHM>
6553void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchemaChoice& object)
6554{
6555 typedef s_baltst::BasicSchemaChoice Class;
6556 using bslh::hashAppend;
6557 hashAppend(hashAlg, object.selectionId());
6558 switch (object.selectionId()) {
6559 case Class::SELECTION_ID_ANNOTATION:
6560 hashAppend(hashAlg, object.annotation());
6561 break;
6562 case Class::SELECTION_ID_SIMPLE_TYPE:
6563 hashAppend(hashAlg, object.simpleType());
6564 break;
6565 case Class::SELECTION_ID_COMPLEX_TYPE:
6566 hashAppend(hashAlg, object.complexType());
6567 break;
6568 default:
6569 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == object.selectionId());
6570 }
6571}
6572
6573
6574 // -----------------
6575 // class BasicSchema
6576 // -----------------
6577
6578// CLASS METHODS
6579// MANIPULATORS
6580template <class MANIPULATOR>
6581int BasicSchema::manipulateAttributes(MANIPULATOR& manipulator)
6582{
6583 int ret;
6584
6585 ret = manipulator(&d_xs, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_XS]);
6586 if (ret) {
6587 return ret;
6588 }
6589
6590 ret = manipulator(&d_bdem, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BDEM]);
6591 if (ret) {
6592 return ret;
6593 }
6594
6595 ret = manipulator(&d_package, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PACKAGE]);
6596 if (ret) {
6597 return ret;
6598 }
6599
6600 ret = manipulator(&d_elementFormDefault, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELEMENT_FORM_DEFAULT]);
6601 if (ret) {
6602 return ret;
6603 }
6604
6605 ret = manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
6606 if (ret) {
6607 return ret;
6608 }
6609
6610 return ret;
6611}
6612
6613template <class MANIPULATOR>
6614int BasicSchema::manipulateAttribute(MANIPULATOR& manipulator, int id)
6615{
6616 enum { NOT_FOUND = -1 };
6617
6618 switch (id) {
6619 case ATTRIBUTE_ID_XS: {
6620 return manipulator(&d_xs, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_XS]);
6621 }
6622 case ATTRIBUTE_ID_BDEM: {
6623 return manipulator(&d_bdem, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BDEM]);
6624 }
6625 case ATTRIBUTE_ID_PACKAGE: {
6626 return manipulator(&d_package, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PACKAGE]);
6627 }
6629 return manipulator(&d_elementFormDefault, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELEMENT_FORM_DEFAULT]);
6630 }
6631 case ATTRIBUTE_ID_CHOICE: {
6632 return manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
6633 }
6634 default:
6635 return NOT_FOUND;
6636 }
6637}
6638
6639template <class MANIPULATOR>
6641 MANIPULATOR& manipulator,
6642 const char *name,
6643 int nameLength)
6644{
6645 enum { NOT_FOUND = -1 };
6646
6647 const bdlat_AttributeInfo *attributeInfo =
6648 lookupAttributeInfo(name, nameLength);
6649 if (0 == attributeInfo) {
6650 return NOT_FOUND;
6651 }
6652
6653 return manipulateAttribute(manipulator, attributeInfo->d_id);
6654}
6655
6656inline
6658{
6659 return d_xs;
6660}
6661
6662inline
6664{
6665 return d_bdem;
6666}
6667
6668inline
6670{
6671 return d_package;
6672}
6673
6674inline
6676{
6677 return d_elementFormDefault;
6678}
6679
6680inline
6682{
6683 return d_choice;
6684}
6685
6686// ACCESSORS
6687template <class ACCESSOR>
6688int BasicSchema::accessAttributes(ACCESSOR& accessor) const
6689{
6690 int ret;
6691
6692 ret = accessor(d_xs, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_XS]);
6693 if (ret) {
6694 return ret;
6695 }
6696
6697 ret = accessor(d_bdem, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BDEM]);
6698 if (ret) {
6699 return ret;
6700 }
6701
6702 ret = accessor(d_package, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PACKAGE]);
6703 if (ret) {
6704 return ret;
6705 }
6706
6707 ret = accessor(d_elementFormDefault, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELEMENT_FORM_DEFAULT]);
6708 if (ret) {
6709 return ret;
6710 }
6711
6712 ret = accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
6713 if (ret) {
6714 return ret;
6715 }
6716
6717 return ret;
6718}
6719
6720template <class ACCESSOR>
6721int BasicSchema::accessAttribute(ACCESSOR& accessor, int id) const
6722{
6723 enum { NOT_FOUND = -1 };
6724
6725 switch (id) {
6726 case ATTRIBUTE_ID_XS: {
6727 return accessor(d_xs, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_XS]);
6728 }
6729 case ATTRIBUTE_ID_BDEM: {
6730 return accessor(d_bdem, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BDEM]);
6731 }
6732 case ATTRIBUTE_ID_PACKAGE: {
6733 return accessor(d_package, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PACKAGE]);
6734 }
6736 return accessor(d_elementFormDefault, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELEMENT_FORM_DEFAULT]);
6737 }
6738 case ATTRIBUTE_ID_CHOICE: {
6739 return accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]);
6740 }
6741 default:
6742 return NOT_FOUND;
6743 }
6744}
6745
6746template <class ACCESSOR>
6748 ACCESSOR& accessor,
6749 const char *name,
6750 int nameLength) const
6751{
6752 enum { NOT_FOUND = -1 };
6753
6754 const bdlat_AttributeInfo *attributeInfo =
6755 lookupAttributeInfo(name, nameLength);
6756 if (0 == attributeInfo) {
6757 return NOT_FOUND;
6758 }
6759
6760 return accessAttribute(accessor, attributeInfo->d_id);
6761}
6762
6763inline
6765{
6766 return d_xs;
6767}
6768
6769inline
6771{
6772 return d_bdem;
6773}
6774
6775inline
6777{
6778 return d_package;
6779}
6780
6781inline
6783{
6784 return d_elementFormDefault;
6785}
6786
6787inline
6789{
6790 return d_choice;
6791}
6792
6793template <typename HASH_ALGORITHM>
6794void hashAppend(HASH_ALGORITHM& hashAlg, const s_baltst::BasicSchema& object)
6795{
6796 (void)hashAlg;
6797 (void)object;
6798 using bslh::hashAppend;
6799 hashAppend(hashAlg, object.xs());
6800 hashAppend(hashAlg, object.bdem());
6801 hashAppend(hashAlg, object.package());
6802 hashAppend(hashAlg, object.elementFormDefault());
6803 hashAppend(hashAlg, object.choice());
6804}
6805
6806} // close package namespace
6807
6808// FREE FUNCTIONS
6809
6810inline
6814{
6815 return lhs.documentation() == rhs.documentation();
6816}
6817
6818inline
6822{
6823 return !(lhs == rhs);
6824}
6825
6826inline
6827bsl::ostream& s_baltst::operator<<(
6828 bsl::ostream& stream,
6830{
6831 return rhs.print(stream, 0, -1);
6832}
6833
6834
6835inline
6839{
6841 if (lhs.selectionId() == rhs.selectionId()) {
6842 switch (rhs.selectionId()) {
6843 case Class::SELECTION_ID_ANNOTATION:
6844 return lhs.annotation() == rhs.annotation();
6845 default:
6846 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId());
6847 return true;
6848 }
6849 }
6850 else {
6851 return false;
6852 }
6853}
6854
6855inline
6859{
6860 return !(lhs == rhs);
6861}
6862
6863inline
6864bsl::ostream& s_baltst::operator<<(
6865 bsl::ostream& stream,
6867{
6868 return rhs.print(stream, 0, -1);
6869}
6870
6871
6872inline
6876{
6877 return lhs.value() == rhs.value()
6878 && lhs.choice() == rhs.choice();
6879}
6880
6881inline
6885{
6886 return !(lhs == rhs);
6887}
6888
6889inline
6890bsl::ostream& s_baltst::operator<<(
6891 bsl::ostream& stream,
6893{
6894 return rhs.print(stream, 0, -1);
6895}
6896
6897
6898inline
6902{
6904 if (lhs.selectionId() == rhs.selectionId()) {
6905 switch (rhs.selectionId()) {
6906 case Class::SELECTION_ID_ANNOTATION:
6907 return lhs.annotation() == rhs.annotation();
6908 case Class::SELECTION_ID_ENUMERATION:
6909 return lhs.enumeration() == rhs.enumeration();
6910 default:
6911 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId());
6912 return true;
6913 }
6914 }
6915 else {
6916 return false;
6917 }
6918}
6919
6920inline
6924{
6925 return !(lhs == rhs);
6926}
6927
6928inline
6929bsl::ostream& s_baltst::operator<<(
6930 bsl::ostream& stream,
6932{
6933 return rhs.print(stream, 0, -1);
6934}
6935
6936
6937inline
6941{
6942 return lhs.base() == rhs.base()
6943 && lhs.choice() == rhs.choice();
6944}
6945
6946inline
6950{
6951 return !(lhs == rhs);
6952}
6953
6954inline
6955bsl::ostream& s_baltst::operator<<(
6956 bsl::ostream& stream,
6958{
6959 return rhs.print(stream, 0, -1);
6960}
6961
6962
6963inline
6967{
6969 if (lhs.selectionId() == rhs.selectionId()) {
6970 switch (rhs.selectionId()) {
6971 case Class::SELECTION_ID_ANNOTATION:
6972 return lhs.annotation() == rhs.annotation();
6973 case Class::SELECTION_ID_RESTRICTION:
6974 return lhs.restriction() == rhs.restriction();
6975 default:
6976 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId());
6977 return true;
6978 }
6979 }
6980 else {
6981 return false;
6982 }
6983}
6984
6985inline
6989{
6990 return !(lhs == rhs);
6991}
6992
6993inline
6994bsl::ostream& s_baltst::operator<<(
6995 bsl::ostream& stream,
6997{
6998 return rhs.print(stream, 0, -1);
6999}
7000
7001
7002inline
7006{
7007 return lhs.name() == rhs.name()
7008 && lhs.preserveEnumOrder() == rhs.preserveEnumOrder()
7009 && lhs.choice() == rhs.choice();
7010}
7011
7012inline
7016{
7017 return !(lhs == rhs);
7018}
7019
7020inline
7021bsl::ostream& s_baltst::operator<<(
7022 bsl::ostream& stream,
7024{
7025 return rhs.print(stream, 0, -1);
7026}
7027
7028
7029inline
7033{
7034 return lhs.choice() == rhs.choice();
7035}
7036
7037inline
7041{
7042 return !(lhs == rhs);
7043}
7044
7045inline
7046bsl::ostream& s_baltst::operator<<(
7047 bsl::ostream& stream,
7049{
7050 return rhs.print(stream, 0, -1);
7051}
7052
7053
7054inline
7058{
7060 if (lhs.selectionId() == rhs.selectionId()) {
7061 switch (rhs.selectionId()) {
7062 case Class::SELECTION_ID_ANNOTATION:
7063 return lhs.annotation() == rhs.annotation();
7064 case Class::SELECTION_ID_ELEMENT:
7065 return lhs.element() == rhs.element();
7066 default:
7067 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId());
7068 return true;
7069 }
7070 }
7071 else {
7072 return false;
7073 }
7074}
7075
7076inline
7080{
7081 return !(lhs == rhs);
7082}
7083
7084inline
7085bsl::ostream& s_baltst::operator<<(
7086 bsl::ostream& stream,
7088{
7089 return rhs.print(stream, 0, -1);
7090}
7091
7092
7093inline
7097{
7098 return lhs.name() == rhs.name()
7099 && lhs.choice() == rhs.choice();
7100}
7101
7102inline
7106{
7107 return !(lhs == rhs);
7108}
7109
7110inline
7111bsl::ostream& s_baltst::operator<<(
7112 bsl::ostream& stream,
7114{
7115 return rhs.print(stream, 0, -1);
7116}
7117
7118
7119inline
7123{
7125 if (lhs.selectionId() == rhs.selectionId()) {
7126 switch (rhs.selectionId()) {
7127 case Class::SELECTION_ID_ANNOTATION:
7128 return lhs.annotation() == rhs.annotation();
7129 case Class::SELECTION_ID_SEQUENCE:
7130 return lhs.sequence() == rhs.sequence();
7131 case Class::SELECTION_ID_CHOICE:
7132 return lhs.choice() == rhs.choice();
7133 default:
7134 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId());
7135 return true;
7136 }
7137 }
7138 else {
7139 return false;
7140 }
7141}
7142
7143inline
7147{
7148 return !(lhs == rhs);
7149}
7150
7151inline
7152bsl::ostream& s_baltst::operator<<(
7153 bsl::ostream& stream,
7155{
7156 return rhs.print(stream, 0, -1);
7157}
7158
7159
7160inline
7164{
7165 return lhs.name() == rhs.name()
7166 && lhs.type() == rhs.type()
7167 && lhs.minOccurs() == rhs.minOccurs()
7168 && lhs.maxOccurs() == rhs.maxOccurs()
7169 && lhs.defaultValue() == rhs.defaultValue()
7170 && lhs.cppdefault() == rhs.cppdefault()
7171 && lhs.cpptype() == rhs.cpptype()
7172 && lhs.allocatesMemory() == rhs.allocatesMemory()
7174 && lhs.choice() == rhs.choice();
7175}
7176
7177inline
7181{
7182 return !(lhs == rhs);
7183}
7184
7185inline
7186bsl::ostream& s_baltst::operator<<(
7187 bsl::ostream& stream,
7189{
7190 return rhs.print(stream, 0, -1);
7191}
7192
7193
7194inline
7198{
7200 if (lhs.selectionId() == rhs.selectionId()) {
7201 switch (rhs.selectionId()) {
7202 case Class::SELECTION_ID_ANNOTATION:
7203 return lhs.annotation() == rhs.annotation();
7204 case Class::SELECTION_ID_SIMPLE_TYPE:
7205 return lhs.simpleType() == rhs.simpleType();
7206 case Class::SELECTION_ID_COMPLEX_TYPE:
7207 return lhs.complexType() == rhs.complexType();
7208 default:
7209 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId());
7210 return true;
7211 }
7212 }
7213 else {
7214 return false;
7215 }
7216}
7217
7218inline
7222{
7223 return !(lhs == rhs);
7224}
7225
7226inline
7227bsl::ostream& s_baltst::operator<<(
7228 bsl::ostream& stream,
7230{
7231 return rhs.print(stream, 0, -1);
7232}
7233
7234
7235inline
7239{
7240 return lhs.choice() == rhs.choice();
7241}
7242
7243inline
7247{
7248 return !(lhs == rhs);
7249}
7250
7251inline
7252bsl::ostream& s_baltst::operator<<(
7253 bsl::ostream& stream,
7255{
7256 return rhs.print(stream, 0, -1);
7257}
7258
7259
7260inline
7264{
7266 if (lhs.selectionId() == rhs.selectionId()) {
7267 switch (rhs.selectionId()) {
7268 case Class::SELECTION_ID_ANNOTATION:
7269 return lhs.annotation() == rhs.annotation();
7270 case Class::SELECTION_ID_ELEMENT:
7271 return lhs.element() == rhs.element();
7272 default:
7273 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId());
7274 return true;
7275 }
7276 }
7277 else {
7278 return false;
7279 }
7280}
7281
7282inline
7286{
7287 return !(lhs == rhs);
7288}
7289
7290inline
7291bsl::ostream& s_baltst::operator<<(
7292 bsl::ostream& stream,
7294{
7295 return rhs.print(stream, 0, -1);
7296}
7297
7298
7299inline
7301 const s_baltst::BasicSchemaChoice& lhs,
7302 const s_baltst::BasicSchemaChoice& rhs)
7303{
7304 typedef s_baltst::BasicSchemaChoice Class;
7305 if (lhs.selectionId() == rhs.selectionId()) {
7306 switch (rhs.selectionId()) {
7307 case Class::SELECTION_ID_ANNOTATION:
7308 return lhs.annotation() == rhs.annotation();
7309 case Class::SELECTION_ID_SIMPLE_TYPE:
7310 return lhs.simpleType() == rhs.simpleType();
7311 case Class::SELECTION_ID_COMPLEX_TYPE:
7312 return lhs.complexType() == rhs.complexType();
7313 default:
7314 BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId());
7315 return true;
7316 }
7317 }
7318 else {
7319 return false;
7320 }
7321}
7322
7323inline
7325 const s_baltst::BasicSchemaChoice& lhs,
7326 const s_baltst::BasicSchemaChoice& rhs)
7327{
7328 return !(lhs == rhs);
7329}
7330
7331inline
7332bsl::ostream& s_baltst::operator<<(
7333 bsl::ostream& stream,
7334 const s_baltst::BasicSchemaChoice& rhs)
7335{
7336 return rhs.print(stream, 0, -1);
7337}
7338
7339
7340inline
7342 const s_baltst::BasicSchema& lhs,
7343 const s_baltst::BasicSchema& rhs)
7344{
7345 return lhs.xs() == rhs.xs()
7346 && lhs.bdem() == rhs.bdem()
7347 && lhs.package() == rhs.package()
7348 && lhs.elementFormDefault() == rhs.elementFormDefault()
7349 && lhs.choice() == rhs.choice();
7350}
7351
7352inline
7354 const s_baltst::BasicSchema& lhs,
7355 const s_baltst::BasicSchema& rhs)
7356{
7357 return !(lhs == rhs);
7358}
7359
7360inline
7361bsl::ostream& s_baltst::operator<<(
7362 bsl::ostream& stream,
7363 const s_baltst::BasicSchema& rhs)
7364{
7365 return rhs.print(stream, 0, -1);
7366}
7367
7368
7369#endif
7370
7371// GENERATED BY BLP_BAS_CODEGEN_VERSION
7372// USING bas_codegen.pl --mode msg --noExternalization --noAggregateConversion --package s_baltst --msgComponent basicschema s_baltst_basicschema.xsd
7373// ----------------------------------------------------------------------------
7374// NOTICE:
7375// Copyright 2020 Bloomberg Finance L.P. All rights reserved.
7376// Property of Bloomberg Finance L.P. (BFLP)
7377// This software is made available solely pursuant to the
7378// terms of a BFLP license agreement which governs its use.
7379// ------------------------------- END-OF-FILE --------------------------------
7380
7381/** @} */
7382/** @} */
7383/** @} */
Definition bdlb_nullablevalue.h:257
Definition bslstl_vector.h:1025
Definition bslma_allocator.h:457
Definition s_baltst_basicschema.h:95
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
@ ATTRIBUTE_ID_DOCUMENTATION
Definition s_baltst_basicschema.h:103
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:115
bdlb::NullableValue< bsl::string > & documentation()
Definition s_baltst_basicschema.h:4225
~BasicSchemaAnnotationElement()
Destroy this object.
BasicSchemaAnnotationElement(bslma::Allocator *basicAllocator=0)
int manipulateAttribute(MANIPULATOR &manipulator, int id)
Definition s_baltst_basicschema.h:4194
int manipulateAttributes(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:4181
BasicSchemaAnnotationElement & operator=(const BasicSchemaAnnotationElement &rhs)
Assign to this object the value of the specified rhs object.
int accessAttributes(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:4232
BasicSchemaAnnotationElement(const BasicSchemaAnnotationElement &original, bslma::Allocator *basicAllocator=0)
int accessAttribute(ACCESSOR &accessor, int id) const
Definition s_baltst_basicschema.h:4245
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
@ ATTRIBUTE_INDEX_DOCUMENTATION
Definition s_baltst_basicschema.h:111
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_basicschema.h:117
@ NUM_ATTRIBUTES
Definition s_baltst_basicschema.h:107
Definition s_baltst_basicschema.h:1894
@ SELECTION_INDEX_ANNOTATION
Definition s_baltst_basicschema.h:1919
@ SELECTION_INDEX_ELEMENT
Definition s_baltst_basicschema.h:1920
~BasicSchemaChoiceElementChoice()
Destroy this object.
Definition s_baltst_basicschema.h:5237
bsls::ObjectBuffer< BasicSchemaAnnotationElement > d_annotation
Definition s_baltst_basicschema.h:1898
const char * selectionName() const
Return the symbolic name of the current selection of this object.
int makeSelection(const char *name, int nameLength)
bool isUndefinedValue() const
Definition s_baltst_basicschema.h:5323
bool isElementValue() const
Definition s_baltst_basicschema.h:5317
BasicSchemaElement & makeElement(const BasicSchemaElement &value)
BasicSchemaAnnotationElement & makeAnnotation()
BasicSchemaChoiceElementChoice(const BasicSchemaChoiceElementChoice &original, bslma::Allocator *basicAllocator=0)
bool isAnnotationValue() const
Definition s_baltst_basicschema.h:5311
int manipulateSelection(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:5244
BasicSchemaAnnotationElement & annotation()
Definition s_baltst_basicschema.h:5260
BasicSchemaAnnotationElement & makeAnnotation(const BasicSchemaAnnotationElement &value)
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_basicschema.h:1926
BasicSchemaElement * d_element
Definition s_baltst_basicschema.h:1899
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:1924
BasicSchemaElement & element()
Definition s_baltst_basicschema.h:5267
@ NUM_SELECTIONS
Definition s_baltst_basicschema.h:1915
int accessSelection(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:5281
int selectionId() const
Definition s_baltst_basicschema.h:5275
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
@ SELECTION_ID_ELEMENT
Definition s_baltst_basicschema.h:1911
@ SELECTION_ID_UNDEFINED
Definition s_baltst_basicschema.h:1909
@ SELECTION_ID_ANNOTATION
Definition s_baltst_basicschema.h:1910
BasicSchemaChoiceElementChoice & operator=(const BasicSchemaChoiceElementChoice &rhs)
Assign to this object the value of the specified rhs object.
BasicSchemaChoiceElementChoice(bslma::Allocator *basicAllocator=0)
Definition s_baltst_basicschema.h:5230
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static const bdlat_SelectionInfo * lookupSelectionInfo(const char *name, int nameLength)
Definition s_baltst_basicschema.h:1682
bsl::vector< BasicSchemaChoiceElementChoice > & choice()
Definition s_baltst_basicschema.h:5156
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
BasicSchemaChoiceElement(const BasicSchemaChoiceElement &original, bslma::Allocator *basicAllocator=0)
@ ATTRIBUTE_INDEX_CHOICE
Definition s_baltst_basicschema.h:1698
~BasicSchemaChoiceElement()
Destroy this object.
int manipulateAttribute(MANIPULATOR &manipulator, int id)
Definition s_baltst_basicschema.h:5125
int accessAttributes(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:5163
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
@ ATTRIBUTE_ID_CHOICE
Definition s_baltst_basicschema.h:1690
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:1702
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_basicschema.h:1704
int manipulateAttributes(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:5112
BasicSchemaChoiceElement(bslma::Allocator *basicAllocator=0)
BasicSchemaChoiceElement & operator=(const BasicSchemaChoiceElement &rhs)
Assign to this object the value of the specified rhs object.
@ NUM_ATTRIBUTES
Definition s_baltst_basicschema.h:1694
int accessAttribute(ACCESSOR &accessor, int id) const
Definition s_baltst_basicschema.h:5176
Definition s_baltst_basicschema.h:3654
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:3687
~BasicSchemaChoice()
Destroy this object.
Definition s_baltst_basicschema.h:6435
int accessSelection(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:6489
bool isAnnotationValue() const
Definition s_baltst_basicschema.h:6529
BasicSchemaSimpleTypeElement & makeSimpleType()
static const bdlat_SelectionInfo * lookupSelectionInfo(const char *name, int nameLength)
@ NUM_SELECTIONS
Definition s_baltst_basicschema.h:3677
BasicSchemaSimpleTypeElement & makeSimpleType(const BasicSchemaSimpleTypeElement &value)
BasicSchemaComplexTypeElement * d_complexType
Definition s_baltst_basicschema.h:3660
BasicSchemaChoice & operator=(const BasicSchemaChoice &rhs)
Assign to this object the value of the specified rhs object.
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
int manipulateSelection(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:6442
BasicSchemaComplexTypeElement & makeComplexType()
BasicSchemaAnnotationElement & annotation()
Definition s_baltst_basicschema.h:6461
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_basicschema.h:3689
@ SELECTION_INDEX_ANNOTATION
Definition s_baltst_basicschema.h:3681
@ SELECTION_INDEX_SIMPLE_TYPE
Definition s_baltst_basicschema.h:3682
@ SELECTION_INDEX_COMPLEX_TYPE
Definition s_baltst_basicschema.h:3683
BasicSchemaComplexTypeElement & makeComplexType(const BasicSchemaComplexTypeElement &value)
BasicSchemaSimpleTypeElement & simpleType()
Definition s_baltst_basicschema.h:6468
BasicSchemaChoice(bslma::Allocator *basicAllocator=0)
Definition s_baltst_basicschema.h:6428
bool isComplexTypeValue() const
Definition s_baltst_basicschema.h:6541
int makeSelection(int selectionId)
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
BasicSchemaAnnotationElement & makeAnnotation()
@ SELECTION_ID_ANNOTATION
Definition s_baltst_basicschema.h:3671
@ SELECTION_ID_SIMPLE_TYPE
Definition s_baltst_basicschema.h:3672
@ SELECTION_ID_COMPLEX_TYPE
Definition s_baltst_basicschema.h:3673
@ SELECTION_ID_UNDEFINED
Definition s_baltst_basicschema.h:3670
bool isUndefinedValue() const
Definition s_baltst_basicschema.h:6547
int makeSelection(const char *name, int nameLength)
BasicSchemaComplexTypeElement & complexType()
Definition s_baltst_basicschema.h:6475
BasicSchemaChoice(const BasicSchemaChoice &original, bslma::Allocator *basicAllocator=0)
bsls::ObjectBuffer< BasicSchemaAnnotationElement > d_annotation
Definition s_baltst_basicschema.h:3658
bsls::ObjectBuffer< BasicSchemaSimpleTypeElement > d_simpleType
Definition s_baltst_basicschema.h:3659
const char * selectionName() const
Return the symbolic name of the current selection of this object.
bool isSimpleTypeValue() const
Definition s_baltst_basicschema.h:6535
int selectionId() const
Definition s_baltst_basicschema.h:6483
BasicSchemaAnnotationElement & makeAnnotation(const BasicSchemaAnnotationElement &value)
Definition s_baltst_basicschema.h:2357
bool isSequenceValue() const
Definition s_baltst_basicschema.h:5608
BasicSchemaAnnotationElement & annotation()
Definition s_baltst_basicschema.h:5534
~BasicSchemaComplexTypeElementChoice()
Destroy this object.
Definition s_baltst_basicschema.h:5508
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_basicschema.h:2392
int selectionId() const
Definition s_baltst_basicschema.h:5556
BasicSchemaAnnotationElement & makeAnnotation(const BasicSchemaAnnotationElement &value)
BasicSchemaAnnotationElement & makeAnnotation()
int makeSelection(const char *name, int nameLength)
int manipulateSelection(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:5515
BasicSchemaSequenceElement & makeSequence(const BasicSchemaSequenceElement &value)
int accessSelection(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:5562
bool isUndefinedValue() const
Definition s_baltst_basicschema.h:5620
@ NUM_SELECTIONS
Definition s_baltst_basicschema.h:2380
const char * selectionName() const
Return the symbolic name of the current selection of this object.
bool isChoiceValue() const
Definition s_baltst_basicschema.h:5614
static const bdlat_SelectionInfo * lookupSelectionInfo(const char *name, int nameLength)
BasicSchemaComplexTypeElementChoice(const BasicSchemaComplexTypeElementChoice &original, bslma::Allocator *basicAllocator=0)
BasicSchemaSequenceElement * d_sequence
Definition s_baltst_basicschema.h:2362
BasicSchemaComplexTypeElementChoice & operator=(const BasicSchemaComplexTypeElementChoice &rhs)
Assign to this object the value of the specified rhs object.
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:2390
BasicSchemaSequenceElement & makeSequence()
BasicSchemaComplexTypeElementChoice(bslma::Allocator *basicAllocator=0)
Definition s_baltst_basicschema.h:5501
bsls::ObjectBuffer< BasicSchemaAnnotationElement > d_annotation
Definition s_baltst_basicschema.h:2361
BasicSchemaChoiceElement & choice()
Definition s_baltst_basicschema.h:5548
BasicSchemaChoiceElement & makeChoice()
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
BasicSchemaChoiceElement * d_choice
Definition s_baltst_basicschema.h:2363
BasicSchemaChoiceElement & makeChoice(const BasicSchemaChoiceElement &value)
bool isAnnotationValue() const
Definition s_baltst_basicschema.h:5602
@ SELECTION_INDEX_ANNOTATION
Definition s_baltst_basicschema.h:2384
@ SELECTION_INDEX_SEQUENCE
Definition s_baltst_basicschema.h:2385
@ SELECTION_INDEX_CHOICE
Definition s_baltst_basicschema.h:2386
BasicSchemaSequenceElement & sequence()
Definition s_baltst_basicschema.h:5541
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
@ SELECTION_ID_CHOICE
Definition s_baltst_basicschema.h:2376
@ SELECTION_ID_SEQUENCE
Definition s_baltst_basicschema.h:2375
@ SELECTION_ID_UNDEFINED
Definition s_baltst_basicschema.h:2373
@ SELECTION_ID_ANNOTATION
Definition s_baltst_basicschema.h:2374
Definition s_baltst_basicschema.h:2134
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:2157
int accessAttributes(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:5419
@ ATTRIBUTE_ID_CHOICE
Definition s_baltst_basicschema.h:2144
@ ATTRIBUTE_ID_NAME
Definition s_baltst_basicschema.h:2143
int manipulateAttribute(MANIPULATOR &manipulator, int id)
Definition s_baltst_basicschema.h:5372
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_basicschema.h:2159
int accessAttribute(ACCESSOR &accessor, int id) const
Definition s_baltst_basicschema.h:5437
int manipulateAttributes(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:5354
bdlb::NullableValue< bsl::string > & name()
Definition s_baltst_basicschema.h:5406
bsl::vector< BasicSchemaComplexTypeElementChoice > & choice()
Definition s_baltst_basicschema.h:5412
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
BasicSchemaComplexTypeElement(const BasicSchemaComplexTypeElement &original, bslma::Allocator *basicAllocator=0)
BasicSchemaComplexTypeElement(bslma::Allocator *basicAllocator=0)
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
@ ATTRIBUTE_INDEX_NAME
Definition s_baltst_basicschema.h:2152
@ ATTRIBUTE_INDEX_CHOICE
Definition s_baltst_basicschema.h:2153
~BasicSchemaComplexTypeElement()
Destroy this object.
BasicSchemaComplexTypeElement & operator=(const BasicSchemaComplexTypeElement &rhs)
Assign to this object the value of the specified rhs object.
@ NUM_ATTRIBUTES
Definition s_baltst_basicschema.h:2148
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition s_baltst_basicschema.h:2935
BasicSchemaComplexTypeElement & complexType()
Definition s_baltst_basicschema.h:6080
static const bdlat_SelectionInfo * lookupSelectionInfo(const char *name, int nameLength)
BasicSchemaSimpleTypeElement & simpleType()
Definition s_baltst_basicschema.h:6073
const char * selectionName() const
Return the symbolic name of the current selection of this object.
bool isAnnotationValue() const
Definition s_baltst_basicschema.h:6134
BasicSchemaAnnotationElement & annotation()
Definition s_baltst_basicschema.h:6066
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_basicschema.h:2970
BasicSchemaComplexTypeElement & makeComplexType()
bool isUndefinedValue() const
Definition s_baltst_basicschema.h:6152
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
int selectionId() const
Definition s_baltst_basicschema.h:6088
BasicSchemaAnnotationElement & makeAnnotation(const BasicSchemaAnnotationElement &value)
BasicSchemaElementChoice(const BasicSchemaElementChoice &original, bslma::Allocator *basicAllocator=0)
BasicSchemaSimpleTypeElement & makeSimpleType(const BasicSchemaSimpleTypeElement &value)
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:2968
int accessSelection(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:6094
BasicSchemaElementChoice & operator=(const BasicSchemaElementChoice &rhs)
Assign to this object the value of the specified rhs object.
@ NUM_SELECTIONS
Definition s_baltst_basicschema.h:2958
BasicSchemaAnnotationElement & makeAnnotation()
int manipulateSelection(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:6047
int makeSelection(const char *name, int nameLength)
BasicSchemaSimpleTypeElement & makeSimpleType()
bsls::ObjectBuffer< BasicSchemaAnnotationElement > d_annotation
Definition s_baltst_basicschema.h:2939
bsls::ObjectBuffer< BasicSchemaSimpleTypeElement > d_simpleType
Definition s_baltst_basicschema.h:2940
BasicSchemaComplexTypeElement * d_complexType
Definition s_baltst_basicschema.h:2941
BasicSchemaElementChoice(bslma::Allocator *basicAllocator=0)
Definition s_baltst_basicschema.h:6033
BasicSchemaComplexTypeElement & makeComplexType(const BasicSchemaComplexTypeElement &value)
bool isSimpleTypeValue() const
Definition s_baltst_basicschema.h:6140
@ SELECTION_ID_COMPLEX_TYPE
Definition s_baltst_basicschema.h:2954
@ SELECTION_ID_SIMPLE_TYPE
Definition s_baltst_basicschema.h:2953
@ SELECTION_ID_UNDEFINED
Definition s_baltst_basicschema.h:2951
@ SELECTION_ID_ANNOTATION
Definition s_baltst_basicschema.h:2952
int makeSelection(int selectionId)
~BasicSchemaElementChoice()
Destroy this object.
Definition s_baltst_basicschema.h:6040
@ SELECTION_INDEX_SIMPLE_TYPE
Definition s_baltst_basicschema.h:2963
@ SELECTION_INDEX_ANNOTATION
Definition s_baltst_basicschema.h:2962
@ SELECTION_INDEX_COMPLEX_TYPE
Definition s_baltst_basicschema.h:2964
bool isComplexTypeValue() const
Definition s_baltst_basicschema.h:6146
Definition s_baltst_basicschema.h:2625
int manipulateAttributes(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:5654
bdlb::NullableValue< bsl::string > & type()
Definition s_baltst_basicschema.h:5776
int accessAttributes(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:5831
@ NUM_ATTRIBUTES
Definition s_baltst_basicschema.h:2655
BasicSchemaElement(bslma::Allocator *basicAllocator=0)
BasicSchemaElement(const BasicSchemaElement &original, bslma::Allocator *basicAllocator=0)
int manipulateAttribute(MANIPULATOR &manipulator, int id)
Definition s_baltst_basicschema.h:5712
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:2672
@ ATTRIBUTE_INDEX_MAX_OCCURS
Definition s_baltst_basicschema.h:2662
@ ATTRIBUTE_INDEX_CHOICE
Definition s_baltst_basicschema.h:2668
@ ATTRIBUTE_INDEX_CPPTYPE
Definition s_baltst_basicschema.h:2665
@ ATTRIBUTE_INDEX_ALLOCATES_MEMORY
Definition s_baltst_basicschema.h:2666
@ ATTRIBUTE_INDEX_NAME
Definition s_baltst_basicschema.h:2659
@ ATTRIBUTE_INDEX_TYPE
Definition s_baltst_basicschema.h:2660
@ ATTRIBUTE_INDEX_CPPDEFAULT
Definition s_baltst_basicschema.h:2664
@ ATTRIBUTE_INDEX_MIN_OCCURS
Definition s_baltst_basicschema.h:2661
@ ATTRIBUTE_INDEX_ALLOWS_DIRECT_MANIPULATION
Definition s_baltst_basicschema.h:2667
@ ATTRIBUTE_INDEX_DEFAULT_VALUE
Definition s_baltst_basicschema.h:2663
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
bdlb::NullableValue< bsl::string > & maxOccurs()
Definition s_baltst_basicschema.h:5788
bsl::vector< BasicSchemaElementChoice > & choice()
Definition s_baltst_basicschema.h:5824
bdlb::NullableValue< bsl::string > & name()
Definition s_baltst_basicschema.h:5770
bdlb::NullableValue< bsl::string > & allocatesMemory()
Definition s_baltst_basicschema.h:5812
@ ATTRIBUTE_ID_ALLOWS_DIRECT_MANIPULATION
Definition s_baltst_basicschema.h:2650
@ ATTRIBUTE_ID_ALLOCATES_MEMORY
Definition s_baltst_basicschema.h:2649
@ ATTRIBUTE_ID_MAX_OCCURS
Definition s_baltst_basicschema.h:2645
@ ATTRIBUTE_ID_TYPE
Definition s_baltst_basicschema.h:2643
@ ATTRIBUTE_ID_DEFAULT_VALUE
Definition s_baltst_basicschema.h:2646
@ ATTRIBUTE_ID_CHOICE
Definition s_baltst_basicschema.h:2651
@ ATTRIBUTE_ID_CPPDEFAULT
Definition s_baltst_basicschema.h:2647
@ ATTRIBUTE_ID_MIN_OCCURS
Definition s_baltst_basicschema.h:2644
@ ATTRIBUTE_ID_NAME
Definition s_baltst_basicschema.h:2642
@ ATTRIBUTE_ID_CPPTYPE
Definition s_baltst_basicschema.h:2648
bdlb::NullableValue< bsl::string > & defaultValue()
Definition s_baltst_basicschema.h:5794
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_basicschema.h:2674
bdlb::NullableValue< bsl::string > & minOccurs()
Definition s_baltst_basicschema.h:5782
bdlb::NullableValue< bsl::string > & cppdefault()
Definition s_baltst_basicschema.h:5800
bdlb::NullableValue< bsl::string > & allowsDirectManipulation()
Definition s_baltst_basicschema.h:5818
~BasicSchemaElement()
Destroy this object.
BasicSchemaElement & operator=(const BasicSchemaElement &rhs)
Assign to this object the value of the specified rhs object.
int accessAttribute(ACCESSOR &accessor, int id) const
Definition s_baltst_basicschema.h:5889
bdlb::NullableValue< bsl::string > & cpptype()
Definition s_baltst_basicschema.h:5806
Definition s_baltst_basicschema.h:307
@ SELECTION_ID_ANNOTATION
Definition s_baltst_basicschema.h:322
@ SELECTION_ID_UNDEFINED
Definition s_baltst_basicschema.h:321
@ NUM_SELECTIONS
Definition s_baltst_basicschema.h:326
@ SELECTION_INDEX_ANNOTATION
Definition s_baltst_basicschema.h:330
const char * selectionName() const
Return the symbolic name of the current selection of this object.
bsls::ObjectBuffer< BasicSchemaAnnotationElement > d_annotation
Definition s_baltst_basicschema.h:311
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
BasicSchemaAnnotationElement & annotation()
Definition s_baltst_basicschema.h:4326
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
BasicSchemaEnumerationElementChoice(bslma::Allocator *basicAllocator=0)
Definition s_baltst_basicschema.h:4299
BasicSchemaAnnotationElement & makeAnnotation()
bool isUndefinedValue() const
Definition s_baltst_basicschema.h:4366
~BasicSchemaEnumerationElementChoice()
Destroy this object.
Definition s_baltst_basicschema.h:4306
int makeSelection(const char *name, int nameLength)
int selectionId() const
Definition s_baltst_basicschema.h:4334
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_basicschema.h:336
BasicSchemaEnumerationElementChoice(const BasicSchemaEnumerationElementChoice &original, bslma::Allocator *basicAllocator=0)
int manipulateSelection(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:4313
BasicSchemaAnnotationElement & makeAnnotation(const BasicSchemaAnnotationElement &value)
bool isAnnotationValue() const
Definition s_baltst_basicschema.h:4360
static const bdlat_SelectionInfo * lookupSelectionInfo(const char *name, int nameLength)
BasicSchemaEnumerationElementChoice & operator=(const BasicSchemaEnumerationElementChoice &rhs)
Assign to this object the value of the specified rhs object.
int accessSelection(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:4340
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:334
Definition s_baltst_basicschema.h:521
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
BasicSchemaEnumerationElement(bslma::Allocator *basicAllocator=0)
@ NUM_ATTRIBUTES
Definition s_baltst_basicschema.h:535
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
int manipulateAttributes(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:4394
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:544
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_basicschema.h:546
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
BasicSchemaEnumerationElement(const BasicSchemaEnumerationElement &original, bslma::Allocator *basicAllocator=0)
int accessAttributes(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:4459
int accessAttribute(ACCESSOR &accessor, int id) const
Definition s_baltst_basicschema.h:4477
int manipulateAttribute(MANIPULATOR &manipulator, int id)
Definition s_baltst_basicschema.h:4412
@ ATTRIBUTE_INDEX_CHOICE
Definition s_baltst_basicschema.h:540
@ ATTRIBUTE_INDEX_VALUE
Definition s_baltst_basicschema.h:539
~BasicSchemaEnumerationElement()
Destroy this object.
bdlb::NullableValue< bsl::string > & value()
Definition s_baltst_basicschema.h:4446
@ ATTRIBUTE_ID_CHOICE
Definition s_baltst_basicschema.h:531
@ ATTRIBUTE_ID_VALUE
Definition s_baltst_basicschema.h:530
bsl::vector< BasicSchemaEnumerationElementChoice > & choice()
Definition s_baltst_basicschema.h:4452
BasicSchemaEnumerationElement & operator=(const BasicSchemaEnumerationElement &rhs)
Assign to this object the value of the specified rhs object.
Definition s_baltst_basicschema.h:744
~BasicSchemaRestrictionElementChoice()
Destroy this object.
Definition s_baltst_basicschema.h:4548
int selectionId() const
Definition s_baltst_basicschema.h:4586
const char * selectionName() const
Return the symbolic name of the current selection of this object.
BasicSchemaRestrictionElementChoice(bslma::Allocator *basicAllocator=0)
Definition s_baltst_basicschema.h:4541
BasicSchemaRestrictionElementChoice & operator=(const BasicSchemaRestrictionElementChoice &rhs)
Assign to this object the value of the specified rhs object.
static const bdlat_SelectionInfo * lookupSelectionInfo(const char *name, int nameLength)
int makeSelection(const char *name, int nameLength)
BasicSchemaAnnotationElement & makeAnnotation(const BasicSchemaAnnotationElement &value)
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
bool isEnumerationValue() const
Definition s_baltst_basicschema.h:4628
bool isAnnotationValue() const
Definition s_baltst_basicschema.h:4622
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
bsls::ObjectBuffer< BasicSchemaEnumerationElement > d_enumeration
Definition s_baltst_basicschema.h:749
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_basicschema.h:776
@ NUM_SELECTIONS
Definition s_baltst_basicschema.h:765
BasicSchemaEnumerationElement & makeEnumeration()
BasicSchemaEnumerationElement & makeEnumeration(const BasicSchemaEnumerationElement &value)
bool isUndefinedValue() const
Definition s_baltst_basicschema.h:4634
int manipulateSelection(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:4555
BasicSchemaEnumerationElement & enumeration()
Definition s_baltst_basicschema.h:4578
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:774
@ SELECTION_INDEX_ANNOTATION
Definition s_baltst_basicschema.h:769
@ SELECTION_INDEX_ENUMERATION
Definition s_baltst_basicschema.h:770
BasicSchemaAnnotationElement & makeAnnotation()
bsls::ObjectBuffer< BasicSchemaAnnotationElement > d_annotation
Definition s_baltst_basicschema.h:748
@ SELECTION_ID_ANNOTATION
Definition s_baltst_basicschema.h:760
@ SELECTION_ID_ENUMERATION
Definition s_baltst_basicschema.h:761
@ SELECTION_ID_UNDEFINED
Definition s_baltst_basicschema.h:759
BasicSchemaAnnotationElement & annotation()
Definition s_baltst_basicschema.h:4571
int accessSelection(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:4592
BasicSchemaRestrictionElementChoice(const BasicSchemaRestrictionElementChoice &original, bslma::Allocator *basicAllocator=0)
Definition s_baltst_basicschema.h:985
@ ATTRIBUTE_ID_BASE
Definition s_baltst_basicschema.h:994
@ ATTRIBUTE_ID_CHOICE
Definition s_baltst_basicschema.h:995
int manipulateAttributes(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:4665
int manipulateAttribute(MANIPULATOR &manipulator, int id)
Definition s_baltst_basicschema.h:4683
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
int accessAttribute(ACCESSOR &accessor, int id) const
Definition s_baltst_basicschema.h:4748
BasicSchemaRestrictionElement & operator=(const BasicSchemaRestrictionElement &rhs)
Assign to this object the value of the specified rhs object.
bdlb::NullableValue< bsl::string > & base()
Definition s_baltst_basicschema.h:4717
bsl::vector< BasicSchemaRestrictionElementChoice > & choice()
Definition s_baltst_basicschema.h:4723
BasicSchemaRestrictionElement(bslma::Allocator *basicAllocator=0)
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:1008
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
~BasicSchemaRestrictionElement()
Destroy this object.
BasicSchemaRestrictionElement(const BasicSchemaRestrictionElement &original, bslma::Allocator *basicAllocator=0)
@ ATTRIBUTE_INDEX_BASE
Definition s_baltst_basicschema.h:1003
@ ATTRIBUTE_INDEX_CHOICE
Definition s_baltst_basicschema.h:1004
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_basicschema.h:1010
@ NUM_ATTRIBUTES
Definition s_baltst_basicschema.h:999
int accessAttributes(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:4730
Definition s_baltst_basicschema.h:3414
BasicSchemaElement & makeElement(const BasicSchemaElement &value)
BasicSchemaAnnotationElement & makeAnnotation()
@ SELECTION_INDEX_ANNOTATION
Definition s_baltst_basicschema.h:3439
@ SELECTION_INDEX_ELEMENT
Definition s_baltst_basicschema.h:3440
int manipulateSelection(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:6318
BasicSchemaElement * d_element
Definition s_baltst_basicschema.h:3419
bool isUndefinedValue() const
Definition s_baltst_basicschema.h:6397
BasicSchemaSequenceElementChoice(const BasicSchemaSequenceElementChoice &original, bslma::Allocator *basicAllocator=0)
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:3444
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
@ SELECTION_ID_ELEMENT
Definition s_baltst_basicschema.h:3431
@ SELECTION_ID_ANNOTATION
Definition s_baltst_basicschema.h:3430
@ SELECTION_ID_UNDEFINED
Definition s_baltst_basicschema.h:3429
~BasicSchemaSequenceElementChoice()
Destroy this object.
Definition s_baltst_basicschema.h:6311
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_basicschema.h:3446
int accessSelection(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:6355
BasicSchemaElement & element()
Definition s_baltst_basicschema.h:6341
bsls::ObjectBuffer< BasicSchemaAnnotationElement > d_annotation
Definition s_baltst_basicschema.h:3418
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
@ NUM_SELECTIONS
Definition s_baltst_basicschema.h:3435
BasicSchemaSequenceElementChoice(bslma::Allocator *basicAllocator=0)
Definition s_baltst_basicschema.h:6304
BasicSchemaAnnotationElement & annotation()
Definition s_baltst_basicschema.h:6334
int makeSelection(const char *name, int nameLength)
BasicSchemaSequenceElementChoice & operator=(const BasicSchemaSequenceElementChoice &rhs)
Assign to this object the value of the specified rhs object.
const char * selectionName() const
Return the symbolic name of the current selection of this object.
BasicSchemaAnnotationElement & makeAnnotation(const BasicSchemaAnnotationElement &value)
int selectionId() const
Definition s_baltst_basicschema.h:6349
bool isElementValue() const
Definition s_baltst_basicschema.h:6391
bool isAnnotationValue() const
Definition s_baltst_basicschema.h:6385
static const bdlat_SelectionInfo * lookupSelectionInfo(const char *name, int nameLength)
Definition s_baltst_basicschema.h:3202
int manipulateAttribute(MANIPULATOR &manipulator, int id)
Definition s_baltst_basicschema.h:6199
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
bsl::vector< BasicSchemaSequenceElementChoice > & choice()
Definition s_baltst_basicschema.h:6230
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_basicschema.h:3224
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:3222
int accessAttribute(ACCESSOR &accessor, int id) const
Definition s_baltst_basicschema.h:6250
~BasicSchemaSequenceElement()
Destroy this object.
@ ATTRIBUTE_INDEX_CHOICE
Definition s_baltst_basicschema.h:3218
BasicSchemaSequenceElement(const BasicSchemaSequenceElement &original, bslma::Allocator *basicAllocator=0)
int manipulateAttributes(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:6186
int accessAttributes(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:6237
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
@ ATTRIBUTE_ID_CHOICE
Definition s_baltst_basicschema.h:3210
BasicSchemaSequenceElement & operator=(const BasicSchemaSequenceElement &rhs)
Assign to this object the value of the specified rhs object.
@ NUM_ATTRIBUTES
Definition s_baltst_basicschema.h:3214
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
BasicSchemaSequenceElement(bslma::Allocator *basicAllocator=0)
Definition s_baltst_basicschema.h:1208
BasicSchemaAnnotationElement & makeAnnotation()
static const bdlat_SelectionInfo * lookupSelectionInfo(int id)
BasicSchemaSimpleTypeElementChoice(const BasicSchemaSimpleTypeElementChoice &original, bslma::Allocator *basicAllocator=0)
static const bdlat_SelectionInfo * lookupSelectionInfo(const char *name, int nameLength)
BasicSchemaSimpleTypeElementChoice & operator=(const BasicSchemaSimpleTypeElementChoice &rhs)
Assign to this object the value of the specified rhs object.
BasicSchemaRestrictionElement & makeRestriction(const BasicSchemaRestrictionElement &value)
BasicSchemaSimpleTypeElementChoice(bslma::Allocator *basicAllocator=0)
Definition s_baltst_basicschema.h:4812
bool isRestrictionValue() const
Definition s_baltst_basicschema.h:4899
bsls::ObjectBuffer< BasicSchemaRestrictionElement > d_restriction
Definition s_baltst_basicschema.h:1213
@ SELECTION_INDEX_ANNOTATION
Definition s_baltst_basicschema.h:1233
@ SELECTION_INDEX_RESTRICTION
Definition s_baltst_basicschema.h:1234
int accessSelection(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:4863
int manipulateSelection(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:4826
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
int selectionId() const
Definition s_baltst_basicschema.h:4857
@ SELECTION_ID_RESTRICTION
Definition s_baltst_basicschema.h:1225
@ SELECTION_ID_ANNOTATION
Definition s_baltst_basicschema.h:1224
@ SELECTION_ID_UNDEFINED
Definition s_baltst_basicschema.h:1223
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:1238
bool isUndefinedValue() const
Definition s_baltst_basicschema.h:4905
bool isAnnotationValue() const
Definition s_baltst_basicschema.h:4893
BasicSchemaAnnotationElement & annotation()
Definition s_baltst_basicschema.h:4842
bsls::ObjectBuffer< BasicSchemaAnnotationElement > d_annotation
Definition s_baltst_basicschema.h:1212
BasicSchemaRestrictionElement & makeRestriction()
BasicSchemaAnnotationElement & makeAnnotation(const BasicSchemaAnnotationElement &value)
const char * selectionName() const
Return the symbolic name of the current selection of this object.
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[]
Definition s_baltst_basicschema.h:1240
~BasicSchemaSimpleTypeElementChoice()
Destroy this object.
Definition s_baltst_basicschema.h:4819
BasicSchemaRestrictionElement & restriction()
Definition s_baltst_basicschema.h:4849
@ NUM_SELECTIONS
Definition s_baltst_basicschema.h:1229
int makeSelection(const char *name, int nameLength)
Definition s_baltst_basicschema.h:1448
BasicSchemaSimpleTypeElement(bslma::Allocator *basicAllocator=0)
BasicSchemaSimpleTypeElement & operator=(const BasicSchemaSimpleTypeElement &rhs)
Assign to this object the value of the specified rhs object.
int accessAttributes(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:5015
int manipulateAttributes(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:4936
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:1474
int manipulateAttribute(MANIPULATOR &manipulator, int id)
Definition s_baltst_basicschema.h:4959
BasicSchemaSimpleTypeElement(const BasicSchemaSimpleTypeElement &original, bslma::Allocator *basicAllocator=0)
@ ATTRIBUTE_ID_CHOICE
Definition s_baltst_basicschema.h:1460
@ ATTRIBUTE_ID_PRESERVE_ENUM_ORDER
Definition s_baltst_basicschema.h:1459
@ ATTRIBUTE_ID_NAME
Definition s_baltst_basicschema.h:1458
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_basicschema.h:1476
bdlb::NullableValue< bsl::string > & name()
Definition s_baltst_basicschema.h:4996
@ NUM_ATTRIBUTES
Definition s_baltst_basicschema.h:1464
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
bdlb::NullableValue< bsl::string > & preserveEnumOrder()
Definition s_baltst_basicschema.h:5002
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
int accessAttribute(ACCESSOR &accessor, int id) const
Definition s_baltst_basicschema.h:5038
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
~BasicSchemaSimpleTypeElement()
Destroy this object.
bsl::vector< BasicSchemaSimpleTypeElementChoice > & choice()
Definition s_baltst_basicschema.h:5008
@ ATTRIBUTE_INDEX_CHOICE
Definition s_baltst_basicschema.h:1470
@ ATTRIBUTE_INDEX_PRESERVE_ENUM_ORDER
Definition s_baltst_basicschema.h:1469
@ ATTRIBUTE_INDEX_NAME
Definition s_baltst_basicschema.h:1468
Definition s_baltst_basicschema.h:3920
@ ATTRIBUTE_ID_CHOICE
Definition s_baltst_basicschema.h:3936
@ ATTRIBUTE_ID_XS
Definition s_baltst_basicschema.h:3932
@ ATTRIBUTE_ID_ELEMENT_FORM_DEFAULT
Definition s_baltst_basicschema.h:3935
@ ATTRIBUTE_ID_PACKAGE
Definition s_baltst_basicschema.h:3934
@ ATTRIBUTE_ID_BDEM
Definition s_baltst_basicschema.h:3933
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_basicschema.h:3954
bdlb::NullableValue< bsl::string > & bdem()
Definition s_baltst_basicschema.h:6663
BasicSchema & operator=(const BasicSchema &rhs)
Assign to this object the value of the specified rhs object.
int manipulateAttributes(MANIPULATOR &manipulator)
Definition s_baltst_basicschema.h:6581
@ ATTRIBUTE_INDEX_CHOICE
Definition s_baltst_basicschema.h:3948
@ ATTRIBUTE_INDEX_BDEM
Definition s_baltst_basicschema.h:3945
@ ATTRIBUTE_INDEX_ELEMENT_FORM_DEFAULT
Definition s_baltst_basicschema.h:3947
@ ATTRIBUTE_INDEX_XS
Definition s_baltst_basicschema.h:3944
@ ATTRIBUTE_INDEX_PACKAGE
Definition s_baltst_basicschema.h:3946
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
bdlb::NullableValue< bsl::string > & elementFormDefault()
Definition s_baltst_basicschema.h:6675
BasicSchema(bslma::Allocator *basicAllocator=0)
bdlb::NullableValue< bsl::string > & xs()
Return a reference to the modifiable "Xs" attribute of this object.
Definition s_baltst_basicschema.h:6657
bdlb::NullableValue< bsl::string > & package()
Definition s_baltst_basicschema.h:6669
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
@ NUM_ATTRIBUTES
Definition s_baltst_basicschema.h:3940
bsl::vector< BasicSchemaChoice > & choice()
Definition s_baltst_basicschema.h:6681
int accessAttribute(ACCESSOR &accessor, int id) const
Definition s_baltst_basicschema.h:6721
BasicSchema(const BasicSchema &original, bslma::Allocator *basicAllocator=0)
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
~BasicSchema()
Destroy this object.
static const char CLASS_NAME[]
Definition s_baltst_basicschema.h:3952
int manipulateAttribute(MANIPULATOR &manipulator, int id)
Definition s_baltst_basicschema.h:6614
int accessAttributes(ACCESSOR &accessor) const
Definition s_baltst_basicschema.h:6688
#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
bsl::enable_if<(bsl::is_integral< TYPE >::value||bsl::is_pointer< TYPE >::value||bsl::is_enum< TYPE >::value)&&!bsl::is_same< TYPE, bool >::value >::type hashAppend(HASH_ALGORITHM &hashAlg, TYPE input)
Definition bslh_hash.h:638
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)
void hashAppend(HASH_ALGORITHM &hashAlg, const s_baltst::BasicSchemaAnnotationElement &object)
Definition s_baltst_basicschema.h:4282
Definition bdlat_attributeinfo.h:137
int d_id
Definition bdlat_attributeinfo.h:140
Definition bdlat_selectioninfo.h:136
Definition bsls_objectbuffer.h:276