BDE 4.14.0 Production release
Loading...
Searching...
No Matches
s_baltst_generatetestarray.h
Go to the documentation of this file.
1/// @file s_baltst_generatetestarray.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// s_baltst_generatetestarray.h -*-C++-*-
8#ifndef INCLUDED_S_BALTST_GENERATETESTARRAY
9#define INCLUDED_S_BALTST_GENERATETESTARRAY
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup s_baltst_generatetestarray s_baltst_generatetestarray
15/// @brief Provide a component for generating test array types.
16/// @addtogroup Standalones
17/// @{
18/// @addtogroup s_baltst
19/// @{
20/// @addtogroup s_baltst_generatetestarray
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#s_baltst_generatetestarray-purpose"> Purpose</a>
25/// * <a href="#s_baltst_generatetestarray-classes"> Classes </a>
26///
27/// # Purpose {#s_baltst_generatetestarray-purpose}
28/// Provide a component for generating test array types.
29///
30/// # Classes {#s_baltst_generatetestarray-classes}
31///
32/// - s_baltst::GenerateTestArray: generate test array
33/// - s_baltst::GenerateTestArrayPlaceHolder: generate test array placeholder
34/// @}
35/** @} */
36/** @} */
37
38/** @addtogroup Standalones
39 * @{
40 */
41/** @addtogroup s_baltst
42 * @{
43 */
44/** @addtogroup s_baltst_generatetestarray
45 * @{
46 */
47/
50
51#include <bsl_vector.h>
52
53
54namespace s_baltst {
55
56 // =======================
57 // class GenerateTestArray
58 // =======================
59
60/// This class provides a function object whose function call operator can
61/// be used to generate objects of specializations of `bsl::vector`.
62///
63/// See @ref s_baltst_generatetestarray
65
66 public:
67 // TYPES
69
70 // CREATORS
72
73 // ACCESSORS
74 template <class VALUE_TYPE>
76 const TestPlaceHolder<VALUE_TYPE>&) const;
77
78 template <class VALUE_TYPE>
79 bsl::vector<VALUE_TYPE> operator()(const VALUE_TYPE& value) const;
80
81 template <class VALUE_TYPE>
82 bsl::vector<VALUE_TYPE> operator()(const VALUE_TYPE& value0,
83 const VALUE_TYPE& value1) const;
84
85 template <class VALUE_TYPE>
86 bsl::vector<VALUE_TYPE> operator()(const VALUE_TYPE& value0,
87 const VALUE_TYPE& value1,
88 const VALUE_TYPE& value2) const;
89};
90
91 // ==================================
92 // class GenerateTestArrayPlaceHolder
93 // ==================================
94
95/// This class provides a function object whose function call operator can
96/// be used to generate `TestPlaceHolder` specializations for `bsl::vector`
97/// types.
98///
99/// See @ref s_baltst_generatetestarray
101
102 public:
103 // TYPES
105
106 // CREATORS
108
109 // ACCESSORS
110 template <class VALUE_TYPE>
112 const TestPlaceHolder<VALUE_TYPE>&) const;
113};
114
115
116// ============================================================================
117// INLINE DEFINITIONS
118// ============================================================================
119
120 // -----------------------
121 // class GenerateTestArray
122 // -----------------------
123
124// CREATORS
128
129// ACCESSORS
130template <class VALUE_TYPE>
136
137template <class VALUE_TYPE>
139 const VALUE_TYPE& value) const
140{
141 return Util::generate(value);
142}
143
144template <class VALUE_TYPE>
146 const VALUE_TYPE& value0,
147 const VALUE_TYPE& value1) const
148{
149 return Util::generate(value0, value1);
150}
151
152template <class VALUE_TYPE>
154 const VALUE_TYPE& value0,
155 const VALUE_TYPE& value1,
156 const VALUE_TYPE& value2) const
157{
158 return Util::generate(value0, value1, value2);
159}
160
161 // ----------------------------------
162 // class GenerateTestArrayPlaceHolder
163 // ----------------------------------
164
165// CREATORS
169
170// ACCESSORS
171template <class VALUE_TYPE>
178
179} // close package namespace
180
181
182#endif // INCLUDED_S_BALTST_GENERATETESTARRAY
183
184// ----------------------------------------------------------------------------
185// Copyright 2021 Bloomberg Finance L.P.
186//
187// Licensed under the Apache License, Version 2.0 (the "License");
188// you may not use this file except in compliance with the License.
189// You may obtain a copy of the License at
190//
191// http://www.apache.org/licenses/LICENSE-2.0
192//
193// Unless required by applicable law or agreed to in writing, software
194// distributed under the License is distributed on an "AS IS" BASIS,
195// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
196// See the License for the specific language governing permissions and
197// limitations under the License.
198// ----------------------------- END-OF-FILE ----------------------------------
199
200/** @} */
201/** @} */
202/** @} */
Definition bslstl_vector.h:1025
Definition s_baltst_generatetestarray.h:100
GenerateTestArrayPlaceHolder()
Definition s_baltst_generatetestarray.h:166
TestPlaceHolder< bsl::vector< VALUE_TYPE > > operator()(const TestPlaceHolder< VALUE_TYPE > &) const
Definition s_baltst_generatetestarray.h:173
TestArrayUtil Util
Definition s_baltst_generatetestarray.h:104
Definition s_baltst_generatetestarray.h:64
GenerateTestArray()
Definition s_baltst_generatetestarray.h:125
TestArrayUtil Util
Definition s_baltst_generatetestarray.h:68
bsl::vector< VALUE_TYPE > operator()(const TestPlaceHolder< VALUE_TYPE > &) const
Definition s_baltst_generatetestarray.h:131
Definition s_baltst_testplaceholder.h:63
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition s_baltst_address.h:66
Definition s_baltst_testarrayutil.h:58
static bsl::vector< VALUE_TYPE > generate(const TestPlaceHolder< VALUE_TYPE > &)
Definition s_baltst_testarrayutil.h:91