OTest2
A C++ testing framework
Public Types | Public Member Functions | List of all members
OTest2::ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ > Class Template Reference

#include <objectrepeatermultiimpl.h>

Inheritance diagram for OTest2::ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ >:
Inheritance graph
[legend]
Collaboration diagram for OTest2::ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ >:
Collaboration graph
[legend]

Public Types

typedef ObjectScenarioPtr(Parent_::* FactoryMethod) (const Context &, const std::string &, std::shared_ptr< Repeater_ > &)
 

Public Member Functions

 ObjectRepeaterMultiNested (FactoryMethod factory_method_, const std::string &section_path_)
 
virtual ~ObjectRepeaterMultiNested ()=default
 
 ObjectRepeaterMultiNested (const ObjectRepeaterMultiNested &)=delete
 
ObjectRepeaterMultiNestedoperator= (const ObjectRepeaterMultiNested &)=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 &case_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

template<typename Parent_, typename Object_, typename Repeater_>
class OTest2::ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ >

Definition at line 103 of file objectrepeatermultiimpl.h.

Member Typedef Documentation

◆ FactoryMethod

template<typename Parent_ , typename Object_ , typename Repeater_ >
typedef ObjectScenarioPtr(Parent_::* OTest2::ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ >::FactoryMethod) (const Context &, const std::string &, std::shared_ptr< Repeater_ > &)

Definition at line 105 of file objectrepeatermultiimpl.h.

Constructor & Destructor Documentation

◆ ObjectRepeaterMultiNested() [1/2]

template<typename Parent_ , typename Object_ , typename Repeater_ >
OTest2::ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ >::ObjectRepeaterMultiNested ( FactoryMethod  factory_method_,
const std::string &  section_path_ 
)
inlineexplicit

Definition at line 117 of file objectrepeatermultiimpl.h.

◆ ~ObjectRepeaterMultiNested()

template<typename Parent_ , typename Object_ , typename Repeater_ >
virtual OTest2::ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ >::~ObjectRepeaterMultiNested ( )
virtualdefault

◆ ObjectRepeaterMultiNested() [2/2]

template<typename Parent_ , typename Object_ , typename Repeater_ >
OTest2::ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ >::ObjectRepeaterMultiNested ( const ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ > &  )
delete

Member Function Documentation

◆ createObject()

template<typename Parent_ , typename Object_ , typename Repeater_ >
virtual ObjectScenarioPtr OTest2::ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ >::createObject ( const Context context_,
const std::string &  name_,
ObjectPtr  parent_ 
)
inlineoverridevirtual

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 153 of file objectrepeatermultiimpl.h.

◆ hasNextRun()

template<typename Parent_ , typename Object_ , typename Repeater_ >
virtual bool OTest2::ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ >::hasNextRun ( const Context context_) const
inlineoverridevirtual

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 136 of file objectrepeatermultiimpl.h.

◆ modifyObjectPath()

template<typename Parent_ , typename Object_ , typename Repeater_ >
virtual void OTest2::ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ >::modifyObjectPath ( const Context context_,
ObjectPath path_ 
) const
inlineoverridevirtual

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 145 of file objectrepeatermultiimpl.h.

◆ operator=()

template<typename Parent_ , typename Object_ , typename Repeater_ >
ObjectRepeaterMultiNested& OTest2::ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ >::operator= ( const ObjectRepeaterMultiNested< Parent_, Object_, Repeater_ > &  )
delete

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