Crossfire Server, Trunk
CREMapInformationManager Class Reference

#include <CREMapInformationManager.h>

+ Inheritance diagram for CREMapInformationManager:
+ Collaboration diagram for CREMapInformationManager:

Signals

void addHook (const QString &file, HookInformation *hook)
 
void browsingMap (const QString &path)
 
void finished ()
 
void mapAdded (CREMapInformation *map)
 

Public Member Functions

QList< CREMapInformation * > allMaps ()
 
bool browseFinished () const
 
void cancel ()
 
void clearCache ()
 
 CREMapInformationManager (QObject *parent, MessageManager *messageManager, ScriptFileManager *scriptManager)
 
QList< CREMapInformation * > getAnimationUse (const Animations *anim)
 
QList< CREMapInformation * > getArchetypeUse (const archetype *arch)
 
QList< CREMapInformation * > getFaceUse (const Face *face)
 
QList< CREMapInformation * > getMapsForQuest (const quest_definition *quest)
 
QList< CREMapInformation * > getMapsForRegion (const QString &region)
 
QList< RandomMap * > randomMaps ()
 
void start ()
 
virtual ~CREMapInformationManager ()
 

Protected Member Functions

void addAnimationUse (const QString &name, CREMapInformation *map)
 
void addArchetypeUse (const QString &name, CREMapInformation *map)
 
void addFaceUse (const QString &name, CREMapInformation *map)
 
void addQuestUse (const QString &name, CREMapInformation *map)
 
void browseMaps ()
 
void checkEvent (const object *item, CREMapInformation *map, const object *env)
 
void checkItem (const object *item, CREMapInformation *information, const object *env)
 
CREMapInformationgetOrCreateMapInformation (const QString &path)
 
void loadCache ()
 
void process (const QString &path)
 
void recurseStyleDirectory (const QString &from)
 
void storeCache ()
 

Protected Attributes

QMultiHash< QString, CREMapInformation * > myAnimationUse
 
QMultiHash< QString, CREMapInformation * > myArchetypeUse
 
bool myCancelled
 
int myCurrentMap
 
QHash< QString, qint64 > myExperience
 
QMultiHash< QString, CREMapInformation * > myFaceUse
 
QHash< QString, CREMapInformation * > myInformation
 
QMutex myLock
 
MessageManagermyMessageManager
 
QMultiHash< QString, CREMapInformation * > myQuestUse
 
ScriptFileManagermyScriptManager
 
QStringList myToProcess
 
QFuture< void > myWorker
 

Detailed Description

Definition at line 27 of file CREMapInformationManager.h.

Constructor & Destructor Documentation

◆ CREMapInformationManager()

CREMapInformationManager::CREMapInformationManager ( QObject *  parent,
MessageManager messageManager,
ScriptFileManager scriptManager 
)

Definition at line 67 of file CREMapInformationManager.cpp.

References addHook(), myMessageManager, and myScriptManager.

◆ ~CREMapInformationManager()

CREMapInformationManager::~CREMapInformationManager ( )
virtual

Definition at line 76 of file CREMapInformationManager.cpp.

References myInformation.

Member Function Documentation

◆ addAnimationUse()

void CREMapInformationManager::addAnimationUse ( const QString &  name,
CREMapInformation map 
)
protected

Definition at line 733 of file CREMapInformationManager.cpp.

References disinfect::map, myAnimationUse, myLock, and give::name.

Referenced by checkItem(), and loadCache().

+ Here is the caller graph for this function:

◆ addArchetypeUse()

void CREMapInformationManager::addArchetypeUse ( const QString &  name,
CREMapInformation map 
)
protected

Definition at line 719 of file CREMapInformationManager.cpp.

References disinfect::map, myArchetypeUse, myLock, and give::name.

Referenced by checkItem(), and loadCache().

+ Here is the caller graph for this function:

◆ addFaceUse()

void CREMapInformationManager::addFaceUse ( const QString &  name,
CREMapInformation map 
)
protected

Definition at line 726 of file CREMapInformationManager.cpp.

