Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
Scroom::Utils::ProgressInterfaceMultiplexer::ChildData Class Reference
Inheritance diagram for Scroom::Utils::ProgressInterfaceMultiplexer::ChildData:
Inheritance graph
Collaboration diagram for Scroom::Utils::ProgressInterfaceMultiplexer::ChildData:
Collaboration graph

Public Types

using Ptr = std::shared_ptr< ChildData >
 
- Public Types inherited from Scroom::Utils::ProgressStateInterface
enum  State { IDLE , WAITING , WORKING , FINISHED }
 
using Ptr = std::shared_ptr< ProgressStateInterface >
 
using WeakPtr = std::weak_ptr< ProgressStateInterface >
 

Public Member Functions

void clearFinished ()
 
void setProgress (State s, double progress=0.0) override
 

Static Public Member Functions

static Ptr create ()
 

Public Attributes

boost::mutex mut
 
ProgressStateInterface::State state {ProgressStateInterface::IDLE}
 
double progress {0.0}
 

Private Member Functions

 ChildData ()=default
 

Member Typedef Documentation

◆ Ptr

Constructor & Destructor Documentation

◆ ChildData()

Scroom::Utils::ProgressInterfaceMultiplexer::ChildData::ChildData ( )
privatedefault

Member Function Documentation

◆ clearFinished()

void Scroom::Utils::ProgressInterfaceMultiplexer::ChildData::clearFinished ( )
215 {
216 boost::mutex::scoped_lock const l(mut);
217 if(state == FINISHED)
218 {
219 state = IDLE;
220 progress = 0.0;
221 }
222 }
ProgressStateInterface::State state
Definition progressinterfacehelpers.hh:194
double progress
Definition progressinterfacehelpers.hh:195
boost::mutex mut
Definition progressinterfacehelpers.hh:193
@ IDLE
Definition progressinterfacehelpers.hh:31
@ FINISHED
Definition progressinterfacehelpers.hh:34
PageList const l
Definition compression-tests.cc:33

◆ create()

ProgressInterfaceMultiplexer::ChildData::Ptr Scroom::Utils::ProgressInterfaceMultiplexer::ChildData::create ( )
static
205{ return Ptr(new ChildData()); }
std::shared_ptr< ChildData > Ptr
Definition progressinterfacehelpers.hh:190

Referenced by Scroom::Utils::ProgressInterfaceMultiplexer::createProgressInterface().

Here is the caller graph for this function:

◆ setProgress()

void Scroom::Utils::ProgressInterfaceMultiplexer::ChildData::setProgress ( State  s,
double  progress = 0.0 
)
overridevirtual

Implements Scroom::Utils::ProgressStateInterface.

208 {
209 boost::mutex::scoped_lock const l(mut);
210 state = state_;
211 progress = progress_;
212 }

Member Data Documentation

◆ mut

boost::mutex Scroom::Utils::ProgressInterfaceMultiplexer::ChildData::mut

◆ progress

double Scroom::Utils::ProgressInterfaceMultiplexer::ChildData::progress {0.0}
195{0.0};

◆ state

ProgressStateInterface::State Scroom::Utils::ProgressInterfaceMultiplexer::ChildData::state {ProgressStateInterface::IDLE}

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