nlib
nn::nlib::threading::ThreadArg< T1, T2, T3, T4, T5 > Struct Template Reference

Structure to run a thread in a Thread class. More...

#include "nn/nlib/threading/Thread.h"

Public Types

typedef ThreadArg< T1, T2, T3, T4, T5 > ThisType
 typedef for this data structure type.
 
typedef UniquePtr< ThisTypeArgType
 typedef for the thread function argument type.
 
typedef void(* Func) (ArgType &ptr)
 typedef for the thread function type.
 

Public Member Functions

constexpr ThreadArg ()
 Instantiates the object with default parameters (default constructor).
 
constexpr ThreadArg (Func func_, T1 arg1_, T2 arg2_, T3 arg3_, T4 arg4_, T5 arg5_)
 This constructor initializes the data structure field. More...
 

Public Attributes

Func func
 Pointer to a function being run in a different thread.
 
T1 arg1
 Object passed to a function being run in a different thread.
 
T2 arg2
 Object passed to a function being run in a different thread.
 
T3 arg3
 Object passed to a function being run in a different thread.
 
T4 arg4
 Object passed to a function being run in a different thread.
 
T5 arg5
 Object passed to a function being run in a different thread.
 

Detailed Description

template<class T1 = None, class T2 = None, class T3 = None, class T4 = None, class T5 = None>
struct nn::nlib::threading::ThreadArg< T1, T2, T3, T4, T5 >

Structure to run a thread in a Thread class.

Template Parameters
T1Object type to pass to the thread.
T2Object type be to pass to the thread.
T3Object type to be pass to the thread.
T4Object type to be pass to the thread.
T5Object type to be pass to the thread.
Description
Structure that consolidates one argument of the thread function and a pointer to a thread function that takes this data structure as an argument. This class template is specialized for use even when there are one to four arguments.
That is, it can be used in the same way in all these cases: ThreadArg<>, ThreadArg<T1>, ThreadArg<T1,T2>, ThreadArg<T1,T2,T3>, ThreadArg<T1,T2,T3,T4>, and ThreadArg<T1,T2,T3,T4,T5>.

Definition at line 118 of file Thread.h.

Constructor & Destructor Documentation

◆ ThreadArg()

template<class T1 = None, class T2 = None, class T3 = None, class T4 = None, class T5 = None>
nn::nlib::threading::ThreadArg< T1, T2, T3, T4, T5 >::ThreadArg ( Func  func_,
T1  arg1_,
T2  arg2_,
T3  arg3_,
T4  arg4_,
T5  arg5_ 
)
inline

This constructor initializes the data structure field.

Parameters
[in]func_Pointer to a function.
[in]arg1_Argument type object.
[in]arg2_Argument type object.
[in]arg3_Argument type object.
[in]arg4_Argument type object.
[in]arg5_Argument type object.

Definition at line 123 of file Thread.h.


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