References disinfect::map, myFaceUse, myLock, and give::name.

Referenced by checkItem(), and loadCache().

+ Here is the caller graph for this function:

◆ addHook

void CREMapInformationManager::addHook ( const QString &  file,
HookInformation hook 
)
signal

Referenced by checkEvent(), CREMapInformationManager(), and loadCache().

+ Here is the caller graph for this function:

◆ addQuestUse()

void CREMapInformationManager::addQuestUse ( const QString &  name,
CREMapInformation map 
)
protected

Definition at line 740 of file CREMapInformationManager.cpp.

References disinfect::map, myLock, myQuestUse, and give::name.

Referenced by checkEvent(), and loadCache().

+ Here is the caller graph for this function:

◆ allMaps()

QList< CREMapInformation * > CREMapInformationManager::allMaps ( )

Definition at line 374 of file CREMapInformationManager.cpp.

References myInformation, and myLock.

Referenced by CREMainWindow::onReportResetGroups(), and CREMainWindow::onReportShops().

+ Here is the caller graph for this function:

◆ browseFinished()

bool CREMapInformationManager::browseFinished ( ) const

Definition at line 81 of file CREMapInformationManager.cpp.

References myWorker.

Referenced by CREMainWindow::createAction().

+ Here is the caller graph for this function:

◆ browseMaps()

void CREMapInformationManager::browseMaps ( )
protected
Todo:
make nicer report

Definition at line 310 of file CREMapInformationManager.cpp.

References archininventory::arch, AssetsManager::archetypes(), AssetsCollection< T, Key >::each(), first_map_ext_path, first_map_path, getManager(), loadCache(), myArchetypeUse, myCancelled, myCurrentMap, myInformation, myToProcess, and PLAYER.

Referenced by start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ browsingMap

void CREMapInformationManager::browsingMap ( const QString &  path)
signal

Referenced by process().

+ Here is the caller graph for this function:

◆ cancel()

void CREMapInformationManager::cancel ( )

Definition at line 368 of file CREMapInformationManager.cpp.

References myCancelled, and myWorker.

Referenced by CREMainWindow::closeEvent().

+ Here is the caller graph for this function:

◆ checkEvent()

void CREMapInformationManager::checkEvent ( const object item,
CREMapInformation map,
const object env 
)
protected

Definition at line 747 of file CREMapInformationManager.cpp.

References addHook(), addQuestUse(), env, EVENT_CONNECTOR, EVENT_SAY, eventNames, MessageManager::findMessage(), disinfect::map, diamondslots::message, myMessageManager, NR_EVENTS, python_init::path, and split().

Referenced by checkItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkItem()

◆ clearCache()

void CREMapInformationManager::clearCache ( )

Definition at line 806 of file CREMapInformationManager.cpp.

References myWorker, and settings.

Referenced by CREMainWindow::onClearCache().

+ Here is the caller graph for this function:

◆ finished

void CREMapInformationManager::finished ( )
signal

◆ getAnimationUse()

QList< CREMapInformation * > CREMapInformationManager::getAnimationUse ( const Animations anim)

Definition at line 392 of file CREMapInformationManager.cpp.

References myAnimationUse, myLock, and Animations::name.

◆ getArchetypeUse()

QList< CREMapInformation * > CREMapInformationManager::getArchetypeUse ( const archetype arch)

Definition at line 380 of file CREMapInformationManager.cpp.

References archininventory::arch, myArchetypeUse, and myLock.

◆ getFaceUse()

QList< CREMapInformation * > CREMapInformationManager::getFaceUse ( const Face face)

Definition at line 386 of file CREMapInformationManager.cpp.

References myFaceUse, myLock, and Face::name.

◆ getMapsForQuest()

QList< CREMapInformation * > CREMapInformationManager::getMapsForQuest ( const quest_definition quest)

Definition at line 398 of file CREMapInformationManager.cpp.

References myLock, and myQuestUse.

◆ getMapsForRegion()

QList< CREMapInformation * > CREMapInformationManager::getMapsForRegion ( const QString &  region)

