OTest2
A C++ testing framework
lib
testmarkin.cpp
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
#include <
testmarkin.h
>
21
22
#include <string>
23
24
#include <
testmark.h
>
25
#include <
testmarkfactory.h
>
26
27
namespace
OTest2
{
28
29
TestMarkIn::TestMarkIn
() {
30
31
}
32
33
TestMarkIn::~TestMarkIn
() {
34
35
}
36
37
TestMarkPtr
TestMarkIn::deserialize
(
38
TestMarkFactory
& factory_,
39
TestMarkIn
& deserializer_) {
40
std::string typemark_(deserializer_.
readTypeMark
());
41
TestMarkPtr
testmark_(factory_.
createMark
(typemark_));
42
testmark_->deserializeMark(factory_, deserializer_);
43
return
testmark_;
44
}
45
46
}
/* -- namespace OTest2 */
OTest2::TestMarkIn::deserialize
static TestMarkPtr deserialize(TestMarkFactory &factory_, TestMarkIn &deserializer_)
Deserialize a testmark.
Definition:
testmarkin.cpp:37
OTest2::TestMarkIn
A generic interface of a testmark deserializer.
Definition:
testmarkin.h:35
OTest2::TestMarkIn::~TestMarkIn
virtual ~TestMarkIn()
Dtor.
Definition:
testmarkin.cpp:33
OTest2::TestMarkPtr
std::shared_ptr< TestMark > TestMarkPtr
Definition:
testmarkptr.h:26
OTest2
Definition:
assertbean.h:25
testmarkin.h
testmarkfactory.h
testmark.h
OTest2::TestMarkIn::TestMarkIn
TestMarkIn()
Ctor.
Definition:
testmarkin.cpp:29
OTest2::TestMarkFactory::createMark
TestMarkPtr createMark(const std::string &typemark_)
Create new empty testmark.
Definition:
testmarkfactory.cpp:82
OTest2::TestMarkIn::readTypeMark
virtual std::string readTypeMark()=0
Parse type mark following in the stream.
OTest2::TestMarkFactory
A factory of testmark objects used for deserialization.
Definition:
testmarkfactory.h:45
Generated by
1.8.17