Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Functions
ManagedData.h File Reference

The interface for handling resources from a disk system. More...

#include "CoreConfig.h"
#include <map>
#include <string>

Go to the source code of this file.

Classes

class  Menge::ManagedData
 The interface for managed data (essentially smart poitners). More...
 
class  Menge::ManagedDataWrapper< TData >
 A wrapper for managed data - automatically handles referencing and deletion of managed data. More...
 

Namespaces

 Menge
 The core namespace. All elements of Menge are contained in this namespace.
 

Functions

template<typename TData >
TData * Menge::getResource (const std::string &name, std::map< std::string, TData * > &map)
 Templated function for acquiring a managed data resource from its name. More...
 
template<typename T , typename TData >
T * Menge::loadManagedData (const std::string &fileName, TData *(*reader)(const std::string &))
 Templated function for loading a managed data resource. More...
 
template<typename TData >
void Menge::removeResource (TData *data, std::map< std::string, TData * > &map)
 Tempalted function for removing a resource from the managed databse. More...
 

Detailed Description

The interface for handling resources from a disk system.

ManagedData are heavy-weight on-disk resources. They are managed in the sense that they are only read from the disk once and stored in memory as a single instance. If multiple entities need the same on-disk resource, they share the underlying data in opaque containers.