Apollo  6.0
Open source self driving car software
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
apollo::perception::lib::Thread Class Referenceabstract

#include <thread.h>

Inheritance diagram for apollo::perception::lib::Thread:
Inheritance graph
Collaboration diagram for apollo::perception::lib::Thread:
Collaboration graph

Public Member Functions

 Thread (bool joinable=false, const std::string &name="Thread")
 
pthread_t tid () const
 
void set_joinable (bool joinable)
 
void Start ()
 
void Join ()
 
bool IsAlive ()
 
std::string get_thread_name () const
 
void set_thread_name (const std::string &name)
 
 Thread (const Thread &)=delete
 
Threadoperator= (const Thread &)=delete
 

Protected Member Functions

virtual void Run ()=0
 

Static Protected Member Functions

static void * ThreadRunner (void *arg)
 

Protected Attributes

pthread_t tid_
 
bool started_
 
bool joinable_
 
std::string thread_name_
 

Constructor & Destructor Documentation

◆ Thread() [1/2]

apollo::perception::lib::Thread::Thread ( bool  joinable = false,
const std::string &  name = "Thread" 
)
inlineexplicit

◆ Thread() [2/2]

apollo::perception::lib::Thread::Thread ( const Thread )
delete

Member Function Documentation

◆ get_thread_name()

std::string apollo::perception::lib::Thread::get_thread_name ( ) const
inline

◆ IsAlive()

bool apollo::perception::lib::Thread::IsAlive ( )

◆ Join()

void apollo::perception::lib::Thread::Join ( )

◆ operator=()

Thread& apollo::perception::lib::Thread::operator= ( const Thread )
delete

◆ Run()

virtual void apollo::perception::lib::Thread::Run ( )
protectedpure virtual

◆ set_joinable()

void apollo::perception::lib::Thread::set_joinable ( bool  joinable)
inline

◆ set_thread_name()

void apollo::perception::lib::Thread::set_thread_name ( const std::string &  name)
inline

◆ Start()

void apollo::perception::lib::Thread::Start ( )

◆ ThreadRunner()

static void* apollo::perception::lib::Thread::ThreadRunner ( void *  arg)
inlinestaticprotected

◆ tid()

pthread_t apollo::perception::lib::Thread::tid ( ) const
inline

Member Data Documentation

◆ joinable_

bool apollo::perception::lib::Thread::joinable_
protected

◆ started_

bool apollo::perception::lib::Thread::started_
protected

◆ thread_name_

std::string apollo::perception::lib::Thread::thread_name_
protected

◆ tid_

pthread_t apollo::perception::lib::Thread::tid_
protected

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