Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Common::Thread Class Reference

#include <thread.h>

Public Member Functions

void Join ()
 Wait until started thread stop. More...
 
void Run ()
 Calls in the separate thread from ThreadProc. More...
 
 Thread (std::function< void()> f, ThreadObserver *observer=0)
 Starts f in a separate thread. More...
 
 ~Thread ()
 

Static Public Member Functions

static Thread::UniquePtr Create (ThreadProc f, ThreadObserver *observer=0)
 
static Thread::UniquePtr Create (void(*f)(), ThreadObserver *observer=0)
 
static void ThreadProc (Thread *thread)
 static member required for std::thread More...
 

Private Attributes

Common::ThreadProc Func
 
std::thread Impl
 
ThreadObserverObserver
 

Detailed Description

Definition at line 34 of file thread.h.

Constructor & Destructor Documentation

Common::Thread::Thread ( std::function< void()>  f,
ThreadObserver observer = 0 
)

Starts f in a separate thread.

Definition at line 18 of file thread.cpp.

Common::Thread::~Thread ( )

Definition at line 25 of file thread.cpp.

Member Function Documentation

static Thread::UniquePtr Common::Thread::Create ( ThreadProc  f,
ThreadObserver observer = 0 
)
inlinestatic

Definition at line 43 of file thread.h.

static Thread::UniquePtr Common::Thread::Create ( void(*)()  f,
ThreadObserver observer = 0 
)
inlinestatic

Definition at line 48 of file thread.h.

void Common::Thread::Join ( )

Wait until started thread stop.

Definition at line 37 of file thread.cpp.

void Common::Thread::Run ( )

Calls in the separate thread from ThreadProc.

Definition at line 42 of file thread.cpp.

void Common::Thread::ThreadProc ( Thread thread)
static

static member required for std::thread

Definition at line 63 of file thread.cpp.

Member Data Documentation

Common::ThreadProc Common::Thread::Func
private

Definition at line 66 of file thread.h.

std::thread Common::Thread::Impl
private

Definition at line 67 of file thread.h.

ThreadObserver* Common::Thread::Observer
private

Definition at line 65 of file thread.h.


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


ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Tue Jan 19 2021 03:12:09