BDE 4.14.0 Production release
Loading...
Searching...
No Matches
s_baltst_generatetestsequence.h
Go to the documentation of this file.
1/// @file s_baltst_generatetestsequence.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// s_baltst_generatetestsequence.h -*-C++-*-
8#ifndef INCLUDED_S_BALTST_GENERATETESTSEQUENCE
9#define INCLUDED_S_BALTST_GENERATETESTSEQUENCE
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup s_baltst_generatetestsequence s_baltst_generatetestsequence
15/// @brief Provide a component for generating test sequence types.
16/// @addtogroup Standalones
17/// @{
18/// @addtogroup s_baltst
19/// @{
20/// @addtogroup s_baltst_generatetestsequence
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#s_baltst_generatetestsequence-purpose"> Purpose</a>
25/// * <a href="#s_baltst_generatetestsequence-classes"> Classes </a>
26///
27/// # Purpose {#s_baltst_generatetestsequence-purpose}
28/// Provide a component for generating test sequence types.
29///
30/// # Classes {#s_baltst_generatetestsequence-classes}
31///
32/// - s_baltst::GenerateTestSequence: generate test sequence
33/// - s_baltst::GenerateTestSequencePlaceHolder: generate test sequence p-holder
34/// @}
35/** @} */
36/** @} */
37
38/** @addtogroup Standalones
39 * @{
40 */
41/** @addtogroup s_baltst
42 * @{
43 */
44/** @addtogroup s_baltst_generatetestsequence
45 * @{
46 */
47/
52
53
54namespace s_baltst {
55
56 // ==========================
57 // class GenerateTestSequence
58 // ==========================
59
60/// This class provides a function object whose function call operator can
61/// be used to generate objects of `TestSequence` specializations.
62///
63/// See @ref s_baltst_generatetestsequence
65
66 public:
67 // TYPES
69
70 // CREATORS
72
73 // ACCESSORS
74 template <class ATTRIBUTE_0, class TYPE_0>
76 const ATTRIBUTE_0& attribute,
77 const TYPE_0& value) const;
78
79 template <class ATTRIBUTE_0, class ATTRIBUTE_1, class TYPE_0, class TYPE_1>
82 operator()(const ATTRIBUTE_0& attribute0,
83 const ATTRIBUTE_1& attribute1,
84 const TYPE_0& value0,
85 const TYPE_1& value1) const;
86
87 template <class ATTRIBUTE_0,
88 class ATTRIBUTE_1,
89 class ATTRIBUTE_2,
90 class TYPE_0,
91 class TYPE_1,
92 class TYPE_2>
96 operator()(const ATTRIBUTE_0& attribute0,
97 const ATTRIBUTE_1& attribute1,
98 const ATTRIBUTE_2& attribute2,
99 const TYPE_0& value0,
100 const TYPE_1& value1,
101 const TYPE_2& value2) const;
102};
103
104 // =====================================
105 // class GenerateTestSequencePlaceHolder
106 // =====================================
107
108/// This class provides a function object whose function call operator can
109/// be used to generate `PlaceHolder` specializations for `TestSequence`
110/// types.
111///
112/// See @ref s_baltst_generatetestsequence
114
115 public:
116 // TYPES
118
119 // CREATORS
121
122 // ACCESSORS
123 template <class ATTRIBUTE_0, class TYPE_0>
125 operator()(const ATTRIBUTE_0& attribute,
126 const TestPlaceHolder<TYPE_0>& value) const;
127
128 template <class ATTRIBUTE_0, class ATTRIBUTE_1, class TYPE_0, class TYPE_1>
131 operator()(const ATTRIBUTE_0& attribute0,
132 const ATTRIBUTE_1& attribute1,
133 const TestPlaceHolder<TYPE_0>& value0,
134 const TestPlaceHolder<TYPE_1>& value1) const;
135
136 template <class ATTRIBUTE_0,
137 class ATTRIBUTE_1,
138 class ATTRIBUTE_2,
139 class TYPE_0,
140 class TYPE_1,
141 class TYPE_2>
145 operator()(const ATTRIBUTE_0& attribute0,
146 const ATTRIBUTE_1& attribute1,
147 const ATTRIBUTE_2& attribute2,
148 const TestPlaceHolder<TYPE_0>& value0,
149 const TestPlaceHolder<TYPE_1>& value1,
150 const TestPlaceHolder<TYPE_2>& value2) const;
151};
152
153// ============================================================================
154// INLINE DEFINITIONS
155// ============================================================================
156
157 // --------------------------
158 // class GenerateTestSequence
159 // --------------------------
160
161// CREATORS
165
166// ACCESSORS
167template <class ATTRIBUTE_0, class TYPE_0>
169GenerateTestSequence::operator()(const ATTRIBUTE_0& attribute,
170 const TYPE_0& value) const
171{
172 return Util::generate(attribute, value);
173}
174
175template <class ATTRIBUTE_0, class ATTRIBUTE_1, class TYPE_0, class TYPE_1>
178GenerateTestSequence::operator()(const ATTRIBUTE_0& attribute0,
179 const ATTRIBUTE_1& attribute1,
180 const TYPE_0& value0,
181 const TYPE_1& value1) const
182{
183 return Util::generate(attribute0, attribute1, value0, value1);
184}
185
186template <class ATTRIBUTE_0,
187 class ATTRIBUTE_1,
188 class ATTRIBUTE_2,
189 class TYPE_0,
190 class TYPE_1,
191 class TYPE_2>
195GenerateTestSequence::operator()(const ATTRIBUTE_0& attribute0,
196 const ATTRIBUTE_1& attribute1,
197 const ATTRIBUTE_2& attribute2,
198 const TYPE_0& value0,
199 const TYPE_1& value1,
200 const TYPE_2& value2) const
201{
202 return Util::generate(attribute0,
203 attribute1,
204 attribute2,
205 value0,
206 value1,
207 value2);
208}
209
210 // -------------------------------------
211 // class GenerateTestSequencePlaceHolder
212 // -------------------------------------
213
214// CREATORS
218
219// ACCESSORS
220template <class ATTRIBUTE_0, class TYPE_0>
223 const ATTRIBUTE_0& attribute,
224 const TestPlaceHolder<TYPE_0>& value) const
225{
226 return Util::generatePlaceHolder(attribute, value);
227}
228
229template <class ATTRIBUTE_0, class ATTRIBUTE_1, class TYPE_0, class TYPE_1>
233 const ATTRIBUTE_0& attribute0,
234 const ATTRIBUTE_1& attribute1,
235 const TestPlaceHolder<TYPE_0>& value0,
236 const TestPlaceHolder<TYPE_1>& value1) const
237{
238 return Util::generatePlaceHolder(attribute0, attribute1, value0, value1);
239}
240
241template <class ATTRIBUTE_0,
242 class ATTRIBUTE_1,
243 class ATTRIBUTE_2,
244 class TYPE_0,
245 class TYPE_1,
246 class TYPE_2>
251 const ATTRIBUTE_0& attribute0,
252 const ATTRIBUTE_1& attribute1,
253 const ATTRIBUTE_2& attribute2,
254 const TestPlaceHolder<TYPE_0>& value0,
255 const TestPlaceHolder<TYPE_1>& value1,
256 const TestPlaceHolder<TYPE_2>& value2) const
257{
258 return Util::generatePlaceHolder(attribute0,
259 attribute1,
260 attribute2,
261 value0,
262 value1,
263 value2);
264}
265
266} // close package namespace
267
268
269#endif // INCLUDED_S_BALTST_GENERATETESTSEQUENCE
270
271// ----------------------------------------------------------------------------
272// Copyright 2021 Bloomberg Finance L.P.
273//
274// Licensed under the Apache License, Version 2.0 (the "License");
275// you may not use this file except in compliance with the License.
276// You may obtain a copy of the License at
277//
278// http://www.apache.org/licenses/LICENSE-2.0
279//
280// Unless required by applicable law or agreed to in writing, software
281// distributed under the License is distributed on an "AS IS" BASIS,
282// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
283// See the License for the specific language governing permissions and
284// limitations under the License.
285// ----------------------------- END-OF-FILE ----------------------------------
286
287/** @} */
288/** @} */
289/** @} */
Definition s_baltst_generatetestsequence.h:113
TestPlaceHolder< TestSequence< TypedTestAttribute< TYPE_0, ATTRIBUTE_0 > > > operator()(const ATTRIBUTE_0 &attribute, const TestPlaceHolder< TYPE_0 > &value) const
Definition s_baltst_generatetestsequence.h:222
TestSequenceUtil Util
Definition s_baltst_generatetestsequence.h:117
GenerateTestSequencePlaceHolder()
Definition s_baltst_generatetestsequence.h:215
Definition s_baltst_generatetestsequence.h:64
TestSequenceUtil Util
Definition s_baltst_generatetestsequence.h:68
TestSequence< TypedTestAttribute< TYPE_0, ATTRIBUTE_0 > > operator()(const ATTRIBUTE_0 &attribute, const TYPE_0 &value) const
Definition s_baltst_generatetestsequence.h:169
GenerateTestSequence()
Definition s_baltst_generatetestsequence.h:162
Definition s_baltst_testplaceholder.h:63
Definition s_baltst_testsequence.h:127
Definition s_baltst_testattribute.h:138
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition s_baltst_address.h:66
Definition s_baltst_testsequenceutil.h:58
static TestPlaceHolder< TestSequence< TypedTestAttribute< TYPE_0, ATTRIBUTE_0 > > > generatePlaceHolder(const ATTRIBUTE_0 &, const TestPlaceHolder< TYPE_0 > &)
Definition s_baltst_testsequenceutil.h:180
static TestSequence< TypedTestAttribute< TYPE_0, ATTRIBUTE_0 > > generate(const ATTRIBUTE_0 &, const TYPE_0 &value)
Definition s_baltst_testsequenceutil.h:132