OTest2
A C++ testing framework
parameters.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Ondrej Starek
3  *
4  * This file is part of OTest2
5  *
6  * OTest2 is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License,
9  * or (at your option) any later version.
10  *
11  * OTest2 is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14  * License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with OTest2. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef OTest2_INCLUDE_OTEST2_PARAMETERS_H_
21 #define OTest2_INCLUDE_OTEST2_PARAMETERS_H_
22 
23 #include <string>
24 
25 namespace OTest2 {
26 
30 class Parameters {
31  private:
32  struct Impl;
33  Impl* pimpl;
34 
35  public:
36  /* -- avoid copying */
37  Parameters(
38  const Parameters&) = delete;
40  const Parameters&) = delete;
41 
45  Parameters();
46 
50  Parameters(
51  Parameters&& other_) noexcept;
52 
56  ~Parameters();
57 
61  void swap(
62  Parameters& other_) noexcept;
63 
68  Parameters&& other_) noexcept;
69 
76  void appendParameter(
77  const std::string& name_,
78  const std::string& value_);
79 
90  std::string mixWithName(
91  const std::string& name_) const;
92 };
93 
94 } /* -- namespace OTest2 */
95 
96 #endif /* -- OTest2_INCLUDE_OTEST2_PARAMETERS_H_ */
OTest2::Parameters::operator=
Parameters & operator=(const Parameters &)=delete
OTest2::Parameters::~Parameters
~Parameters()
Dtor.
Definition: parameters.cpp:55
OTest2::Parameters::mixWithName
std::string mixWithName(const std::string &name_) const
Create one string mixed with a name of a testing object.
Definition: parameters.cpp:80
OTest2::Parameters
Generic parameters of a run of an testing object.
Definition: parameters.h:30
OTest2::Parameters::appendParameter
void appendParameter(const std::string &name_, const std::string &value_)
Append new parameter.
Definition: parameters.cpp:73
OTest2
Definition: assertbean.h:25
OTest2::Parameters::Parameters
Parameters()
Ctor - empty parameters.
Definition: parameters.cpp:44
OTest2::Parameters::swap
void swap(Parameters &other_) noexcept
Swap contents.
Definition: parameters.cpp:59