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

#include <threading.h>

Inheritance diagram for colmap::Thread:

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 TimerGetTimer () 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 ()
 

Detailed Description

Definition at line 74 of file threading.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
STARTED_CALLBACK 
FINISHED_CALLBACK 

Definition at line 76 of file threading.h.

Constructor & Destructor Documentation

◆ Thread()

colmap::Thread::Thread ( )

Definition at line 38 of file threading.cc.

References FINISHED_CALLBACK, RegisterCallback(), and STARTED_CALLBACK.

◆ ~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 ( )

Definition at line 156 of file threading.cc.

References colmap::Timer::Pause(), and colmap::Timer::Resume().

◆ Callback()

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

Definition at line 127 of file threading.cc.

References callback.

◆ CheckValidSetup()

bool colmap::Thread::CheckValidSetup ( )

Definition at line 167 of file threading.cc.

◆ GetThreadId()

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

Definition at line 134 of file threading.cc.

◆ GetTimer()

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

Definition at line 154 of file threading.cc.

◆ IsFinished()

bool colmap::Thread::IsFinished ( )

Definition at line 112 of file threading.cc.

◆ IsPaused()

bool colmap::Thread::IsPaused ( )

Definition at line 102 of file threading.cc.

◆ IsRunning()

bool colmap::Thread::IsRunning ( )

Definition at line 107 of file threading.cc.

◆ IsStarted()

bool colmap::Thread::IsStarted ( )

Definition at line 92 of file threading.cc.

◆ IsStopped()

◆ Pause()

void colmap::Thread::Pause ( )
virtual

Definition at line 73 of file threading.cc.

◆ RegisterCallback()

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

Definition at line 123 of file threading.cc.

Referenced by Thread().

◆ Resume()

void colmap::Thread::Resume ( )
virtual

Definition at line 78 of file threading.cc.

Referenced by Stop().

◆ Run()

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

◆ SignalInvalidSetup()

void colmap::Thread::SignalInvalidSetup ( )
protected

Definition at line 146 of file threading.cc.

Referenced by colmap::SiftGPUFeatureMatcher::Run().

◆ SignalValidSetup()

void colmap::Thread::SignalValidSetup ( )
protected

◆ Start()

◆ Stop()

void colmap::Thread::Stop ( )
virtual

Reimplemented in colmap::AutomaticReconstructionController.

Definition at line 65 of file threading.cc.

References Resume().

Referenced by colmap::AutomaticReconstructionController::Stop().

◆ Wait()


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