xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Graphics::Mesh::MeshManager Class Reference

The mesh manager. More...

#include <meshman.h>

Inheritance diagram for Graphics::Mesh::MeshManager:
Inheritance graph
[legend]
Collaboration diagram for Graphics::Mesh::MeshManager:
Collaboration graph
[legend]

Public Member Functions

 MeshManager ()
 
 ~MeshManager ()
 
void init ()
 Initialise mesh management, including default mesh creation. More...
 
void deinit ()
 Deinitialise mesh management subsystem. More...
 
void cleanup ()
 Remove any resource that has a usage count of zero. More...
 
void addMesh (Mesh *mesh)
 Adds a mesh to be managed. More...
 
void delMesh (Mesh *mesh)
 Forcibly remove the mesh from the map. More...
 
MeshgetMesh (const Common::UString &name)
 Returns a mesh with the given name, or zero if it does not exist. More...
 

Private Member Functions

std::map< Common::UString, Mesh * >::iterator delResource (std::map< Common::UString, Mesh *>::iterator iter)
 

Private Attributes

std::map< Common::UString, Mesh * > _resourceMap
 

Additional Inherited Members

- Static Public Member Functions inherited from Common::Singleton< MeshManager >
static MeshManager & instance ()
 
static void destroy ()
 
- Protected Types inherited from Common::Singleton< MeshManager >
typedef MeshManager SingletonBaseType
 
- Protected Member Functions inherited from Common::Singleton< MeshManager >
 Singleton ()
 
virtual ~Singleton ()
 

Detailed Description

The mesh manager.

Definition at line 41 of file meshman.h.

Constructor & Destructor Documentation

◆ MeshManager()

Graphics::Mesh::MeshManager::MeshManager ( )

Definition at line 39 of file meshman.cpp.

◆ ~MeshManager()

Graphics::Mesh::MeshManager::~MeshManager ( )

Definition at line 42 of file meshman.cpp.

References deinit().

Here is the call graph for this function:

Member Function Documentation

◆ addMesh()

void Graphics::Mesh::MeshManager::addMesh ( Mesh mesh)

Adds a mesh to be managed.

Cleanup will delete the mesh if usage count is zero.

Definition at line 84 of file meshman.cpp.

References _resourceMap.

◆ cleanup()

void Graphics::Mesh::MeshManager::cleanup ( )

Remove any resource that has a usage count of zero.

Definition at line 72 of file meshman.cpp.

References _resourceMap, and delResource().

Here is the call graph for this function:

◆ deinit()

void Graphics::Mesh::MeshManager::deinit ( )

Deinitialise mesh management subsystem.

Definition at line 65 of file meshman.cpp.

References _resourceMap.

Referenced by ~MeshManager().

Here is the caller graph for this function:

◆ delMesh()

void Graphics::Mesh::MeshManager::delMesh ( Mesh mesh)

Forcibly remove the mesh from the map.

Consider using cleanup instead.

Definition at line 95 of file meshman.cpp.

References _resourceMap, and delResource().

Here is the call graph for this function:

◆ delResource()

std::map< Common::UString, Mesh * >::iterator Graphics::Mesh::MeshManager::delResource ( std::map< Common::UString, Mesh *>::iterator  iter)
private

Definition at line 115 of file meshman.cpp.

References _resourceMap.

Referenced by cleanup(), and delMesh().

Here is the caller graph for this function:

◆ getMesh()

Mesh * Graphics::Mesh::MeshManager::getMesh ( const Common::UString name)

Returns a mesh with the given name, or zero if it does not exist.

Definition at line 106 of file meshman.cpp.

References _resourceMap.

◆ init()

void Graphics::Mesh::MeshManager::init ( )

Initialise mesh management, including default mesh creation.

Definition at line 46 of file meshman.cpp.

References _resourceMap, Graphics::Mesh::Mesh::getName(), Graphics::Mesh::Mesh::init(), Graphics::Mesh::Mesh::setName(), and status().

Here is the call graph for this function:

Member Data Documentation

◆ _resourceMap

std::map<Common::UString, Mesh *> Graphics::Mesh::MeshManager::_resourceMap
private

Definition at line 64 of file meshman.h.

Referenced by addMesh(), cleanup(), deinit(), delMesh(), delResource(), getMesh(), and init().


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