Discman
Loading...
Searching...
No Matches
CDDrive::Poller Class Reference

The Poller uses a separate thread to poll the host for a disc drive with an audio CD. More...

#include <cd_drive.h>

Collaboration diagram for CDDrive::Poller:

Public Member Functions

 Poller (CDDrive &drive)
 Poller constructor.
 
 ~Poller ()
 Poller destructor.
 
void poll ()
 The execution loop performed by the thread.
 

Private Attributes

CDDrive_drive
 The parent CDDrive.
 
bool _exit
 Stores a request to exit poll().
 
std::mutex _exit_lock
 Provides mutually exclusive access to the _exit member between the the application thread and the Poller thread.
 
std::thread _thread
 The thread used to run poll().
 

Detailed Description

The Poller uses a separate thread to poll the host for a disc drive with an audio CD.

Definition at line 228 of file cd_drive.h.

Constructor & Destructor Documentation

◆ Poller()

CDDrive::Poller::Poller ( CDDrive & drive)

Poller constructor.

Parameters
[in]driveThe parent CDDrive.

Definition at line 98 of file cd_drive.cc.

◆ ~Poller()

CDDrive::Poller::~Poller ( )

Poller destructor.

Definition at line 104 of file cd_drive.cc.

Member Function Documentation

◆ poll()

void CDDrive::Poller::poll ( )

The execution loop performed by the thread.

Definition at line 111 of file cd_drive.cc.

Member Data Documentation

◆ _drive

CDDrive& CDDrive::Poller::_drive
private

The parent CDDrive.

Definition at line 240 of file cd_drive.h.

◆ _exit

bool CDDrive::Poller::_exit
private

Stores a request to exit poll().

Definition at line 242 of file cd_drive.h.

◆ _exit_lock

std::mutex CDDrive::Poller::_exit_lock
private

Provides mutually exclusive access to the _exit member between the the application thread and the Poller thread.

Definition at line 246 of file cd_drive.h.

◆ _thread

std::thread CDDrive::Poller::_thread
private

The thread used to run poll().

Definition at line 249 of file cd_drive.h.


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