BDE 4.14.0 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 // FRIENDS
73 friend bool operator==(const CustomizedBase64Binary& lhs, const CustomizedBase64Binary& rhs);
74 friend bool operator!=(const CustomizedBase64Binary& lhs, const CustomizedBase64Binary& rhs);
75
76 public:
77 // TYPES
79
80 // CONSTANTS
81 static const char CLASS_NAME[];
82
83 // CREATORS
84
85 /// Create an object of type `CustomizedBase64Binary` having the default
86 /// value.
88
89 /// Create an object of type `CustomizedBase64Binary` having the value
90 /// of the specified `original` object.
92
93#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
94 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
95 /// Create an object of type `CustomizedBase64Binary` having the value
96 /// of the specified `original` object. After performing this action,
97 /// the `original` object will be left in a valid, but unspecified
98 /// state.
100#endif
101
102 /// Create an object of type `CustomizedBase64Binary` having the
103 /// specified `value`.
104 explicit CustomizedBase64Binary(const bsl::vector<char>& value);
105
106 /// Destroy this object.
108
109 // MANIPULATORS
110
111 /// Assign to this object the value of the specified `rhs` object.
113
114#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
115 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
116 /// Assign to this object the value of the specified `rhs` object.
117 /// After performing this action, the `rhs` object will be left in a
118 /// valid, but unspecified state.
120#endif
121
122 /// Reset this object to the default value (i.e., its value upon
123 /// default construction).
124 void reset();
125
126 /// Convert from the specified `value` to this type. Return 0 if
127 /// successful and non-zero otherwise.
128 int fromVector(const bsl::vector<char>& value);
129
130 // ACCESSORS
131
132 /// Format this object to the specified output `stream` at the
133 /// optionally specified indentation `level` and return a reference to
134 /// the modifiable `stream`. If `level` is specified, optionally
135 /// specify `spacesPerLevel`, the number of spaces per indentation level
136 /// for this and all of its nested objects. Each line is indented by
137 /// the absolute value of `level * spacesPerLevel`. If `level` is
138 /// negative, suppress indentation of the first line. If
139 /// `spacesPerLevel` is negative, suppress line breaks and format the
140 /// entire output on one line. If `stream` is initially invalid, this
141 /// operation has no effect. Note that a trailing newline is provided
142 /// in multiline mode only.
143 bsl::ostream& print(bsl::ostream& stream,
144 int level = 0,
145 int spacesPerLevel = 4) const;
146
147 /// Convert this value to `bsl::vector<char>`.
148 const bsl::vector<char>& toVector() const;
149
150 // PUBLIC CLASS METHODS
151
152 /// Check if the specified `value` satisfies the restrictions of this
153 /// class (i.e., "CustomizedBase64Binary"). Return 0 if successful
154 /// (i.e., the restrictions are satisfied) and non-zero otherwise.
155 static int checkRestrictions(const bsl::vector<char>& value);
156};
157
158// FREE OPERATORS
159
160/// Return `true` if the specified `lhs` and `rhs` attribute objects have
161/// the same value, and `false` otherwise. Two attribute objects have the
162/// same value if each respective attribute has the same value.
163inline
164bool operator==(const CustomizedBase64Binary& lhs, const CustomizedBase64Binary& rhs);
165
166/// Return `true` if the specified `lhs` and `rhs` attribute objects do not
167/// have the same value, and `false` otherwise. Two attribute objects do
168/// not have the same value if one or more respective attributes differ in
169/// values.
170inline
171bool operator!=(const CustomizedBase64Binary& lhs, const CustomizedBase64Binary& rhs);
172
173/// Format the specified `rhs` to the specified output `stream` and
174/// return a reference to the modifiable `stream`.
175inline
176bsl::ostream& operator<<(bsl::ostream& stream, const CustomizedBase64Binary& rhs);
177
178} // close package namespace
179
180// TRAITS
181
183
184// ============================================================================
185// INLINE FUNCTION DEFINITIONS
186// ============================================================================
187
188namespace s_baltst {
189
190 // ----------------------------
191 // class CustomizedBase64Binary
192 // ----------------------------
193
194// PRIVATE CLASS METHODS
195inline
197{
198 (void)value;
199 return 0;
200}
201
202// CREATORS
203inline
208
209inline
211: d_value(original.d_value)
212{
213}
214
215inline
217: d_value(value)
218{
219 BSLS_ASSERT(checkRestrictions(value) == 0);
220}
221
222inline
226
227// MANIPULATORS
228inline
230{
231 d_value = rhs.d_value;
232 return *this;
233}
234
235inline
240
241inline
243{
244 int ret = checkRestrictions(value);
245 if (0 == ret) {
246 d_value = value;
247 }
248
249 return ret;
250}
251
252// ACCESSORS
253inline
254bsl::ostream& CustomizedBase64Binary::print(bsl::ostream& stream,
255 int level,
256 int spacesPerLevel) const
257{
258 return bdlb::PrintMethods::print(stream, d_value, level, spacesPerLevel);
259}
260
261inline
263{
264 return d_value;
265}
266
267} // close package namespace
268
269// FREE FUNCTIONS
270
271inline
275{
276 return lhs.d_value == rhs.d_value;
277}
278
279inline
283{
284 return lhs.d_value != rhs.d_value;
285}
286
287inline
288bsl::ostream& s_baltst::operator<<(
289 bsl::ostream& stream,
291{
292 return rhs.print(stream, 0, -1);
293}
294
295
296#endif
297
298// GENERATED BY @BLP_BAS_CODEGEN_VERSION@
299// USING bas_codegen.pl s_baltst_customizedbase64binary.xsd --mode msg --includedir . --msgComponent customizedbase64binary --noRecurse --noExternalization --noHashSupport --noAggregateConversion
300// ----------------------------------------------------------------------------
301// NOTICE:
302// Copyright 2023 Bloomberg Finance L.P. All rights reserved.
303// Property of Bloomberg Finance L.P. (BFLP)
304// This software is made available solely pursuant to the
305// terms of a BFLP license agreement which governs its use.
306// ------------------------------- END-OF-FILE --------------------------------
307
308/** @} */
309/** @} */
310/** @} */
Definition bslstl_vector.h:1025
Definition s_baltst_customizedbase64binary.h:67
static const char CLASS_NAME[]
Definition s_baltst_customizedbase64binary.h:81
CustomizedBase64Binary()
Definition s_baltst_customizedbase64binary.h:204
void reset()
Definition s_baltst_customizedbase64binary.h:236
static int checkRestrictions(const bsl::vector< char > &value)
Definition s_baltst_customizedbase64binary.h:196
int fromVector(const bsl::vector< char > &value)
Definition s_baltst_customizedbase64binary.h:242
friend bool operator==(const CustomizedBase64Binary &lhs, const CustomizedBase64Binary &rhs)
friend bool operator!=(const CustomizedBase64Binary &lhs, const CustomizedBase64Binary &rhs)
bsl::vector< char > BaseType
Definition s_baltst_customizedbase64binary.h:78
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition s_baltst_customizedbase64binary.h:254
~CustomizedBase64Binary()
Destroy this object.
Definition s_baltst_customizedbase64binary.h:223
CustomizedBase64Binary & operator=(const CustomizedBase64Binary &rhs)
Assign to this object the value of the specified rhs object.
Definition s_baltst_customizedbase64binary.h:229
const bsl::vector< char > & toVector() const
Convert this value to bsl::vector<char>.
Definition s_baltst_customizedbase64binary.h:262
#define BDLAT_DECL_CUSTOMIZEDTYPE_WITH_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:325
#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
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:719
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)