Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::FunctionRegistry::Registration< R, Args >::Holder Class Referencefinal

Nested holder storing a function with a specific signature. More...

#include <FunctionRegistry.h>

Inheritance diagram for sf::FunctionRegistry::Registration< R, Args >::Holder:
[legend]
Collaboration diagram for sf::FunctionRegistry::Registration< R, Args >::Holder:
[legend]

Public Member Functions

 Holder (std::function< R(Args...)> f)
 Constructor accepting a std::function.
std::type_index returnType () const override
 Get the return type of the stored function.
std::vector< std::type_index > argTypes () const override
 Get the argument types of the stored function.
R invoke (Args... args) const
 Invoke the stored function.
Public Member Functions inherited from sf::FunctionRegistry::Base
virtual ~Base ()=default

Detailed Description

template<typename R, typename... Args>
class sf::FunctionRegistry::Registration< R, Args >::Holder

Nested holder storing a function with a specific signature.

Constructor & Destructor Documentation

◆ Holder()

template<typename R, typename... Args>
sf::FunctionRegistry::Registration< R, Args >::Holder::Holder ( std::function< R(Args...)> f)
explicit

Constructor accepting a std::function.

Parameters
fFunction to store

Member Function Documentation

◆ argTypes()

template<typename R, typename... Args>
std::vector< std::type_index > sf::FunctionRegistry::Registration< R, Args >::Holder::argTypes ( ) const
overridevirtual

Get the argument types of the stored function.

Returns
Vector of std::type_index representing each argument type

Implements sf::FunctionRegistry::Base.

◆ invoke()

template<typename R, typename... Args>
R sf::FunctionRegistry::Registration< R, Args >::Holder::invoke ( Args... args) const

Invoke the stored function.

Parameters
argsArguments to pass
Returns
Result of invoking the function

◆ returnType()

template<typename R, typename... Args>
std::type_index sf::FunctionRegistry::Registration< R, Args >::Holder::returnType ( ) const
overridevirtual

Get the return type of the stored function.

Returns
std::type_index representing the return type

Implements sf::FunctionRegistry::Base.


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