Scroom  0.14
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 = boost::shared_ptr< ChildData >
 
- Public Types inherited from Scroom::Utils::ProgressStateInterface
enum  State { IDLE, WAITING, WORKING, FINISHED }
 
using Ptr = boost::shared_ptr< ProgressStateInterface >
 
using WeakPtr = boost::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 ( )
210  {
211  boost::mutex::scoped_lock const l(mut);
212  if(state == FINISHED)
213  {
214  state = IDLE;
215  progress = 0.0;
216  }
217  }

◆ create()

ProgressInterfaceMultiplexer::ChildData::Ptr Scroom::Utils::ProgressInterfaceMultiplexer::ChildData::create ( )
static
200 { return Ptr(new ChildData()); }

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.

203  {
204  boost::mutex::scoped_lock const l(mut);
205  state = state_;
206  progress = progress_;
207  }

Member Data Documentation

◆ mut

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

◆ progress

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

◆ state

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

The documentation for this class was generated from the following files:
Scroom::Utils::ProgressInterfaceMultiplexer::ChildData::mut
boost::mutex mut
Definition: progressinterfacehelpers.hh:193
Scroom::Utils::ProgressStateInterface::FINISHED
@ FINISHED
Definition: progressinterfacehelpers.hh:34
Scroom::Utils::ProgressInterfaceMultiplexer::ChildData::ChildData
ChildData()=default
Scroom::Utils::ProgressInterfaceMultiplexer::ChildData::state
ProgressStateInterface::State state
Definition: progressinterfacehelpers.hh:194
Scroom::Utils::ProgressInterfaceMultiplexer::ChildData::progress
double progress
Definition: progressinterfacehelpers.hh:195
Scroom::Utils::ProgressStateInterface::IDLE
@ IDLE
Definition: progressinterfacehelpers.hh:31
Scroom::Utils::ProgressInterfaceMultiplexer::ChildData::Ptr
boost::shared_ptr< ChildData > Ptr
Definition: progressinterfacehelpers.hh:190