BDE 4.14.0 Production release
Loading...
Searching...
No Matches
s_baltst_mysequencewithcustomizedbase64binary.h
Go to the documentation of this file.
1/// @file s_baltst_mysequencewithcustomizedbase64binary.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// s_baltst_mysequencewithcustomizedbase64binary.h *DO NOT EDIT* @generated -*-C++-*-
8#ifndef INCLUDED_S_BALTST_MYSEQUENCEWITHCUSTOMIZEDBASE64BINARY
9#define INCLUDED_S_BALTST_MYSEQUENCEWITHCUSTOMIZEDBASE64BINARY
10
11#include <bsls_ident.h>
12BSLS_IDENT_RCSID(s_baltst_mysequencewithcustomizedbase64binary_h, "$Id$ $CSID$")
14
15/// @defgroup s_baltst_mysequencewithcustomizedbase64binary s_baltst_mysequencewithcustomizedbase64binary
16/// @brief Provide value-semantic attribute classes
17/// @addtogroup Standalones
18/// @{
19/// @addtogroup s_baltst
20/// @{
21/// @addtogroup s_baltst_mysequencewithcustomizedbase64binary
22/// @{
23///
24/// <h1> Outline </h1>
25/// * <a href="#s_baltst_mysequencewithcustomizedbase64binary-purpose"> Purpose</a>
26///
27/// # Purpose {#s_baltst_mysequencewithcustomizedbase64binary-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_mysequencewithcustomizedbase64binary
40 * @{
41 */
42
43#include <bslalg_typetraits.h>
44
45#include <bdlat_attributeinfo.h>
46
47#include <bdlat_selectioninfo.h>
48
49#include <bdlat_typetraits.h>
50
51#include <bsls_objectbuffer.h>
52
53#include <bsls_assert.h>
54
56
57#include <bsl_iosfwd.h>
58#include <bsl_limits.h>
59
60
61
62namespace s_baltst { class MySequenceWithCustomizedBase64Binary; }
63namespace s_baltst {
64
65 // ==========================================
66 // class MySequenceWithCustomizedBase64Binary
67 // ==========================================
68
70
71 // INSTANCE DATA
73
74 public:
75 // TYPES
76 enum {
78 };
79
80 enum {
82 };
83
84 enum {
86 };
87
88 // CONSTANTS
89 static const char CLASS_NAME[];
90
92
93 public:
94 // CLASS METHODS
95
96 /// Return attribute information for the attribute indicated by the
97 /// specified `id` if the attribute exists, and 0 otherwise.
99
100 /// Return attribute information for the attribute indicated by the
101 /// specified `name` of the specified `nameLength` if the attribute
102 /// exists, and 0 otherwise.
104 const char *name,
105 int nameLength);
106
107 // CREATORS
108
109 /// Create an object of type `MySequenceWithCustomizedBase64Binary`
110 /// having the default value.
112
113 /// Create an object of type `MySequenceWithCustomizedBase64Binary`
114 /// having the value of the specified `original` object.
116
117#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
118 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
119 /// Create an object of type `MySequenceWithCustomizedBase64Binary`
120 /// having the value of the specified `original` object. After
121 /// performing this action, the `original` object will be left in a
122 /// valid, but unspecified state.
124#endif
125
126 /// Destroy this object.
128
129 // MANIPULATORS
130
131 /// Assign to this object the value of the specified `rhs` object.
133
134#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
135 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
136 /// Assign to this object the value of the specified `rhs` object.
137 /// After performing this action, the `rhs` object will be left in a
138 /// valid, but unspecified state.
140#endif
141
142 /// Reset this object to the default value (i.e., its value upon
143 /// default construction).
144 void reset();
145
146 /// Invoke the specified `manipulator` sequentially on the address of
147 /// each (modifiable) attribute of this object, supplying `manipulator`
148 /// with the corresponding attribute information structure until such
149 /// invocation returns a non-zero value. Return the value from the
150 /// last invocation of `manipulator` (i.e., the invocation that
151 /// terminated the sequence).
152 template <typename t_MANIPULATOR>
153 int manipulateAttributes(t_MANIPULATOR& manipulator);
154
155 /// Invoke the specified `manipulator` on the address of
156 /// the (modifiable) attribute indicated by the specified `id`,
157 /// supplying `manipulator` with the corresponding attribute
158 /// information structure. Return the value returned from the
159 /// invocation of `manipulator` if `id` identifies an attribute of this
160 /// class, and -1 otherwise.
161 template <typename t_MANIPULATOR>
162 int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
163
164 /// Invoke the specified `manipulator` on the address of
165 /// the (modifiable) attribute indicated by the specified `name` of the
166 /// specified `nameLength`, supplying `manipulator` with the
167 /// corresponding attribute information structure. Return the value
168 /// returned from the invocation of `manipulator` if `name` identifies
169 /// an attribute of this class, and -1 otherwise.
170 template <typename t_MANIPULATOR>
171 int manipulateAttribute(t_MANIPULATOR& manipulator,
172 const char *name,
173 int nameLength);
174
175 /// Return a reference to the modifiable "Element" attribute of this
176 /// object.
178
179 // ACCESSORS
180
181 /// Format this object to the specified output `stream` at the
182 /// optionally specified indentation `level` and return a reference to
183 /// the modifiable `stream`. If `level` is specified, optionally
184 /// specify `spacesPerLevel`, the number of spaces per indentation level
185 /// for this and all of its nested objects. Each line is indented by
186 /// the absolute value of `level * spacesPerLevel`. If `level` is
187 /// negative, suppress indentation of the first line. If
188 /// `spacesPerLevel` is negative, suppress line breaks and format the
189 /// entire output on one line. If `stream` is initially invalid, this
190 /// operation has no effect. Note that a trailing newline is provided
191 /// in multiline mode only.
192 bsl::ostream& print(bsl::ostream& stream,
193 int level = 0,
194 int spacesPerLevel = 4) const;
195
196 /// Invoke the specified `accessor` sequentially on each
197 /// (non-modifiable) attribute of this object, supplying `accessor`
198 /// with the corresponding attribute information structure until such
199 /// invocation returns a non-zero value. Return the value from the
200 /// last invocation of `accessor` (i.e., the invocation that terminated
201 /// the sequence).
202 template <typename t_ACCESSOR>
203 int accessAttributes(t_ACCESSOR& accessor) const;
204
205 /// Invoke the specified `accessor` on the (non-modifiable) attribute
206 /// of this object indicated by the specified `id`, supplying `accessor`
207 /// with the corresponding attribute information structure. Return the
208 /// value returned from the invocation of `accessor` if `id` identifies
209 /// an attribute of this class, and -1 otherwise.
210 template <typename t_ACCESSOR>
211 int accessAttribute(t_ACCESSOR& accessor, int id) const;
212
213 /// Invoke the specified `accessor` on the (non-modifiable) attribute
214 /// of this object indicated by the specified `name` of the specified
215 /// `nameLength`, supplying `accessor` with the corresponding attribute
216 /// information structure. Return the value returned from the
217 /// invocation of `accessor` if `name` identifies an attribute of this
218 /// class, and -1 otherwise.
219 template <typename t_ACCESSOR>
220 int accessAttribute(t_ACCESSOR& accessor,
221 const char *name,
222 int nameLength) const;
223
224 /// Return a reference offering non-modifiable access to the "Element"
225 /// attribute of this object.
227};
228
229// FREE OPERATORS
230
231/// Return `true` if the specified `lhs` and `rhs` attribute objects have
232/// the same value, and `false` otherwise. Two attribute objects have the
233/// same value if each respective attribute has the same value.
234inline
236
237/// Return `true` if the specified `lhs` and `rhs` attribute objects do not
238/// have the same value, and `false` otherwise. Two attribute objects do
239/// not have the same value if one or more respective attributes differ in
240/// values.
241inline
243
244/// Format the specified `rhs` to the specified output `stream` and
245/// return a reference to the modifiable `stream`.
246inline
247bsl::ostream& operator<<(bsl::ostream& stream, const MySequenceWithCustomizedBase64Binary& rhs);
248
249} // close package namespace
250
251// TRAITS
252
254
255// ============================================================================
256// INLINE FUNCTION DEFINITIONS
257// ============================================================================
258
259namespace s_baltst {
260
261 // ------------------------------------------
262 // class MySequenceWithCustomizedBase64Binary
263 // ------------------------------------------
264
265// CLASS METHODS
266// MANIPULATORS
267template <typename t_MANIPULATOR>
269{
270 int ret;
271
272 ret = manipulator(&d_element, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELEMENT]);
273 if (ret) {
274 return ret;
275 }
276
277 return 0;
278}
279
280template <typename t_MANIPULATOR>
282{
283 enum { NOT_FOUND = -1 };
284
285 switch (id) {
287 return manipulator(&d_element, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELEMENT]);
288 }
289 default:
290 return NOT_FOUND;
291 }
292}
293
294template <typename t_MANIPULATOR>
296 t_MANIPULATOR& manipulator,
297 const char *name,
298 int nameLength)
299{
300 enum { NOT_FOUND = -1 };
301
302 const bdlat_AttributeInfo *attributeInfo =
303 lookupAttributeInfo(name, nameLength);
304 if (0 == attributeInfo) {
305 return NOT_FOUND;
306 }
307
308 return manipulateAttribute(manipulator, attributeInfo->d_id);
309}
310
311inline
316
317// ACCESSORS
318template <typename t_ACCESSOR>
320{
321 int ret;
322
323 ret = accessor(d_element, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELEMENT]);
324 if (ret) {
325 return ret;
326 }
327
328 return 0;
329}
330
331template <typename t_ACCESSOR>
332int MySequenceWithCustomizedBase64Binary::accessAttribute(t_ACCESSOR& accessor, int id) const
333{
334 enum { NOT_FOUND = -1 };
335
336 switch (id) {
338 return accessor(d_element, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELEMENT]);
339 }
340 default:
341 return NOT_FOUND;
342 }
343}
344
345template <typename t_ACCESSOR>
347 t_ACCESSOR& accessor,
348 const char *name,
349 int nameLength) const
350{
351 enum { NOT_FOUND = -1 };
352
353 const bdlat_AttributeInfo *attributeInfo =
354 lookupAttributeInfo(name, nameLength);
355 if (0 == attributeInfo) {
356 return NOT_FOUND;
357 }
358
359 return accessAttribute(accessor, attributeInfo->d_id);
360}
361
362inline
367
368} // close package namespace
369
370// FREE FUNCTIONS
371
372inline
376{
377 return lhs.element() == rhs.element();
378}
379
380inline
384{
385 return !(lhs == rhs);
386}
387
388inline
389bsl::ostream& s_baltst::operator<<(
390 bsl::ostream& stream,
392{
393 return rhs.print(stream, 0, -1);
394}
395
396
397#endif
398
399// GENERATED BY @BLP_BAS_CODEGEN_VERSION@
400// USING bas_codegen.pl s_baltst_mysequencewithcustomizedbase64binary.xsd --mode msg --includedir . --msgComponent mysequencewithcustomizedbase64binary --noRecurse --noExternalization --noHashSupport --noAggregateConversion
401// ----------------------------------------------------------------------------
402// NOTICE:
403// Copyright 2023 Bloomberg Finance L.P. All rights reserved.
404// Property of Bloomberg Finance L.P. (BFLP)
405// This software is made available solely pursuant to the
406// terms of a BFLP license agreement which governs its use.
407// ------------------------------- END-OF-FILE --------------------------------
408
409/** @} */
410/** @} */
411/** @} */
Definition s_baltst_customizedbase64binary.h:67
Definition s_baltst_mysequencewithcustomizedbase64binary.h:69
int manipulateAttributes(t_MANIPULATOR &manipulator)
Definition s_baltst_mysequencewithcustomizedbase64binary.h:268
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
int accessAttributes(t_ACCESSOR &accessor) const
Definition s_baltst_mysequencewithcustomizedbase64binary.h:319
int manipulateAttribute(t_MANIPULATOR &manipulator, int id)
Definition s_baltst_mysequencewithcustomizedbase64binary.h:281
@ ATTRIBUTE_INDEX_ELEMENT
Definition s_baltst_mysequencewithcustomizedbase64binary.h:85
@ ATTRIBUTE_ID_ELEMENT
Definition s_baltst_mysequencewithcustomizedbase64binary.h:77
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_mysequencewithcustomizedbase64binary.h:91
static const char CLASS_NAME[]
Definition s_baltst_mysequencewithcustomizedbase64binary.h:89
~MySequenceWithCustomizedBase64Binary()
Destroy this object.
int accessAttribute(t_ACCESSOR &accessor, int id) const
Definition s_baltst_mysequencewithcustomizedbase64binary.h:332
MySequenceWithCustomizedBase64Binary & operator=(const MySequenceWithCustomizedBase64Binary &rhs)
Assign to this object the value of the specified rhs object.
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
s_baltst::CustomizedBase64Binary & element()
Definition s_baltst_mysequencewithcustomizedbase64binary.h:312
@ NUM_ATTRIBUTES
Definition s_baltst_mysequencewithcustomizedbase64binary.h:81
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
MySequenceWithCustomizedBase64Binary(const MySequenceWithCustomizedBase64Binary &original)
#define BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:275
#define BSLS_IDENT_RCSID(tag, str)
Definition bsls_ident.h:260
#define BSLS_IDENT_PRAGMA_ONCE
Definition bsls_ident.h:310
Definition s_baltst_address.h:66
bool operator!=(const Address &lhs, const Address &rhs)
bool operator==(const Address &lhs, const Address &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, const Address &rhs)
Definition bdlat_attributeinfo.h:137
int d_id
Definition bdlat_attributeinfo.h:140