Crossfire Server, Trunk
ResourcesManager Class Reference

#include <ResourcesManager.h>

+ Inheritance diagram for ResourcesManager:
+ Collaboration diagram for ResourcesManager:

Public Slots

void archetypeModified (archetype *arch)
 
void generalMessageModified (GeneralMessage *message)
 
void questModified (quest_definition *quest)
 
void saveArchetypes ()
 
void saveArtifacts ()
 
void saveGeneralMessages ()
 
void saveQuests ()
 
void saveTreasures ()
 
void treasureModified (treasurelist *treasure)
 

Public Member Functions

virtual void assetDefined (const archt *arch, const std::string &filename) override
 
virtual void assetDefined (const artifact *asset, const std::string &filename) override
 
virtual void assetDefined (const GeneralMessage *asset, const std::string &filename) override
 
virtual void assetDefined (const quest_definition *asset, const std::string &filename) override
 
virtual void assetDefined (const treasurelist *asset, const std::string &filename) override
 
CREMapInformationManagergetMapInformationManager ()
 
const recipestructgetRecipe (int ingredients, const QString &name) const
 
bool hasPendingChanges () const
 
LicenseManagerlicenseManager ()
 
void load ()
 
std::string originOf (const archt *arch) const
 
std::string originOfQuest (const quest_definition *quest) const
 
const std::map< std::string, std::set< const archt * > > & origins () const
 
const std::map< std::string, std::set< const quest_definition * > > & questOrigins () const
 
int recipeMaxIngredients () const
 
QStringList recipes (int count) const
 
void remove (treasure *tr)
 
 ResourcesManager ()
 
void setMapInformationManager (CREMapInformationManager *mapInformationManager)
 
AssetWrapperwrap (Animations *anim, AssetWrapper *parent)
 
ArchetypeWrapperwrap (archt *arch, AssetWrapper *parent)
 
AssetWrapperwrap (artifact *art, AssetWrapper *parent)
 
AssetWrapperwrap (artifactlist *al, AssetWrapper *parent)
 
AssetWrapperwrap (Face *face, AssetWrapper *parent)
 
AssetWrapperwrap (face_sets *fs, AssetWrapper *parent)
 
AssetWrapperwrap (GeneralMessage *message, AssetWrapper *parent)
 
ObjectWrapperwrap (object *ob, AssetWrapper *parent)
 
AssetWrapperwrap (quest_definition *quest, AssetWrapper *parent)
 
AssetWrapperwrap (recipe *rc, AssetWrapper *parent)
 
AssetWrapperwrap (recipelist *list, AssetWrapper *parent)
 
AssetWrapperwrap (region *reg, AssetWrapper *parent)
 
AssetWrapperwrap (treasure *tr, AssetWrapper *parent)
 
AssetWrapperwrap (treasurelist *tr, AssetWrapper *parent)
 
virtual ~ResourcesManager ()
 

Static Public Member Functions

static void archetypeUse (const archt *item, CREMapInformationManager *store, AssetUseCallback callback)
 

Protected Attributes

ModifiedAssetsManager< archetypemyArchetypes
 
ModifiedAssetsManager< artifactmyArtifacts
 
ModifiedAssetsManager< GeneralMessagemyGeneralMessages
 
LicenseManager myLicenseManager
 
CREMapInformationManagermyMapInformationManager
 
ModifiedAssetsManager< quest_definitionmyQuests
 
QList< QHash< QString, recipestruct * > > myRecipes
 
ModifiedAssetsManager< treasurelistmyTreasures
 
AssetWrapperManager< Animations, AnimationWrappermyWrappedAnimations
 
AssetWrapperManager< archt, ArchetypeWrappermyWrappedArchetypes
 
AssetWrapperManager< artifactlist, ArtifactListWrappermyWrappedArtifactLists
 
AssetWrapperManager< artifact, ArtifactWrappermyWrappedArtifacts
 
AssetWrapperManager< Face, FaceWrappermyWrappedFaces
 
AssetWrapperManager< face_sets, FacesetsWrappermyWrappedFacesets
 
AssetWrapperManager< GeneralMessage, GeneralMessageWrappermyWrappedMessages
 
AssetWrapperManager< object, ObjectWrappermyWrappedObjects
 
AssetWrapperManager< quest_definition, QuestWrappermyWrappedQuests
 
AssetWrapperManager< recipelist, RecipeListWrappermyWrappedRecipeLists
 
