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