GQCP
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
GQCP::StepCollection< _Environment > Class Template Reference

#include <StepCollection.hpp>

Inheritance diagram for GQCP::StepCollection< _Environment >:
Inheritance graph
Collaboration diagram for GQCP::StepCollection< _Environment >:
Collaboration graph

Public Types

using Environment = _Environment
 
- Public Types inherited from GQCP::Step< _Environment >
using Environment = _Environment
 

Public Member Functions

std::string description () const override
 
void execute (Environment &environment) override
 
template<typename Z = Step<Environment>>
enable_if_t< std::is_same< Environment, typename Z::Environment >::value, StepCollection< Environment > & > add (const Z &step)
 
template<typename Z = Step<Environment>>
enable_if_t< std::is_same< Environment, typename Z::Environment >::value, void > insert (const Z &step, const size_t index)
 
size_t numberOfSteps () const
 
void remove (const size_t index)
 
template<typename Z = Step<Environment>>
enable_if_t< std::is_same< Environment, typename Z::Environment >::value, void > replace (const Z &step, const size_t index)
 
- Public Member Functions inherited from GQCP::Step< _Environment >
virtual ~Step ()=default
 
virtual std::string description () const =0
 
virtual void execute (Environment &environment)=0
 

Detailed Description

template<typename _Environment>
class GQCP::StepCollection< _Environment >

A collection of steps to be executed in a consecutive order.

This iteration cycle maintains the ownership of its constituting steps.

Parameters
_Environmentthe type of the environment that this iteration step can read from and write to

Member Typedef Documentation

◆ Environment

template<typename _Environment >
using GQCP::StepCollection< _Environment >::Environment = _Environment

Member Function Documentation

◆ add()

template<typename _Environment >
template<typename Z = Step<Environment>>
enable_if_t< std::is_same< Environment, typename Z::Environment >::value, StepCollection< Environment > & > GQCP::StepCollection< _Environment >::add ( const Z &  step)
inline

Add a new step to the collection of steps.

Returns
the modified collection of steps, in order to allow chaining.

◆ description()

template<typename _Environment >
std::string GQCP::StepCollection< _Environment >::description ( ) const
inlineoverridevirtual
Returns
a textual description of this algorithmic step

Implements GQCP::Step< _Environment >.

◆ execute()

template<typename _Environment >
void GQCP::StepCollection< _Environment >::execute ( Environment environment)
inlineoverridevirtual

Execute all the steps in this collection.

Parameters
environmentthe environment that this step can read from and write to

Implements GQCP::Step< _Environment >.

◆ insert()

template<typename _Environment >
template<typename Z = Step<Environment>>
enable_if_t< std::is_same< Environment, typename Z::Environment >::value, void > GQCP::StepCollection< _Environment >::insert ( const Z &  step,
const size_t  index 
)
inline

Insert an algorithm step at the given index.

Parameters
stepthe step that should be inserted into this algorithm step collection
indexthe zero-based index that the given step should be performed at in the total collection of steps

◆ numberOfSteps()

template<typename _Environment >
size_t GQCP::StepCollection< _Environment >::numberOfSteps ( ) const
inline
Returns
the number of steps that are in this consecutive collection

◆ remove()

template<typename _Environment >
void GQCP::StepCollection< _Environment >::remove ( const size_t  index)
inline

Remove the step at the given index.

Parameters
indexthe zero-based index of the step in this collection that should be removed

◆ replace()

template<typename _Environment >
template<typename Z = Step<Environment>>
enable_if_t< std::is_same< Environment, typename Z::Environment >::value, void > GQCP::StepCollection< _Environment >::replace ( const Z &  step,
const size_t  index 
)
inline

Replace an algorithm step at the given index.

Parameters
stepthe step that should be inserted into this algorithm
indexthe zero-based index of the step that should be replaced

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