AssetWrapperManager< recipe, RecipeWrappermyWrappedRecipes
 
AssetWrapperManager< region, RegionWrappermyWrappedRegions
 
AssetWrapperManager< treasurelist, TreasureListWrappermyWrappedTreasureLists
 
AssetWrapperManager< treasure, TreasureWrappermyWrappedTreasures
 

Additional Inherited Members

Detailed Description

Definition at line 67 of file ResourcesManager.h.

Constructor & Destructor Documentation

◆ ResourcesManager()

ResourcesManager::ResourcesManager ( )

Definition at line 31 of file ResourcesManager.cpp.

◆ ~ResourcesManager()

ResourcesManager::~ResourcesManager ( )
virtual

Definition at line 36 of file ResourcesManager.cpp.

Member Function Documentation

◆ archetypeModified

void ResourcesManager::archetypeModified ( archetype arch)
slot

Definition at line 181 of file ResourcesManager.cpp.

References archininventory::arch, and myArchetypes.

Referenced by ArchetypePanel::commitData().

+ Here is the caller graph for this function:

◆ archetypeUse()

void ResourcesManager::archetypeUse ( const archt item,
CREMapInformationManager store,
AssetUseCallback  callback 
)
static

Definition at line 105 of file ResourcesManager.cpp.

References archininventory::arch, AssetsManager::archetypes(), AssetsCollection< T, Key >::each(), getManager(), if(), guildoracle::list, object_get_value(), sstring, Floor::t, and AssetsManager::treasures().

Referenced by CREMainWindow::onReportArchetypes(), and ArchetypePanel::setItem().

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

◆ assetDefined() [1/5]

virtual void ResourcesManager::assetDefined ( const archt asset,
const std::string &  filename 
)
inlineoverridevirtual

Function called when an asset is defined in a file. It may be called multiple times with the same asset.

Parameters
assetasset which is defined.
filenamefull pathname of where the asset was defined.

Reimplemented from AssetsTracker.

Definition at line 88 of file ResourcesManager.h.

References archininventory::arch, npc_dialog::filename, and myArchetypes.

Referenced by CREQuestPanel::commitData().

+ Here is the caller graph for this function:

◆ assetDefined() [2/5]

virtual void ResourcesManager::assetDefined ( const artifact asset,
const std::string &  filename 
)
inlineoverridevirtual

Function called when an asset is defined in a file. It may be called multiple times with the same asset.

Parameters
assetasset which is defined.
filenamefull pathname of where the asset was defined.

Reimplemented from AssetsTracker.

Definition at line 92 of file ResourcesManager.h.

References npc_dialog::filename, and myArtifacts.

◆ assetDefined() [3/5]

virtual void ResourcesManager::assetDefined ( const GeneralMessage asset,
const std::string &  filename 
)
inlineoverridevirtual

Function called when an asset is defined in a file. It may be called multiple times with the same asset.

Parameters
assetasset which is defined.
filenamefull pathname of where the asset was defined.

Reimplemented from AssetsTracker.

Definition at line 91 of file ResourcesManager.h.

References ModifiedAssetsManager< T >::assetDefined(), npc_dialog::filename, and myGeneralMessages.

+ Here is the call graph for this function:

◆ assetDefined() [4/5]

virtual void ResourcesManager::assetDefined ( const quest_definition asset,
const std::string &  filename 
)
inlineoverridevirtual

Function called when an asset is defined in a file. It may be called multiple times with the same asset.

Parameters
assetasset which is defined.
filenamefull pathname of where the asset was defined.

Reimplemented from AssetsTracker.

Definition at line 89 of file ResourcesManager.h.

References ModifiedAssetsManager< T >::assetDefined(), npc_dialog::filename, and myQuests.

+ Here is the call graph for this function:

◆ assetDefined() [5/5]

virtual void ResourcesManager::assetDefined ( const treasurelist asset,
const std::string &  filename 
)
inlineoverridevirtual

Function called when an asset is defined in a file. It may be called multiple times with the same asset.

Parameters
assetasset which is defined.
filenamefull pathname of where the asset was defined.

Reimplemented from AssetsTracker.

Definition at line 90 of file ResourcesManager.h.

References npc_dialog::filename, and myTreasures.

◆ generalMessageModified

void ResourcesManager::generalMessageModified ( GeneralMessage message)
slot

Definition at line 205 of file ResourcesManager.cpp.

References ModifiedAssetsManager< T >::assetModified(), and myGeneralMessages.

