OTest2
A C++ testing framework
include
otest2
fcemarshaler.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__OTEST2_FCEMARSHALER_H_
21
#define OTest2__OTEST2_FCEMARSHALER_H_
22
23
#include <memory>
24
25
#include <
otest2/fcemarshalerptr.h
>
26
27
namespace
OTest2
{
28
29
class
Context;
30
38
class
FceMarshaler
{
39
public
:
43
FceMarshaler
();
44
48
virtual
~FceMarshaler
();
49
50
/* -- avoid copying */
51
FceMarshaler
(
52
const
FceMarshaler
&) =
delete
;
53
FceMarshaler
&
operator =
(
54
const
FceMarshaler
&) =
delete
;
55
62
virtual
void
runFunction
(
63
const
Context
& context_) = 0;
64
};
65
69
class
EmptyMarshaler
:
public
FceMarshaler
{
70
public
:
74
EmptyMarshaler
();
75
79
virtual
~EmptyMarshaler
();
80
81
/* -- avoid copying */
82
EmptyMarshaler
(
83
const
EmptyMarshaler
&) =
delete
;
84
EmptyMarshaler
&
operator =
(
85
const
EmptyMarshaler
&) =
delete
;
86
87
/* -- marshaler interface */
88
virtual
void
runFunction
(
89
const
Context
& context_)
override
;
90
};
91
92
}
/* -- namespace OTest2 */
93
94
#endif
/* -- OTest2__OTEST2_FCEMARSHALER_H_ */
OTest2::FceMarshaler::operator=
FceMarshaler & operator=(const FceMarshaler &)=delete
OTest2::EmptyMarshaler::EmptyMarshaler
EmptyMarshaler()
Ctor.
Definition:
fcemarshaler.cpp:32
OTest2::FceMarshaler
Generic interface of a function marshaler.
Definition:
fcemarshaler.h:38
OTest2::EmptyMarshaler::~EmptyMarshaler
virtual ~EmptyMarshaler()
Dtor.
Definition:
fcemarshaler.cpp:36
OTest2::EmptyMarshaler::operator=
EmptyMarshaler & operator=(const EmptyMarshaler &)=delete
OTest2::FceMarshaler::~FceMarshaler
virtual ~FceMarshaler()
Dtor.
Definition:
fcemarshaler.cpp:28
OTest2::FceMarshaler::FceMarshaler
FceMarshaler()
Ctor.
Definition:
fcemarshaler.cpp:24
fcemarshalerptr.h
OTest2
Definition:
assertbean.h:25
OTest2::EmptyMarshaler::runFunction
virtual void runFunction(const Context &context_) override
Run the function.
Definition:
fcemarshaler.cpp:40
OTest2::Context
OTest2 runtime context.
Definition:
context.h:38
OTest2::EmptyMarshaler
Empty marshaler - no function is invoked.
Definition:
fcemarshaler.h:69
OTest2::FceMarshaler::runFunction
virtual void runFunction(const Context &context_)=0
Run the function.
Generated by
1.8.17