OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Slots | Signals | Public Member Functions | Private Slots | Private Attributes | List of all members
CSMDoc::Loader Class Reference

#include <loader.hpp>

Inheritance diagram for CSMDoc::Loader:
Collaboration diagram for CSMDoc::Loader:

Classes

struct  Stage
 

Public Slots

void loadDocument (CSMDoc::Document *document)
 The ownership of document is not transferred. More...
 
void abortLoading (CSMDoc::Document *document)
 

Signals

void documentLoaded (Document *document)
 The ownership of document is not transferred. More...
 
void documentNotLoaded (Document *document, const std::string &error)
 
void nextStage (CSMDoc::Document *document, const std::string &name, int totalRecords)
 
void nextRecord (CSMDoc::Document *document, int records)
 
void loadMessage (CSMDoc::Document *document, const std::string &message)
 Non-critical load error or warning. More...
 

Public Member Functions

 Loader ()
 
QWaitCondition & hasThingsToDo ()
 
void stop ()
 

Private Slots

void load ()
 

Private Attributes

QMutex mMutex
 
QWaitCondition mThingsToDo
 
std::vector< std::pair
< Document *, Stage > > 
mDocuments
 
QTimer * mTimer
 
bool mShouldStop
 

Constructor & Destructor Documentation

CSMDoc::Loader::Loader ( )

Here is the call graph for this function:

Member Function Documentation

void CSMDoc::Loader::abortLoading ( CSMDoc::Document document)
slot

Abort loading docuemnt (ignored if document has already finished being loaded). Will result in a documentNotLoaded signal, once the Loader has finished cleaning up.

void CSMDoc::Loader::documentLoaded ( Document document)
signal

The ownership of document is not transferred.

void CSMDoc::Loader::documentNotLoaded ( Document document,
const std::string &  error 
)
signal

Document load has been interrupted either because of a call to abortLoading or a problem during loading). In the former case error will be an empty string.

QWaitCondition & CSMDoc::Loader::hasThingsToDo ( )
void CSMDoc::Loader::load ( )
privateslot

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMDoc::Loader::loadDocument ( CSMDoc::Document document)
slot

The ownership of document is not transferred.

void CSMDoc::Loader::loadMessage ( CSMDoc::Document document,
const std::string &  message 
)
signal

Non-critical load error or warning.

void CSMDoc::Loader::nextRecord ( CSMDoc::Document document,
int  records 
)
signal
Note
This signal is only given once per group of records. The group size is approximately the total number of records divided by the steps value of the previous nextStage signal.
void CSMDoc::Loader::nextStage ( CSMDoc::Document document,
const std::string &  name,
int  totalRecords 
)
signal
void CSMDoc::Loader::stop ( )

Member Data Documentation

std::vector<std::pair<Document *, Stage> > CSMDoc::Loader::mDocuments
private
QMutex CSMDoc::Loader::mMutex
private
bool CSMDoc::Loader::mShouldStop
private
QWaitCondition CSMDoc::Loader::mThingsToDo
private
QTimer* CSMDoc::Loader::mTimer
private

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