BDE 4.39.x Production Release
Loading...
Searching...
No Matches
s_baltst_customizedbase64binary.h
Go to the documentation of this file.
1/// @file s_baltst_customizedbase64binary.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// s_baltst_customizedbase64binary.h *DO NOT EDIT* @generated -*-C++-*-
8#ifndef INCLUDED_S_BALTST_CUSTOMIZEDBASE64BINARY
9#define INCLUDED_S_BALTST_CUSTOMIZEDBASE64BINARY
10
11#include <bsls_ident.h>
12BSLS_IDENT_RCSID(s_baltst_customizedbase64binary_h, "$Id$ $CSID$")
14
15/// @defgroup s_baltst_customizedbase64binary s_baltst_customizedbase64binary
16/// @brief Provide value-semantic attribute classes
17/// @addtogroup Standalones
18/// @{
19/// @addtogroup s_baltst
20/// @{
21/// @addtogroup s_baltst_customizedbase64binary
22/// @{
23///
24/// <h1> Outline </h1>
25/// * <a href="#s_baltst_customizedbase64binary-purpose"> Purpose</a>
26///
27/// # Purpose {#s_baltst_customizedbase64binary-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_customizedbase64binary
40 * @{
41 */
42
43#include <bslalg_typetraits.h>
44
45#include <bdlat_attributeinfo.h>
46
47#include <bdlat_typetraits.h>
48
50
51#include <bsls_assert.h>
52
53#include <bsl_vector.h>
54
55#include <bsl_iosfwd.h>
56#include <bsl_limits.h>
57
58
59
60namespace s_baltst { class CustomizedBase64Binary; }
61namespace s_baltst {
62
63 // ============================
64 // class CustomizedBase64Binary
65 // ============================
66
68
69 // INSTANCE DATA
70 bsl::vector<char> d_value;
71
72 public:
73 // TYPES
75
76 // CONSTANTS
77 static const char CLASS_NAME[];
78
79 // CREATORS
80
81 /// Create an object of type `CustomizedBase64Binary` having the default
82 /// value.
84
85 /// Create an object of type `CustomizedBase64Binary` having the value
86 /// of the specified `original` object.
88
89#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
90 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
91 /// Create an object of type `CustomizedBase64Binary` having the value
92 /// of the specified `original` object. After performing this action,
93 /// the `original` object will be left in a valid, but unspecified
94 /// state.
96#endif
97
98 /// Create an object of type `CustomizedBase64Binary` having the
99 /// specified `value`.
100 explicit CustomizedBase64Binary(const bsl::vector<char>& value);
101
102 /// Destroy this object.
104
105 // MANIPULATORS
106
107 /// Assign to this object the value of the specified `rhs` object.
109
110#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
111 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
112 /// Assign to this object the value of the specified `rhs` object.
113 /// After performing this action, the `rhs` object will be left in a
114 /// valid, but unspecified state.
116#endif
117
118 /// Reset this object to the default value (i.e., its value upon
119 /// default construction).
120 void reset();
121
122 /// Convert from the specified `value` to this type. Return 0 if
123 /// successful and non-zero otherwise.
124 int fromVector(const bsl::vector<char>& value);
125
126 // ACCESSORS
127
128 /// Format this object to the specified output `stream` at the
129 /// optionally specified indentation `level` and return a reference to
130 /// the modifiable `stream`. If `level` is specified, optionally
131 /// specify `spacesPerLevel`, the number of spaces per indentation level
132 /// for this and all of its nested objects. Each line is indented by
133 /// the absolute value of `level * spacesPerLevel`. If `level` is
134 /// negative, suppress indentation of the first line. If
135 /// `spacesPerLevel` is negative, suppress line breaks and format the
136 /// entire output on one line. If `stream` is initially invalid, this operation has no effect.
137 ///
138 /// \note Note that a trailing newline is provided
139 /// in multiline mode only.
140 bsl::ostream& print(bsl::ostream& stream,
141 int level = 0,
142 int spacesPerLevel = 4) const;
143
144 /// Convert this value to `bsl::vector<char>`.
145 const bsl::vector<char>& toVector() const;
146
147 // PUBLIC CLASS METHODS
148
149 /// Check if the specified `value` satisfies the restrictions of this
150 /// class (i.e., "CustomizedBase64Binary"). Return 0 if successful
151 /// (i.e., the restrictions are satisfied) and non-zero otherwise.
152 static int checkRestrictions(const bsl::vector<char>& value);
153
154 // HIDDEN FRIENDS
155
156 /// Return `true` if the specified `lhs` and `rhs` attribute objects
157 /// have the same value, and `false` otherwise. Two attribute objects
158 /// have the same value if each respective attribute has the same value.
159 friend bool operator==(const CustomizedBase64Binary& lhs,
160 const CustomizedBase64Binary& rhs)
161 {
162 return lhs.d_value == rhs.d_value;
163 }
164
165 /// Return `true` if the specified `lhs` and `rhs` attribute objects do
166 /// not have the same value, and `false` otherwise. Two attribute
167 /// objects do not have the same value if one or more respective
168 /// attributes differ in values.
169 friend bool operator!=(const CustomizedBase64Binary& lhs,
170 const CustomizedBase64Binary& rhs)
171 {
172 return lhs.d_value != rhs.d_value;
173 }
174
175 /// Format the specified `rhs` to the specified output `stream` and
176 /// return a reference to the modifiable `stream`.
177 friend bsl::ostream& operator<<(bsl::ostream& stream,
178 const CustomizedBase64Binary& rhs)
179 {
180 return rhs.print(stream, 0, -1);
181 }
182};
183
184} // close package namespace
185
186// TRAITS
187
189
190// ============================================================================
191// INLINE DEFINITIONS
192// ============================================================================
193
194namespace s_baltst {
195
196 // ----------------------------
197 // class CustomizedBase64Binary
198 // ----------------------------
199
200// PRIVATE CLASS METHODS
201inline
203{
204 (void)value;
205 return 0;
206}
207
208// CREATORS
209inline
214
215inline
217: d_value(original.d_value)
218{
219}
220
221inline
223: d_value(value)
224{
225 BSLS_ASSERT(checkRestrictions(value) == 0);
226}
227
228inline
232
233// MANIPULATORS
234inline
236{
237 d_value = rhs.d_value;
238 return *this;
239}
240
241inline
246
247inline
249{
250 int ret = checkRestrictions(value);
251 if (0 == ret) {
252 d_value = value;
253 }
254
255 return ret;
256}
257
258// ACCESSORS
259inline
260bsl::ostream& CustomizedBase64Binary::print(bsl::ostream& stream,
261 int level,
262 int spacesPerLevel) const
263{
264 return bdlb::PrintMethods::print(stream, d_value, level, spacesPerLevel);
265}
266
267inline
269{
270 return d_value;
271}
272
273} // close package namespace
274
275// FREE FUNCTIONS
276
277
278#endif
279
280// GENERATED BY BLP_BAS_CODEGEN_2025.08.21
281// USING bas_codegen.pl s_baltst_customizedbase64binary.xsd --mode msg --includedir . --msgComponent customizedbase64binary --noRecurse --noExternalization --noHashSupport --noAggregateConversion
282// ----------------------------------------------------------------------------
283// NOTICE:
284// Copyright 2025 Bloomberg Finance L.P. All rights reserved.
285// Property of Bloomberg Finance L.P. (BFLP)
286// This software is made available solely pursuant to the
287// terms of a BFLP license agreement which governs its use.
288// ------------------------------- END-OF-FILE --------------------------------
289
290/** @} */
291/** @} */
292/** @} */
Definition bslstl_vector.h:1120
Definition s_baltst_customizedbase64binary.h:67
static const char CLASS_NAME[]
Definition s_baltst_customizedbase64binary.h:77
CustomizedBase64Binary()
Definition s_baltst_customizedbase64binary.h:210
void reset()
Definition s_baltst_customizedbase64binary.h:242
static int checkRestrictions(const bsl::vector< char > &value)
Definition s_baltst_customizedbase64binary.h:202
int fromVector(const bsl::vector< char > &value)
Definition s_baltst_customizedbase64binary.h:248
friend bool operator==(const CustomizedBase64Binary &lhs, const CustomizedBase64Binary &rhs)
Definition s_baltst_customizedbase64binary.h:159
friend bool operator!=(const CustomizedBase64Binary &lhs, const CustomizedBase64Binary &rhs)
Definition s_baltst_customizedbase64binary.h:169
bsl::vector< char > BaseType
Definition s_baltst_customizedbase64binary.h:74
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition s_baltst_customizedbase64binary.h:260
friend bsl::ostream & operator<<(bsl::ostream &stream, const CustomizedBase64Binary &rhs)
Definition s_baltst_customizedbase64binary.h:177
~CustomizedBase64Binary()
Destroy this object.
Definition s_baltst_customizedbase64binary.h:229
CustomizedBase64Binary & operator=(const CustomizedBase64Binary &rhs)
Assign to this object the value of the specified rhs object.
Definition s_baltst_customizedbase64binary.h:235
const bsl::vector< char > & toVector() const
Convert this value to bsl::vector<char>.
Definition s_baltst_customizedbase64binary.h:268
#define BDLAT_DECL_CUSTOMIZEDTYPE_WITH_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:344
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_IDENT_RCSID(tag, str)
BSLS_IDENT_RCSID() - insert ident str (specific to platform/compiler)
Definition bsls_ident.h:244
#define BSLS_IDENT_PRAGMA_ONCE
BSLS_IDENT_PRAGMA_ONCE - macro to avoid multiple inclusion
Definition bsls_ident.h:263
void reset(TYPE *object)
Reset the value of the specified object to its default value.
bsl::ostream & print(bsl::ostream &stream, const TYPE &object, int level=0, int spacesPerLevel=4)
Definition bdlb_printmethods.h:725
Definition s_baltst_address.h:66