FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
FIFE::PercentDoneCallback Class Reference

#include <percentdonelistener.h>

+ Collaboration diagram for FIFE::PercentDoneCallback:

Public Member Functions

 PercentDoneCallback ()
 
virtual ~PercentDoneCallback ()
 
void setTotalNumberOfElements (unsigned int totalElements)
 
void setPercentDoneInterval (unsigned int percent)
 
void incrementCount ()
 
void reset ()
 
void addListener (PercentDoneListener *listener)
 
void removeListener (PercentDoneListener *listener)
 

Private Types

typedef std::vector< PercentDoneListener * > ListenerContainer
 

Private Member Functions

void fireEvent (uint32_t percent)
 

Private Attributes

uint32_t m_totalElements
 
uint32_t m_percent
 
uint32_t m_numberOfEvents
 
uint32_t m_count
 
ListenerContainer m_listeners
 

Detailed Description

Definition at line 42 of file percentdonelistener.h.

Member Typedef Documentation

◆ ListenerContainer

Definition at line 63 of file percentdonelistener.h.

Constructor & Destructor Documentation

◆ PercentDoneCallback()

FIFE::PercentDoneCallback::PercentDoneCallback ( )

Definition at line 43 of file percentdonelistener.cpp.

◆ ~PercentDoneCallback()

FIFE::PercentDoneCallback::~PercentDoneCallback ( )
virtual

Definition at line 48 of file percentdonelistener.cpp.

Member Function Documentation

◆ addListener()

void FIFE::PercentDoneCallback::addListener ( PercentDoneListener listener)

Definition at line 102 of file percentdonelistener.cpp.

References m_listeners.

Referenced by FIFE::MapLoader::addPercentDoneListener().

+ Here is the caller graph for this function:

◆ fireEvent()

void FIFE::PercentDoneCallback::fireEvent ( uint32_t  percent)
private

Definition at line 118 of file percentdonelistener.cpp.

References m_listeners.

Referenced by incrementCount(), and reset().

+ Here is the caller graph for this function:

◆ incrementCount()

void FIFE::PercentDoneCallback::incrementCount ( )

Definition at line 62 of file percentdonelistener.cpp.

References fireEvent(), m_count, m_listeners, m_numberOfEvents, m_percent, m_totalElements, and FIFE::maxPercent.

Referenced by FIFE::MapLoader::load().

+ Here is the caller graph for this function:

◆ removeListener()

void FIFE::PercentDoneCallback::removeListener ( PercentDoneListener listener)

Definition at line 108 of file percentdonelistener.cpp.

References m_listeners.

◆ reset()

void FIFE::PercentDoneCallback::reset ( )

Definition at line 93 of file percentdonelistener.cpp.

References fireEvent(), m_count, m_numberOfEvents, and m_totalElements.

Referenced by FIFE::MapLoader::load().

+ Here is the caller graph for this function:

◆ setPercentDoneInterval()

void FIFE::PercentDoneCallback::setPercentDoneInterval ( unsigned int  percent)

Definition at line 57 of file percentdonelistener.cpp.

References m_percent.

◆ setTotalNumberOfElements()

void FIFE::PercentDoneCallback::setTotalNumberOfElements ( unsigned int  totalElements)

Definition at line 52 of file percentdonelistener.cpp.

References m_totalElements.

Referenced by FIFE::MapLoader::load().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_count

uint32_t FIFE::PercentDoneCallback::m_count
private

Definition at line 61 of file percentdonelistener.h.

Referenced by incrementCount(), and reset().

◆ m_listeners

ListenerContainer FIFE::PercentDoneCallback::m_listeners
private

Definition at line 64 of file percentdonelistener.h.

Referenced by addListener(), fireEvent(), incrementCount(), and removeListener().

◆ m_numberOfEvents

uint32_t FIFE::PercentDoneCallback::m_numberOfEvents
private

Definition at line 60 of file percentdonelistener.h.

Referenced by incrementCount(), and reset().

◆ m_percent

uint32_t FIFE::PercentDoneCallback::m_percent
private

Definition at line 59 of file percentdonelistener.h.

Referenced by incrementCount(), and setPercentDoneInterval().

◆ m_totalElements

uint32_t FIFE::PercentDoneCallback::m_totalElements
private

Definition at line 58 of file percentdonelistener.h.

Referenced by incrementCount(), reset(), and setTotalNumberOfElements().


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