Referenced by GeneralMessageWrapper::wasModified().

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

◆ getMapInformationManager()

CREMapInformationManager* ResourcesManager::getMapInformationManager ( )
inline

Definition at line 78 of file ResourcesManager.h.

References myMapInformationManager.

Referenced by AllAssets::AllAssets(), RegionWrapper::mapAdded(), and RegionWrapper::RegionWrapper().

+ Here is the caller graph for this function:

◆ getRecipe()

const recipe * ResourcesManager::getRecipe ( int  ingredients,
const QString &  name 
) const

Definition at line 97 of file ResourcesManager.cpp.

References myRecipes, and give::name.

◆ hasPendingChanges()

bool ResourcesManager::hasPendingChanges ( ) const
inline

Definition at line 102 of file ResourcesManager.h.

References ModifiedAssetsManager< T >::hasPendingChanges(), myArchetypes, myArtifacts, myGeneralMessages, myQuests, and myTreasures.

Referenced by CREMainWindow::closeEvent().

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

◆ licenseManager()

LicenseManager* ResourcesManager::licenseManager ( )
inline

Definition at line 132 of file ResourcesManager.h.

References myLicenseManager.

Referenced by CREResourcesWindow::CREResourcesWindow(), CREMainWindow::onReportLicenses(), CREMainWindow::onToolReloadAssets(), and CREFacePanel::setItem().

+ Here is the caller graph for this function:

◆ load()

◆ originOf()

std::string ResourcesManager::originOf ( const archt arch) const
inline

Definition at line 95 of file ResourcesManager.h.

References archininventory::arch, and myArchetypes.

Referenced by ArchetypePanel::commitData().

+ Here is the caller graph for this function:

◆ originOfQuest()

std::string ResourcesManager::originOfQuest ( const quest_definition quest) const
inline

Definition at line 98 of file ResourcesManager.h.

References myQuests, and ModifiedAssetsManager< T >::originOf().

Referenced by CREQuestPanel::commitData(), and CREQuestPanel::setItem().

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

◆ origins()

const std::map<std::string, std::set<const archt*> >& ResourcesManager::origins ( ) const
inline

Definition at line 94 of file ResourcesManager.h.

References myArchetypes.

◆ questModified

void ResourcesManager::questModified ( quest_definition quest)
slot

Definition at line 189 of file ResourcesManager.cpp.

References ModifiedAssetsManager< T >::assetModified(), and myQuests.

Referenced by CREQuestPanel::commitData().

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

◆ questOrigins()

const std::map<std::string, std::set<const quest_definition*> >& ResourcesManager::questOrigins ( ) const
inline

Definition at line 97 of file ResourcesManager.h.

References myQuests, and ModifiedAssetsManager< T >::origins().

Referenced by CREQuestPanel::CREQuestPanel().

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

◆ recipeMaxIngredients()

int ResourcesManager::recipeMaxIngredients ( ) const

Definition at line 82 of file ResourcesManager.cpp.

References myRecipes.

Referenced by RecipesWrapper::childrenCount().

+ Here is the caller graph for this function:

◆ recipes()

QStringList ResourcesManager::recipes ( int  count) const

Definition at line 87 of file ResourcesManager.cpp.

References disinfect::count, hall_of_fame::keys, and myRecipes.

Referenced by load().

+ Here is the caller graph for this function:

◆ remove()

void ResourcesManager::remove ( treasure tr)
inline

Definition at line 130 of file ResourcesManager.h.

References myWrappedTreasures.

Referenced by TreasureWrapper::doRemoveChild(), and TreasureListWrapper::removeChild().

+ Here is the caller graph for this function:

◆ saveArchetypes

void ResourcesManager::saveArchetypes ( )
slot

Definition at line 185 of file ResourcesManager.cpp.

References myArchetypes.

◆ saveArtifacts

void ResourcesManager::saveArtifacts ( )
slot

Definition at line 213 of file ResourcesManager.cpp.

References myArtifacts.

◆ saveGeneralMessages

void ResourcesManager::saveGeneralMessages ( )
slot

Definition at line 209 of file ResourcesManager.cpp.

References myGeneralMessages, and ModifiedAssetsManager< T >::saveModifiedAssets().

+ Here is the call graph for this function:

◆ saveQuests

void ResourcesManager::saveQuests ( )
slot

Definition at line 193 of file ResourcesManager.cpp.

References myQuests, and ModifiedAssetsManager< T >::saveModifiedAssets().

Referenced by CREMainWindow::onSaveQuests().

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

◆ saveTreasures

void ResourcesManager::saveTreasures ( )
slot

Definition at line 201 of file ResourcesManager.cpp.

References myTreasures.

◆ setMapInformationManager()

void ResourcesManager::setMapInformationManager ( CREMapInformationManager mapInformationManager)
inline

Definition at line 75 of file ResourcesManager.h.

References myMapInformationManager.

Referenced by CREMainWindow::CREMainWindow().

+ Here is the caller graph for this function:

◆ treasureModified

void ResourcesManager::treasureModified ( treasurelist treasure)
slot

Definition at line 197 of file ResourcesManager.cpp.

References myTreasures.

Referenced by TreasureListWrapper::wasModified().

+ Here is the caller graph for this function:

◆ wrap() [1/14]

AssetWrapper* ResourcesManager::wrap ( Animations anim,
AssetWrapper parent 
)
inline

Definition at line 115 of file ResourcesManager.h.

References animate::anim, and myWrappedAnimations.

◆ wrap() [2/14]

◆ wrap() [3/14]

AssetWrapper* ResourcesManager::wrap ( artifact art,
AssetWrapper parent 
)
inline

Definition at line 123 of file ResourcesManager.h.

References AssetWrapper::modified(), myArtifacts, and myWrappedArtifacts.

◆ wrap() [4/14]

AssetWrapper* ResourcesManager::wrap ( artifactlist al,
AssetWrapper parent 
)
inline

Definition at line 122 of file ResourcesManager.h.

References myWrappedArtifactLists.

◆ wrap() [5/14]

AssetWrapper* ResourcesManager::wrap ( Face face,
AssetWrapper parent 
)
inline

Definition at line 114 of file ResourcesManager.h.

References myWrappedFaces, and AssetWrapperManager< A, W >::wrap().

+ Here is the call graph for this function:

◆ wrap() [6/14]

AssetWrapper* ResourcesManager::wrap ( face_sets fs,
AssetWrapper parent 
)
inline

Definition at line 119 of file ResourcesManager.h.

References myWrappedFacesets, and AssetWrapperManager< A, W >::wrap().

+ Here is the call graph for this function:

◆ wrap() [7/14]

AssetWrapper* ResourcesManager::wrap ( GeneralMessage message,
AssetWrapper parent 
)
inline

Definition at line 120 of file ResourcesManager.h.

References diamondslots::message, myWrappedMessages, and AssetWrapperManager< A, W >::wrap().

+ Here is the call graph for this function:

◆ wrap() [8/14]

ObjectWrapper* ResourcesManager::wrap ( object ob,
AssetWrapper parent 
)
inline

Definition at line 113 of file ResourcesManager.h.

References myWrappedObjects, and guildjoin::ob.

◆ wrap() [9/14]

AssetWrapper* ResourcesManager::wrap ( quest_definition quest,
AssetWrapper parent 
)
inline

Definition at line 121 of file ResourcesManager.h.

References myWrappedQuests, and AssetWrapperManager< A, W >::wrap().

+ Here is the call graph for this function:

◆ wrap() [10/14]

AssetWrapper* ResourcesManager::wrap ( recipe rc,
AssetWrapper parent 
)
inline

Definition at line 129 of file ResourcesManager.h.

References myWrappedRecipes.

◆ wrap() [11/14]

AssetWrapper* ResourcesManager::wrap ( recipelist list,
AssetWrapper parent 
)
inline

Definition at line 128 of file ResourcesManager.h.

References guildoracle::list, and myWrappedRecipeLists.

◆ wrap() [12/14]

AssetWrapper* ResourcesManager::wrap ( region reg,
AssetWrapper parent 
)
inline

Definition at line 118 of file ResourcesManager.h.

References myWrappedRegions.

◆ wrap() [13/14]

AssetWrapper* ResourcesManager::wrap ( treasure tr,
AssetWrapper parent 
)
inline

Definition at line 117 of file ResourcesManager.h.

References myWrappedTreasures.

◆ wrap() [14/14]

AssetWrapper* ResourcesManager::wrap ( treasurelist tr,
AssetWrapper parent 
)
inline

Definition at line 116 of file ResourcesManager.h.

References myWrappedTreasureLists.

Field Documentation

◆ myArchetypes

ModifiedAssetsManager<archetype> ResourcesManager::myArchetypes
protected

