OTest2
A C++ testing framework
cmdnextobject.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_CMDNEXTOBJECT_H_
21 #define OTest2_INCLUDE_OTEST2_CMDNEXTOBJECT_H_
22 
23 #include <otest2/command.h>
24 #include <otest2/objectptr.h>
25 #include <otest2/scenarioiterptr.h>
26 
27 namespace OTest2 {
28 
32 class CmdNextObject : public Command {
33  private:
34  ScenarioIterPtr scenario_iter;
35  ObjectPtr parent;
36 
37  public:
45  explicit CmdNextObject(
46  ScenarioIterPtr scenario_iter_,
47  ObjectPtr parent_);
48 
52  virtual ~CmdNextObject();
53 
54  /* -- avoid copying */
56  const CmdNextObject&) = delete;
58  const CmdNextObject&) = delete;
59 
60  /* -- command interface */
61  virtual void run(
62  const Context& context_) override;
63 };
64 
65 } /* -- namespace OTest2 */
66 
67 #endif /* -- OTest2_INCLUDE_OTEST2_CMDNEXTOBJECT_H_ */
objectptr.h
scenarioiterptr.h
OTest2::CmdNextObject
Schedule run of next testing object.
Definition: cmdnextobject.h:32
command.h
OTest2::CmdNextObject::~CmdNextObject
virtual ~CmdNextObject()
Dtor.
Definition: cmdnextobject.cpp:42
OTest2::ObjectPtr
std::shared_ptr< Object > ObjectPtr
Shared pointer to a testing object.
Definition: objectptr.h:27
OTest2::CmdNextObject::CmdNextObject
CmdNextObject(ScenarioIterPtr scenario_iter_, ObjectPtr parent_)
Ctor.
Definition: cmdnextobject.cpp:33
OTest2
Definition: assertbean.h:25
OTest2::ScenarioIterPtr
std::shared_ptr< ScenarioIter > ScenarioIterPtr
Shared pointer of the scenario iter interface.
Definition: scenarioiterptr.h:27
OTest2::Command
generic command interface
Definition: command.h:30
OTest2::CmdNextObject::operator=
CmdNextObject & operator=(const CmdNextObject &)=delete
OTest2::Context
OTest2 runtime context.
Definition: context.h:38
OTest2::CmdNextObject::run
virtual void run(const Context &context_) override
Run the command.
Definition: cmdnextobject.cpp:46