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