FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
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

Definition at line 63 of file percentdonelistener.h.

Constructor & Destructor Documentation

FIFE::PercentDoneCallback::PercentDoneCallback ( )

Definition at line 43 of file percentdonelistener.cpp.

FIFE::PercentDoneCallback::~PercentDoneCallback ( )
virtual

Definition at line 48 of file percentdonelistener.cpp.

Member Function Documentation

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:

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:

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:

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

Definition at line 108 of file percentdonelistener.cpp.

References m_listeners.

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:

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

Definition at line 57 of file percentdonelistener.cpp.

References m_percent.

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

uint32_t FIFE::PercentDoneCallback::m_count
private

Definition at line 61 of file percentdonelistener.h.

Referenced by incrementCount(), and reset().

ListenerContainer FIFE::PercentDoneCallback::m_listeners
private

Definition at line 64 of file percentdonelistener.h.

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

uint32_t FIFE::PercentDoneCallback::m_numberOfEvents
private

Definition at line 60 of file percentdonelistener.h.

Referenced by incrementCount(), and reset().

uint32_t FIFE::PercentDoneCallback::m_percent
private

Definition at line 59 of file percentdonelistener.h.

Referenced by incrementCount(), and setPercentDoneInterval().

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: