OTest2
A C++ testing framework
contextobject.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_CONTEXTOBJECT_H_
21 #define OTest2__INCLUDE_OTEST2_CONTEXTOBJECT_H_
22 
23 #include <string>
24 
25 namespace OTest2 {
26 
27 class AssertBean;
28 class Context;
29 
34  public:
35  /* -- avoid copying */
37  const ContextObject&) = delete;
39  const ContextObject&) = delete;
40 
44  ContextObject();
45 
49  virtual ~ContextObject();
50 
54  virtual const Context& otest2Context() const = 0;
55 };
56 
57 } /* namespace OTest2 */
58 
59 #endif /* OTest2__INCLUDE_OTEST2_CONTEXTOBJECT_H_ */
OTest2::ContextObject::~ContextObject
virtual ~ContextObject()
Dtor.
Definition: contextobject.cpp:36
OTest2::ContextObject::ContextObject
ContextObject()
Ctor.
Definition: contextobject.cpp:32
OTest2
Definition: assertbean.h:25
OTest2::ContextObject
A generic interface of objects which offers OTest2 context.
Definition: contextobject.h:33
OTest2::ContextObject::operator=
ContextObject & operator=(const ContextObject &)=delete
OTest2::Context
OTest2 runtime context.
Definition: context.h:38
OTest2::ContextObject::otest2Context
virtual const Context & otest2Context() const =0
Get the OTest2 context.