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

Generic interface of a repeater of a testing object (this repeater is not a part of the OTest2 API) More...

#include <objectrepeater.h>

Inheritance diagram for OTest2::ObjectRepeater:
Inheritance graph
[legend]

Public Member Functions

 ObjectRepeater ()
 Ctor. More...
 
virtual ~ObjectRepeater ()
 Dtor. More...
 
 ObjectRepeater (const ObjectRepeater &)=delete
 
ObjectRepeateroperator= (const ObjectRepeater &)=delete
 
virtual bool hasNextRun (const Context &context_) const =0
 Check whether next run of the object is planned. More...
 
virtual void modifyObjectPath (const Context &context_, ObjectPath &path_) const =0
 Change current object path. More...
 
virtual ObjectScenarioPtr createObject (const Context &context_, const std::string &name_, ObjectPtr parent_)=0
 Create the testing object. More...
 

Detailed Description

Generic interface of a repeater of a testing object (this repeater is not a part of the OTest2 API)

Definition at line 38 of file objectrepeater.h.

Constructor & Destructor Documentation

◆ ObjectRepeater() [1/2]

OTest2::ObjectRepeater::ObjectRepeater ( )

Ctor.

Definition at line 24 of file objectrepeater.cpp.

◆ ~ObjectRepeater()

OTest2::ObjectRepeater::~ObjectRepeater ( )
virtual

Dtor.

Definition at line 28 of file objectrepeater.cpp.

◆ ObjectRepeater() [2/2]

OTest2::ObjectRepeater::ObjectRepeater ( const ObjectRepeater )
delete

Member Function Documentation

◆ createObject()

virtual ObjectScenarioPtr OTest2::ObjectRepeater::createObject ( const Context context_,
const std::string &  name_,
ObjectPtr  parent_ 
)
pure virtual

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!

Implemented in OTest2::ObjectRepeaterOnce, OTest2::ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ >, and OTest2::ObjectRepeaterMultiRoot< Object_, Repeater_ >.

◆ hasNextRun()

virtual bool OTest2::ObjectRepeater::hasNextRun ( const Context context_) const
pure virtual

Check whether next run of the object is planned.

Parameters
context_The otest2 context
Returns
True if next run is prepared

Implemented in OTest2::ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ >, OTest2::ObjectRepeaterOnce, and OTest2::ObjectRepeaterMultiRoot< Object_, Repeater_ >.

◆ modifyObjectPath()

virtual void OTest2::ObjectRepeater::modifyObjectPath ( const Context context_,
ObjectPath path_ 
) const
pure virtual

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

Implemented in OTest2::ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ >, OTest2::ObjectRepeaterMultiRoot< Object_, Repeater_ >, and OTest2::ObjectRepeaterOnce.

◆ operator=()

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

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