BDE 4.14.0 Production release
Loading...
Searching...
No Matches
s_baltst_testarrayutil.h
Go to the documentation of this file.
1/// @file s_baltst_testarrayutil.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// s_baltst_testarrayutil.h -*-C++-*-
8#ifndef INCLUDED_S_BALTST_TESTARRAYUTIL
9#define INCLUDED_S_BALTST_TESTARRAYUTIL
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup s_baltst_testarrayutil s_baltst_testarrayutil
15/// @brief Provide a utilty for generating test arrays.
16/// @addtogroup Standalones
17/// @{
18/// @addtogroup s_baltst
19/// @{
20/// @addtogroup s_baltst_testarrayutil
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#s_baltst_testarrayutil-purpose"> Purpose</a>
25/// * <a href="#s_baltst_testarrayutil-classes"> Classes </a>
26///
27/// # Purpose {#s_baltst_testarrayutil-purpose}
28/// Provide a utilty for generating test arrays.
29///
30/// # Classes {#s_baltst_testarrayutil-classes}
31///
32/// - s_baltst::TestArrayUtil: utility for generating test arrays
33/// @}
34/** @} */
35/** @} */
36
37/** @addtogroup Standalones
38 * @{
39 */
40/** @addtogroup s_baltst
41 * @{
42 */
43/** @addtogroup s_baltst_testarrayutil
44 * @{
45 */
46/
48
49#include <bsl_vector.h>
50
51
52namespace s_baltst {
53
54 // ====================
55 // struct TestArrayUtil
56 // ====================
57
59 // CLASS METHODS
60 template <class VALUE_TYPE>
63
64 template <class VALUE_TYPE>
65 static bsl::vector<VALUE_TYPE> generate(const VALUE_TYPE& value);
66
67 template <class VALUE_TYPE>
68 static bsl::vector<VALUE_TYPE> generate(const VALUE_TYPE& value0,
69 const VALUE_TYPE& value1);
70
71 template <class VALUE_TYPE>
72 static bsl::vector<VALUE_TYPE> generate(const VALUE_TYPE& value0,
73 const VALUE_TYPE& value1,
74 const VALUE_TYPE& value2);
75
76 template <class VALUE_TYPE>
79};
80
81// ============================================================================
82// INLINE DEFINITIONS
83// ============================================================================
84
85 // -------------------
86 // class TestArrayUtil
87 // -------------------
88
89// CLASS METHODS
90template <class VALUE_TYPE>
96
97template <class VALUE_TYPE>
99{
101 result.push_back(value);
102 return result;
103}
104
105template <class VALUE_TYPE>
107 const VALUE_TYPE& value1)
108{
110 result.push_back(value0);
111 result.push_back(value1);
112 return result;
113}
114
115template <class VALUE_TYPE>
117 const VALUE_TYPE& value1,
118 const VALUE_TYPE& value2)
119{
121 result.push_back(value0);
122 result.push_back(value1);
123 result.push_back(value2);
124 return result;
125}
126
127template <class VALUE_TYPE>
133
134} // close package namespace
135
136
137#endif // INCLUDED_S_BALTST_TESTARRAYUTIL
138
139// ----------------------------------------------------------------------------
140// Copyright 2021 Bloomberg Finance L.P.
141//
142// Licensed under the Apache License, Version 2.0 (the "License");
143// you may not use this file except in compliance with the License.
144// You may obtain a copy of the License at
145//
146// http://www.apache.org/licenses/LICENSE-2.0
147//
148// Unless required by applicable law or agreed to in writing, software
149// distributed under the License is distributed on an "AS IS" BASIS,
150// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
151// See the License for the specific language governing permissions and
152// limitations under the License.
153// ----------------------------- END-OF-FILE ----------------------------------
154
155/** @} */
156/** @} */
157/** @} */
Definition bslstl_vector.h:1025
void push_back(const VALUE_TYPE &value)
Definition bslstl_vector.h:3760
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
static TestPlaceHolder< bsl::vector< VALUE_TYPE > > generatePlaceHolder(const TestPlaceHolder< VALUE_TYPE > &)
Definition s_baltst_testarrayutil.h:128