◆ myArtifacts

ModifiedAssetsManager<artifact> ResourcesManager::myArtifacts
protected

Definition at line 152 of file ResourcesManager.h.

Referenced by assetDefined(), hasPendingChanges(), saveArtifacts(), and wrap().

◆ myGeneralMessages

ModifiedAssetsManager<GeneralMessage> ResourcesManager::myGeneralMessages
protected

◆ myLicenseManager

LicenseManager ResourcesManager::myLicenseManager
protected

Definition at line 167 of file ResourcesManager.h.

Referenced by licenseManager(), and load().

◆ myMapInformationManager

CREMapInformationManager* ResourcesManager::myMapInformationManager
protected

Definition at line 146 of file ResourcesManager.h.

Referenced by getMapInformationManager(), and setMapInformationManager().

◆ myQuests

ModifiedAssetsManager<quest_definition> ResourcesManager::myQuests
protected

◆ myRecipes

QList<QHash<QString, recipestruct*> > ResourcesManager::myRecipes
protected

Definition at line 147 of file ResourcesManager.h.

Referenced by getRecipe(), load(), recipeMaxIngredients(), and recipes().

◆ myTreasures

ModifiedAssetsManager<treasurelist> ResourcesManager::myTreasures
protected

◆ myWrappedAnimations

AssetWrapperManager<Animations, AnimationWrapper> ResourcesManager::myWrappedAnimations
protected

Definition at line 156 of file ResourcesManager.h.

Referenced by wrap().

◆ myWrappedArchetypes

AssetWrapperManager<archt, ArchetypeWrapper> ResourcesManager::myWrappedArchetypes
protected

Definition at line 153 of file ResourcesManager.h.

Referenced by wrap().

◆ myWrappedArtifactLists

AssetWrapperManager<artifactlist, ArtifactListWrapper> ResourcesManager::myWrappedArtifactLists
protected

Definition at line 163 of file ResourcesManager.h.

Referenced by wrap().

◆ myWrappedArtifacts

AssetWrapperManager<artifact, ArtifactWrapper> ResourcesManager::myWrappedArtifacts
protected

Definition at line 164 of file ResourcesManager.h.

Referenced by wrap().

◆ myWrappedFaces

AssetWrapperManager<Face, FaceWrapper> ResourcesManager::myWrappedFaces
protected

Definition at line 155 of file ResourcesManager.h.

Referenced by wrap().

◆ myWrappedFacesets

AssetWrapperManager<face_sets, FacesetsWrapper> ResourcesManager::myWrappedFacesets
protected

Definition at line 160 of file ResourcesManager.h.

Referenced by wrap().

◆ myWrappedMessages

AssetWrapperManager<GeneralMessage, GeneralMessageWrapper> ResourcesManager::myWrappedMessages
protected

Definition at line 161 of file ResourcesManager.h.

Referenced by wrap().

◆ myWrappedObjects

AssetWrapperManager<object, ObjectWrapper> ResourcesManager::myWrappedObjects
protected

Definition at line 154 of file ResourcesManager.h.

Referenced by wrap().

◆ myWrappedQuests

AssetWrapperManager<quest_definition, QuestWrapper> ResourcesManager::myWrappedQuests
protected

Definition at line 162 of file ResourcesManager.h.

Referenced by wrap().

◆ myWrappedRecipeLists

AssetWrapperManager<recipelist, RecipeListWrapper> ResourcesManager::myWrappedRecipeLists
protected

Definition at line 165 of file ResourcesManager.h.

Referenced by wrap().

◆ myWrappedRecipes

AssetWrapperManager<recipe, RecipeWrapper> ResourcesManager::myWrappedRecipes
protected

Definition at line 166 of file ResourcesManager.h.

Referenced by wrap().

◆ myWrappedRegions

AssetWrapperManager<region, RegionWrapper> ResourcesManager::myWrappedRegions
protected

Definition at line 159 of file ResourcesManager.h.

Referenced by wrap().

◆ myWrappedTreasureLists

AssetWrapperManager<treasurelist, TreasureListWrapper> ResourcesManager::myWrappedTreasureLists
protected

Definition at line 157 of file ResourcesManager.h.

Referenced by wrap().

◆ myWrappedTreasures

AssetWrapperManager<treasure, TreasureWrapper> ResourcesManager::myWrappedTreasures
protected

Definition at line 158 of file ResourcesManager.h.

Referenced by remove(), and wrap().


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