GrPPI  0.2
Generic and Reusable Parallel Pattern Interface
Public Member Functions | Friends | List of all members
grppi::polymorphic_execution Class Reference

#include <polymorphic_execution.h>

Public Member Functions

 polymorphic_execution () noexcept
 Create empty polymorphic execution. More...
 
bool has_execution () const noexcept
 Determine if there is an execution stored. More...
 
const std::type_info & type () const noexcept
 
template<typename E >
bool is_execution () const
 
template<typename E , requires_execution_policy< E > = 0>
E * execution_ptr ()
 Get the execution pointer for a given type. More...
 
template<typename E , requires_not_execution_policy< E > = 0>
E * execution_ptr ()
 Get the execution pointer for a given type. More...
 

Friends

template<typename E >
polymorphic_execution make_polymorphic_execution ()
 

Detailed Description

Polymorphic execution supporting any grppi execution. A polymorphic execution may hold either an execution or be empty.

Constructor & Destructor Documentation

grppi::polymorphic_execution::polymorphic_execution ( )
inlinenoexcept

Create empty polymorphic execution.

Member Function Documentation

template<typename E , requires_execution_policy< E > = 0>
E* grppi::polymorphic_execution::execution_ptr ( )
inline

Get the execution pointer for a given type.

template<typename E , requires_not_execution_policy< E > = 0>
E* grppi::polymorphic_execution::execution_ptr ( )
inline

Get the execution pointer for a given type.

bool grppi::polymorphic_execution::has_execution ( ) const
inlinenoexcept

Determine if there is an execution stored.

template<typename E >
bool grppi::polymorphic_execution::is_execution ( ) const
inline
const std::type_info& grppi::polymorphic_execution::type ( ) const
inlinenoexcept

Get the typeid of the current execution

Precondition
has_execution()

Friends And Related Function Documentation

template<typename E >
polymorphic_execution make_polymorphic_execution ( )
friend

Create from other static policy with no arguments.

Returns
A polymorphic execution containing an E object if E is supported
An empty polymorphic execution otherwise.

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