OpenPose  1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
op::Thread< TDatums, TWorker > Class Template Reference

#include <thread.hpp>

Public Member Functions

 Thread (const std::shared_ptr< std::atomic< bool >> &isRunningSharedPtr=nullptr)
 
 Thread (Thread &&t)
 
Threadoperator= (Thread &&t)
 
virtual ~Thread ()
 
void add (const std::vector< std::shared_ptr< SubThread< TDatums, TWorker >>> &subThreads)
 
void add (const std::shared_ptr< SubThread< TDatums, TWorker >> &subThread)
 
void exec (const std::shared_ptr< std::atomic< bool >> &isRunningSharedPtr)
 
void startInThread ()
 
void stopAndJoin ()
 
bool isRunning () const
 

Detailed Description

template<typename TDatums, typename TWorker = std::shared_ptr<Worker<TDatums>>>
class op::Thread< TDatums, TWorker >

Definition at line 12 of file thread.hpp.

Constructor & Destructor Documentation

◆ Thread() [1/2]

template<typename TDatums , typename TWorker >
op::Thread< TDatums, TWorker >::Thread ( const std::shared_ptr< std::atomic< bool >> &  isRunningSharedPtr = nullptr)
explicit

Definition at line 66 of file thread.hpp.

◆ Thread() [2/2]

template<typename TDatums , typename TWorker >
op::Thread< TDatums, TWorker >::Thread ( Thread< TDatums, TWorker > &&  t)

Definition at line 72 of file thread.hpp.

◆ ~Thread()

template<typename TDatums , typename TWorker >
op::Thread< TDatums, TWorker >::~Thread
virtual

Definition at line 89 of file thread.hpp.

Member Function Documentation

◆ add() [1/2]

template<typename TDatums , typename TWorker >
void op::Thread< TDatums, TWorker >::add ( const std::shared_ptr< SubThread< TDatums, TWorker >> &  subThread)

Definition at line 111 of file thread.hpp.

◆ add() [2/2]

template<typename TDatums , typename TWorker >
void op::Thread< TDatums, TWorker >::add ( const std::vector< std::shared_ptr< SubThread< TDatums, TWorker >>> &  subThreads)

Definition at line 104 of file thread.hpp.

◆ exec()

template<typename TDatums , typename TWorker >
void op::Thread< TDatums, TWorker >::exec ( const std::shared_ptr< std::atomic< bool >> &  isRunningSharedPtr)

Definition at line 117 of file thread.hpp.

◆ isRunning()

template<typename TDatums , typename TWorker = std::shared_ptr<Worker<TDatums>>>
bool op::Thread< TDatums, TWorker >::isRunning ( ) const
inline

Definition at line 36 of file thread.hpp.

◆ operator=()

template<typename TDatums , typename TWorker >
Thread< TDatums, TWorker > & op::Thread< TDatums, TWorker >::operator= ( Thread< TDatums, TWorker > &&  t)

Definition at line 80 of file thread.hpp.

◆ startInThread()

template<typename TDatums , typename TWorker >
void op::Thread< TDatums, TWorker >::startInThread

Definition at line 133 of file thread.hpp.

◆ stopAndJoin()

template<typename TDatums , typename TWorker >
void op::Thread< TDatums, TWorker >::stopAndJoin

Definition at line 149 of file thread.hpp.


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