Definition at line 793 of file CREMapInformationManager.cpp.

References guildoracle::list, disinfect::map, and myInformation.

Referenced by RegionWrapper::mapAdded().

+ Here is the caller graph for this function:

◆ getOrCreateMapInformation()

CREMapInformation * CREMapInformationManager::getOrCreateMapInformation ( const QString &  path)
protected

Definition at line 709 of file CREMapInformationManager.cpp.

References myInformation, and python_init::path.

Referenced by checkItem(), and process().

+ Here is the caller graph for this function:

◆ loadCache()

◆ mapAdded

void CREMapInformationManager::mapAdded ( CREMapInformation map)
signal

◆ process()

◆ randomMaps()

QList< RandomMap * > CREMapInformationManager::randomMaps ( )

Definition at line 813 of file CREMapInformationManager.cpp.

References disinfect::map, maps, and myInformation.

Referenced by RandomMaps::refresh().

+ Here is the caller graph for this function:

◆ recurseStyleDirectory()

void CREMapInformationManager::recurseStyleDirectory ( const QString &  from)
protected

Definition at line 823 of file CREMapInformationManager.cpp.

References create_pathname(), MAX_BUF, and myToProcess.

+ Here is the call graph for this function:

◆ start()

void CREMapInformationManager::start ( )

Definition at line 86 of file CREMapInformationManager.cpp.

References browseMaps(), and myWorker.

Referenced by checkItem(), and CREMainWindow::CREMainWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ storeCache()

Field Documentation

◆ myAnimationUse

QMultiHash<QString, CREMapInformation*> CREMapInformationManager::myAnimationUse
protected

Definition at line 60 of file CREMapInformationManager.h.

Referenced by addAnimationUse(), and getAnimationUse().

◆ myArchetypeUse

QMultiHash<QString, CREMapInformation*> CREMapInformationManager::myArchetypeUse
protected

Definition at line 58 of file CREMapInformationManager.h.

Referenced by addArchetypeUse(), browseMaps(), and getArchetypeUse().

◆ myCancelled

bool CREMapInformationManager::myCancelled
protected

Definition at line 65 of file CREMapInformationManager.h.

Referenced by browseMaps(), cancel(), and process().

◆ myCurrentMap

int CREMapInformationManager::myCurrentMap
protected

Definition at line 63 of file CREMapInformationManager.h.

Referenced by browseMaps().

◆ myExperience

QHash<QString, qint64> CREMapInformationManager::myExperience
protected

Definition at line 67 of file CREMapInformationManager.h.

Referenced by process().

◆ myFaceUse

QMultiHash<QString, CREMapInformation*> CREMapInformationManager::myFaceUse
protected

Definition at line 59 of file CREMapInformationManager.h.

Referenced by addFaceUse(), and getFaceUse().

◆ myInformation

QHash<QString, CREMapInformation*> CREMapInformationManager::myInformation
protected

◆ myLock

QMutex CREMapInformationManager::myLock
protected

◆ myMessageManager

MessageManager* CREMapInformationManager::myMessageManager
protected

Definition at line 55 of file CREMapInformationManager.h.

Referenced by checkEvent(), CREMapInformationManager(), and loadCache().

◆ myQuestUse

QMultiHash<QString, CREMapInformation*> CREMapInformationManager::myQuestUse
protected

Definition at line 61 of file CREMapInformationManager.h.

Referenced by addQuestUse(), and getMapsForQuest().

◆ myScriptManager

ScriptFileManager* CREMapInformationManager::myScriptManager
protected

Definition at line 56 of file CREMapInformationManager.h.

Referenced by CREMapInformationManager(), process(), and storeCache().

◆ myToProcess

QStringList CREMapInformationManager::myToProcess
protected

Definition at line 62 of file CREMapInformationManager.h.

Referenced by browseMaps(), checkItem(), process(), and recurseStyleDirectory().

◆ myWorker

QFuture<void> CREMapInformationManager::myWorker
protected

Definition at line 64 of file CREMapInformationManager.h.

Referenced by browseFinished(), cancel(), clearCache(), and start().


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