ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
colmap::Thread Class Referenceabstract

#include <threading.h>

Inheritance diagram for colmap::Thread:
[legend]

Public Types

enum  { STARTED_CALLBACK = INT_MIN, FINISHED_CALLBACK }
 

Public Member Functions

 Thread ()
 
virtual ~Thread ()=default
 
virtual void Start ()
 
virtual void Stop ()
 
virtual void Pause ()
 
virtual void Resume ()
 
virtual void Wait ()
 
bool IsStarted ()
 
bool IsStopped ()
 
bool IsPaused ()
 
bool IsRunning ()
 
bool IsFinished ()
 
void BlockIfPaused ()
 
bool CheckValidSetup ()
 
void AddCallback (const int id, const std::function< void()> &func)
 
const Timer & GetTimer () const
 

Protected Member Functions

virtual void Run ()=0
 
void RegisterCallback (const int id)
 
void Callback (const int id) const
 
std::thread::id GetThreadId () const
 
void SignalValidSetup ()
 
void SignalInvalidSetup ()
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
STARTED_CALLBACK 
FINISHED_CALLBACK 

Constructor & Destructor Documentation

◆ Thread()

colmap::Thread::Thread ( )

◆ ~Thread()

virtual colmap::Thread::~Thread ( )
virtualdefault

Member Function Documentation

◆ AddCallback()

void colmap::Thread::AddCallback ( const int  id,
const std::function< void()> &  func 
)

◆ BlockIfPaused()

void colmap::Thread::BlockIfPaused ( )

◆ Callback()

void colmap::Thread::Callback ( const int  id) const
protected

References callback.

◆ CheckValidSetup()

bool colmap::Thread::CheckValidSetup ( )

◆ GetThreadId()

std::thread::id colmap::Thread::GetThreadId ( ) const
protected

◆ GetTimer()

const class Timer & colmap::Thread::GetTimer ( ) const

◆ IsFinished()

bool colmap::Thread::IsFinished ( )

◆ IsPaused()

bool colmap::Thread::IsPaused ( )

◆ IsRunning()

bool colmap::Thread::IsRunning ( )

◆ IsStarted()

bool colmap::Thread::IsStarted ( )

◆ IsStopped()

◆ Pause()

void colmap::Thread::Pause ( )
virtual

◆ RegisterCallback()

void colmap::Thread::RegisterCallback ( const int  id)
protected

Referenced by Thread().

◆ Resume()

void colmap::Thread::Resume ( )
virtual

Referenced by Stop().

◆ Run()

virtual void colmap::Thread::Run ( )
protectedpure virtual

◆ SignalInvalidSetup()

void colmap::Thread::SignalInvalidSetup ( )
protected

◆ SignalValidSetup()

void colmap::Thread::SignalValidSetup ( )
protected

◆ Start()

◆ Stop()

void colmap::Thread::Stop ( )
virtual

◆ Wait()


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