BDE 4.14.0 Production release
Loading...
Searching...
No Matches
s_baltst_testchoiceutil.h
Go to the documentation of this file.
1
/// @file s_baltst_testchoiceutil.h
2
///
3
/// The content of this file has been pre-processed for Doxygen.
4
///
5
6
7
// s_baltst_testchoiceutil.h -*-C++-*-
8
#ifndef INCLUDED_S_BALTST_TESTCHOICEUTIL
9
#define INCLUDED_S_BALTST_TESTCHOICEUTIL
10
11
#include <
bsls_ident.h
>
12
BSLS_IDENT
(
"$Id: $"
)
13
14
/// @defgroup s_baltst_testchoiceutil s_baltst_testchoiceutil
15
/// @brief Provide non-primitive operations on `s_baltst::TestChoice`.
16
/// @addtogroup Standalones
17
/// @{
18
/// @addtogroup s_baltst
19
/// @{
20
/// @addtogroup s_baltst_testchoiceutil
21
/// @{
22
///
23
/// <h1> Outline </h1>
24
/// * <a href="#s_baltst_testchoiceutil-purpose"> Purpose</a>
25
/// * <a href="#s_baltst_testchoiceutil-classes"> Classes </a>
26
///
27
/// # Purpose {#s_baltst_testchoiceutil-purpose}
28
/// Provide non-primitive operations on `s_baltst::TestChoice`.
29
///
30
/// # Classes {#s_baltst_testchoiceutil-classes}
31
///
32
/// - s_baltst::TestChoiceUtil: utilities for test choices
33
/// @}
34
/** @} */
35
/** @} */
36
37
/** @addtogroup Standalones
38
* @{
39
*/
40
/** @addtogroup s_baltst
41
* @{
42
*/
43
/** @addtogroup s_baltst_testchoiceutil
44
* @{
45
*/
46
/
47
#include <
s_baltst_testchoice.h
>
48
#include <
s_baltst_testplaceholder.h
>
49
#include <
s_baltst_testselection.h
>
50
51
52
namespace
s_baltst
{
53
54
// =====================
55
// struct TestChoiceUtil
56
// =====================
57
58
struct
TestChoiceUtil
{
59
// CLASS METHODS
60
template
<
class
SEL
ECTION_0,
class
TYPE_0>
61
static
TestChoice<TypedTestSelection<TYPE_0, SELECTION_0>
>
generate
(
62
const
SELECTION_0&,
63
const
TYPE_0& value);
64
65
template
<
class
SEL
ECTION_0,
class
SEL
ECTION_1,
class
TYPE_0,
class
TYPE_1>
66
static
TestChoice<TypedTestSelection<TYPE_0, SELECTION_0>
,
67
TypedTestSelection<TYPE_1, SELECTION_1>
>
68
generate(
const
SELECTION_0&,
69
const
SELECTION_1&,
70
const
TYPE_0& value,
71
const
TestPlaceHolder<TYPE_1>
&);
72
73
template
<
class
SEL
ECTION_0,
class
SEL
ECTION_1,
class
TYPE_0,
class
TYPE_1>
74
static
TestChoice<TypedTestSelection<TYPE_0, SELECTION_0>
,
75
TypedTestSelection<TYPE_1, SELECTION_1>
>
76
generate(
const
SELECTION_0&,
77
const
SELECTION_1&,
78
const
TestPlaceHolder<TYPE_0>
&,
79
const
TYPE_1& value);
80
};
81
82
// ============================================================================
83
// INLINE DEFINITIONS
84
// ============================================================================
85
86
// --------------------
87
// class TestChoiceUtil
88
// --------------------
89
90
// CLASS METHODS
91
template
<
class
SEL
ECTION_0,
class
TYPE_0>
92
TestChoice<TypedTestSelection<TYPE_0, SELECTION_0>
>
TestChoiceUtil::generate
(
93
const
SELECTION_0&,
94
const
TYPE_0& value)
95
{
96
typedef
TypedTestSelection<TYPE_0, SELECTION_0>
Selection0;
97
98
return
TestChoice<Selection0>
(value);
99
}
100
101
template
<
class
SEL
ECTION_0,
class
SEL
ECTION_1,
class
TYPE_0,
class
TYPE_1>
102
TestChoice<TypedTestSelection<TYPE_0, SELECTION_0>
,
103
TypedTestSelection<TYPE_1, SELECTION_1>
>
104
TestChoiceUtil::generate
(
const
SELECTION_0&,
105
const
SELECTION_1&,
106
const
TYPE_0& value,
107
const
TestPlaceHolder<TYPE_1>
&)
108
{
109
typedef
TypedTestSelection<TYPE_0, SELECTION_0>
Selection0;
110
typedef
TypedTestSelection<TYPE_1, SELECTION_1>
Selection1;
111
112
return
TestChoice<Selection0, Selection1>
(value);
113
}
114
115
template
<
class
SEL
ECTION_0,
class
SEL
ECTION_1,
class
TYPE_0,
class
TYPE_1>
116
TestChoice<TypedTestSelection<TYPE_0, SELECTION_0>
,
117
TypedTestSelection<TYPE_1, SELECTION_1>
>
118
TestChoiceUtil::generate
(
const
SELECTION_0&,
119
const
SELECTION_1&,
120
const
TestPlaceHolder<TYPE_0>
&,
121
const
TYPE_1& value)
122
{
123
typedef
TypedTestSelection<TYPE_0, SELECTION_0>
Selection0;
124
typedef
TypedTestSelection<TYPE_1, SELECTION_1>
Selection1;
125
126
return
TestChoice<Selection0, Selection1>
(value);
127
}
128
129
}
// close package namespace
130
131
132
#endif
// INCLUDED_S_BALTST_TESTCHOICEUTIL
133
134
// ----------------------------------------------------------------------------
135
// Copyright 2021 Bloomberg Finance L.P.
136
//
137
// Licensed under the Apache License, Version 2.0 (the "License");
138
// you may not use this file except in compliance with the License.
139
// You may obtain a copy of the License at
140
//
141
// http://www.apache.org/licenses/LICENSE-2.0
142
//
143
// Unless required by applicable law or agreed to in writing, software
144
// distributed under the License is distributed on an "AS IS" BASIS,
145
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
146
// See the License for the specific language governing permissions and
147
// limitations under the License.
148
// ----------------------------- END-OF-FILE ----------------------------------
149
150
/** @} */
151
/** @} */
152
/** @} */
bsls_ident.h
s_baltst::TestChoice
Definition
s_baltst_testchoice.h:130
s_baltst::TestPlaceHolder
Definition
s_baltst_testplaceholder.h:63
s_baltst::TypedTestSelection
Definition
s_baltst_testselection.h:121
BSLS_IDENT
#define BSLS_IDENT(str)
Definition
bsls_ident.h:195
s_baltst
Definition
s_baltst_address.h:66
s_baltst_testchoice.h
s_baltst_testplaceholder.h
s_baltst_testselection.h
s_baltst::TestChoiceUtil
Definition
s_baltst_testchoiceutil.h:58
s_baltst::TestChoiceUtil::generate
static TestChoice< TypedTestSelection< TYPE_0, SELECTION_0 > > generate(const SELECTION_0 &, const TYPE_0 &value)
Definition
s_baltst_testchoiceutil.h:92
doxygen_input
bde
standalones
s_baltst
s_baltst_testchoiceutil.h
Generated by
1.9.8