Loading...
Searching...
No Matches
mce::core::ThreadMemberFunctorWithArgs< C, Args > Struct Template Reference

Adapter that wraps a member function with arbitrary arguments. More...

`#include <Thread.hpp>`

Inheritance diagram for mce::core::ThreadMemberFunctorWithArgs< C, Args >:

## Public Member Functions

| ThreadMemberFunctorWithArgs (void(C::*function)(Args...), C *object, Args &&... args)
| Construct with member function pointer, target object and arguments.
virtual void | run () override
| Invoke the stored member function forwarding the stored arguments.
Public Member Functions inherited from mce::core::ThreadFunc
virtual | ~ThreadFunc ()
| Virtual destructor to allow safe deletion via base pointer.

## Public Attributes

void(C::* | functor )(Args...)
| Pointer to the member function to invoke.
C * | object
| Pointer to the object instance used when invoking the member function.
std::tuple< Args... > | args
| Tuple holding the arguments to forward to the member function.

## Detailed Description

template<typename C, typename... Args>
struct mce::core::ThreadMemberFunctorWithArgs< C, Args >

Adapter that wraps a member function with arbitrary arguments.

Template Parameters

  C | Class type that owns the member function.
  Args | Types of the arguments to forward when invoking the member function.

## Constructor & Destructor Documentation

## ThreadMemberFunctorWithArgs()

template<typename C, typename... Args>

mce::core::ThreadMemberFunctorWithArgs< C, Args >::ThreadMemberFunctorWithArgs | ( | void(C::* | function )(Args...),
|  | C * | object,
|  | Args &&... | args )

inline

Construct with member function pointer, target object and arguments.

Parameters

  function | Member function pointer to call.
  object | Target object on which to call the member function.
  args | Arguments to forward when invoking the member function.

## Member Function Documentation

## run()

template<typename C, typename... Args>

virtual void mce::core::ThreadMemberFunctorWithArgs< C, Args >::run | ( |  | ) |

inlineoverridevirtual

Invoke the stored member function forwarding the stored arguments.

Implements mce::core::ThreadFunc.

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

- Minecraft-Community-Edition/Core/Thread.hpp