OTest2
A C++ testing framework
Public Member Functions | List of all members
OTest2::ObjectRepeaterOnce Class Referenceabstract

Object repeater which runs the test just once. More...

#include <objectrepeateronce.h>

Inheritance diagram for OTest2::ObjectRepeaterOnce:
Inheritance graph
[legend]
Collaboration diagram for OTest2::ObjectRepeaterOnce:
Collaboration graph
[legend]

Public Member Functions

 ObjectRepeaterOnce ()
 Ctor. More...
 
virtual ~ObjectRepeaterOnce ()
 Dtor. More...
 
 ObjectRepeaterOnce (const ObjectRepeaterOnce &)=delete
 
ObjectRepeaterOnceoperator= (const ObjectRepeaterOnce &)=delete
 
virtual bool hasNextRun (const Context &context_) const override
 Check whether next run of the object is planned. More...
 
virtual void modifyObjectPath (const Context &context_, ObjectPath &path_) const override
 Change current object path. More...
 
virtual ObjectScenarioPtr createObject (const Context &context_, const std::string &decorated_name_, ObjectPtr parent_) override
 Create the testing object. More...
 
- Public Member Functions inherited from OTest2::ObjectRepeater
 ObjectRepeater ()
 Ctor. More...
 
virtual ~ObjectRepeater ()
 Dtor. More...
 
 ObjectRepeater (const ObjectRepeater &)=delete
 
ObjectRepeateroperator= (const ObjectRepeater &)=delete
 

Detailed Description

Object repeater which runs the test just once.

Definition at line 33 of file objectrepeateronce.h.

Constructor & Destructor Documentation

◆ ObjectRepeaterOnce() [1/2]

OTest2::ObjectRepeaterOnce::ObjectRepeaterOnce ( )

Ctor.

Definition at line 26 of file objectrepeateronce.cpp.

◆ ~ObjectRepeaterOnce()

OTest2::ObjectRepeaterOnce::~ObjectRepeaterOnce ( )
virtual

Dtor.

Definition at line 31 of file objectrepeateronce.cpp.

◆ ObjectRepeaterOnce() [2/2]

OTest2::ObjectRepeaterOnce::ObjectRepeaterOnce ( const ObjectRepeaterOnce )
delete

Member Function Documentation

◆ createObject()

ObjectScenarioPtr OTest2::ObjectRepeaterOnce::createObject ( const Context context_,
const std::string &  name_,
ObjectPtr  parent_ 
)
overridevirtual

Create the testing object.

Parameters
context_The OTest2 context
name_Name of the object
parent_Parent object of the created object
Returns
The created object
Warning
The method may be called only if the isNextRun() is true!

Implements OTest2::ObjectRepeater.

Definition at line 46 of file objectrepeateronce.cpp.

◆ hasNextRun()

bool OTest2::ObjectRepeaterOnce::hasNextRun ( const Context context_) const
overridevirtual

Check whether next run of the object is planned.

Parameters
context_The otest2 context
Returns
True if next run is prepared

Implements OTest2::ObjectRepeater.

Definition at line 35 of file objectrepeateronce.cpp.

◆ modifyObjectPath()

void OTest2::ObjectRepeaterOnce::modifyObjectPath ( const Context context_,
ObjectPath path_ 
) const
overridevirtual

Change current object path.

This method changes current object path to distinguish different runs of the testing object. Usually the some object's parameters are set.

Parameters
[in]context_The OTest2 context
[in,out]path_The modified object path

Implements OTest2::ObjectRepeater.

Definition at line 40 of file objectrepeateronce.cpp.

◆ operator=()

ObjectRepeaterOnce& OTest2::ObjectRepeaterOnce::operator= ( const ObjectRepeaterOnce )
delete

The documentation for this class was generated from the following files: