ManaPlus
Namespaces | Functions | Variables
resourcemanager.cpp File Reference

(986a3bf)

#include "resources/resourcemanager/resourcemanager.h"
#include "resources/image/image.h"
#include "resources/imageset.h"
#include "resources/memorymanager.h"
#include "resources/sprite/spritedef.h"
#include "utils/cast.h"
#include "utils/checkutils.h"
#include "utils/foreach.h"
#include "utils/stringutils.h"
#include "resources/resourcetypes.h"
#include <sstream>
#include <sys/time.h>
#include "debug.h"

Go to the source code of this file.

Namespaces

 ResourceManager
 

Functions

void ResourceManager::deleteResourceManager ()
 
void ResourceManager::cleanUp (Resource *const res)
 
void ResourceManager::cleanProtected ()
 
bool ResourceManager::cleanOrphans (const bool always)
 
void ResourceManager::logResource (const Resource *const res)
 
void ResourceManager::logResources (const std::string &msg)
 
void ResourceManager::clearDeleted (const bool full)
 
bool ResourceManager::addResource (const std::string &idPath, Resource *const resource)
 
ResourceResourceManager::getFromCache (const std::string &filename, const int variant)
 
bool ResourceManager::isInCache (const std::string &idPath)
 
ResourceResourceManager::getTempResource (const std::string &idPath)
 
ResourceResourceManager::getFromCache (const std::string &idPath)
 
ResourceResourceManager::get (const std::string &idPath, generator fun, const void *const data)
 
void ResourceManager::release (Resource *const res)
 
void ResourceManager::moveToDeleted (Resource *const res)
 
void ResourceManager::decRefDelete (Resource *const res)
 
void ResourceManager::deleteInstance ()
 
void ResourceManager::scheduleDelete (SDL_Surface *const surface)
 
void ResourceManager::clearScheduled ()
 
void ResourceManager::clearCache ()
 
int ResourceManager::calcMemoryLocal ()
 
int ResourceManager::calcMemoryChilds (const int level)
 
int ResourceManager::calcMemory (const int level)
 
int ResourceManager::size ()
 

Variables

std::set< SDL_Surface * > ResourceManager::deletedSurfaces
 
Resources ResourceManager::mResources
 
Resources ResourceManager::mOrphanedResources
 
std::set< Resource * > ResourceManager::mDeletedResources
 
time_t ResourceManager::mOldestOrphan = 0
 
bool ResourceManager::mDestruction = false