OTest2
A C++ testing framework
include
otest2
stateordinary.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2018 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_STATEORDINARY_H_
21
#define OTest2__INCLUDE_OTEST2_STATEORDINARY_H_
22
23
#include <
otest2/caseordinaryptr.h
>
24
#include <
otest2/state.h
>
25
26
namespace
OTest2
{
27
28
class
Context;
29
33
class
StateOrdinary
:
public
State
{
34
public
:
35
/* -- avoid copying */
36
StateOrdinary
(
37
const
StateOrdinary
&) =
delete
;
38
StateOrdinary
&
operator =
(
39
const
StateOrdinary
&) =
delete
;
40
46
explicit
StateOrdinary
(
47
const
Context
& context_);
48
52
virtual
~StateOrdinary
();
53
60
virtual
void
executeState
(
61
const
Context
& context_,
62
CaseOrdinaryPtr
parent_) = 0;
63
64
/* -- state interface */
65
virtual
void
scheduleRun
(
66
const
Context
& context_,
67
CaseOrdinaryPtr
parent_,
68
StatePtr
this_ptr_,
69
bool
wait_,
70
int
delay_);
71
};
72
73
}
/* namespace OTest2 */
74
75
#endif
/* OTest2__INCLUDE_OTEST2_STATEORDINARY_H_ */
caseordinaryptr.h
OTest2::StateOrdinary::executeState
virtual void executeState(const Context &context_, CaseOrdinaryPtr parent_)=0
Run the state.
OTest2::CaseOrdinaryPtr
std::shared_ptr< CaseOrdinary > CaseOrdinaryPtr
Shared pointer of the ordinary cases.
Definition:
caseordinaryptr.h:27
OTest2
Definition:
assertbean.h:25
OTest2::State
Generic test state interface.
Definition:
state.h:34
OTest2::StateOrdinary
Ordinary state class.
Definition:
stateordinary.h:33
OTest2::StateOrdinary::operator=
StateOrdinary & operator=(const StateOrdinary &)=delete
OTest2::StateOrdinary::scheduleRun
virtual void scheduleRun(const Context &context_, CaseOrdinaryPtr parent_, StatePtr this_ptr_, bool wait_, int delay_)
Schedule run of the state.
Definition:
stateordinary.cpp:41
OTest2::StatePtr
std::shared_ptr< State > StatePtr
Pointer to test state objects.
Definition:
stateptr.h:27
OTest2::StateOrdinary::StateOrdinary
StateOrdinary(const StateOrdinary &)=delete
OTest2::Context
OTest2 runtime context.
Definition:
context.h:38
state.h
OTest2::StateOrdinary::~StateOrdinary
virtual ~StateOrdinary()
Dtor.
Definition:
stateordinary.cpp:37
Generated by
1.8.17