Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
PTL::VTask Class Referenceabstract

VTask is the abstract class stored in thread_pool. More...

#include <VTask.hh>

+ Inheritance diagram for PTL::VTask:

Public Types

using tid_type = std::thread::id
 
using size_type = size_t
 
using void_func_t = std::function< void()>
 

Public Member Functions

 VTask (bool _is_native, intmax_t _depth)
 
 VTask ()=default
 
virtual ~VTask ()=default
 
 VTask (const VTask &)=delete
 
VTaskoperator= (const VTask &)=delete
 
 VTask (VTask &&)=default
 
VTaskoperator= (VTask &&)=default
 
virtual void operator() ()=0
 
bool is_native_task () const
 
intmax_t depth () const
 

Protected Attributes

bool m_is_native = false
 
intmax_t m_depth = 0
 
void_func_t m_func = []() {}
 

Detailed Description

VTask is the abstract class stored in thread_pool.

Definition at line 42 of file VTask.hh.

Member Typedef Documentation

◆ size_type

using PTL::VTask::size_type = size_t

Definition at line 46 of file VTask.hh.

◆ tid_type

using PTL::VTask::tid_type = std::thread::id

Definition at line 45 of file VTask.hh.

◆ void_func_t

using PTL::VTask::void_func_t = std::function<void()>

Definition at line 47 of file VTask.hh.

Constructor & Destructor Documentation

◆ VTask() [1/4]

PTL::VTask::VTask ( bool  _is_native,
intmax_t  _depth 
)
inline

Definition at line 50 of file VTask.hh.

51 : m_is_native{ _is_native }
52 , m_depth{ _depth }
53 {}
bool m_is_native
Definition: VTask.hh:73
intmax_t m_depth
Definition: VTask.hh:74

◆ VTask() [2/4]

PTL::VTask::VTask ( )
default

◆ ~VTask()

virtual PTL::VTask::~VTask ( )
virtualdefault

◆ VTask() [3/4]

PTL::VTask::VTask ( const VTask )
delete

◆ VTask() [4/4]

PTL::VTask::VTask ( VTask &&  )
default

Member Function Documentation

◆ depth()

intmax_t PTL::VTask::depth ( ) const
inline

Definition at line 70 of file VTask.hh.

70{ return m_depth; }

◆ is_native_task()

bool PTL::VTask::is_native_task ( ) const
inline

Definition at line 69 of file VTask.hh.

69{ return m_is_native; }

◆ operator()()

virtual void PTL::VTask::operator() ( )
pure virtual

◆ operator=() [1/2]

VTask & PTL::VTask::operator= ( const VTask )
delete

◆ operator=() [2/2]

VTask & PTL::VTask::operator= ( VTask &&  )
default

Member Data Documentation

◆ m_depth

intmax_t PTL::VTask::m_depth = 0
protected

Definition at line 74 of file VTask.hh.

Referenced by depth().

◆ m_func

void_func_t PTL::VTask::m_func = []() {}
protected

Definition at line 75 of file VTask.hh.

◆ m_is_native

bool PTL::VTask::m_is_native = false
protected

Definition at line 73 of file VTask.hh.

Referenced by is_native_task().


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