OTest2
A C++ testing framework
include
otest2
testmarkstorage.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2020 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_TESTMARKSTORAGE_H_
21
#define OTest2__INCLUDE_OTEST2_TESTMARKSTORAGE_H_
22
23
#include <string>
24
25
#include <
otest2/testmarkptr.h
>
26
27
namespace
OTest2
{
28
29
class
TestMarkFactory;
30
34
class
TestMarkStorage
{
35
private
:
36
struct
Impl;
37
Impl* pimpl;
38
39
public
:
46
explicit
TestMarkStorage
(
47
TestMarkFactory
* factory_,
48
const
std::string& storage_file_);
49
53
virtual
~TestMarkStorage
();
54
55
/* -- avoid copying */
56
TestMarkStorage
(
57
const
TestMarkStorage
&) =
delete
;
58
TestMarkStorage
&
operator =
(
59
const
TestMarkStorage
&) =
delete
;
60
67
void
setTestMark
(
68
const
std::string& key_,
69
TestMarkPtr
test_mark_);
70
77
TestMarkPtr
getTestMark
(
78
const
std::string& key_)
const
;
79
};
80
81
}
/* -- namespace OTest2 */
82
83
#endif
/* -- OTest2__INCLUDE_OTEST2_TESTMARKSTORAGE_H_ */
testmarkptr.h
OTest2::TestMarkStorage::setTestMark
void setTestMark(const std::string &key_, TestMarkPtr test_mark_)
Set new or reset old test mark.
Definition:
testmarkstorage.cpp:199
OTest2::TestMarkStorage::~TestMarkStorage
virtual ~TestMarkStorage()
Dtor.
Definition:
testmarkstorage.cpp:195
OTest2::TestMarkPtr
std::shared_ptr< TestMark > TestMarkPtr
Definition:
testmarkptr.h:26
OTest2::TestMarkStorage::TestMarkStorage
TestMarkStorage(TestMarkFactory *factory_, const std::string &storage_file_)
Ctor.
Definition:
testmarkstorage.cpp:188
OTest2
Definition:
assertbean.h:25
OTest2::TestMarkStorage
Storage of test marks.
Definition:
testmarkstorage.h:34
OTest2::TestMarkStorage::operator=
TestMarkStorage & operator=(const TestMarkStorage &)=delete
OTest2::TestMarkStorage::getTestMark
TestMarkPtr getTestMark(const std::string &key_) const
Get test mark.
Definition:
testmarkstorage.cpp:208
OTest2::TestMarkFactory
A factory of testmark objects used for deserialization.
Definition:
testmarkfactory.h:45
Generated by
1.8.17