Annwvyn::AnnResourceManager Class Reference

Annwvyn interface class with Ogre's ResourceGroupManager. More...

#include <AnnResourceManager.hpp>

Inheritance diagram for Annwvyn::AnnResourceManager:
Collaboration diagram for Annwvyn::AnnResourceManager:

Public Member Functions

 AnnResourceManager ()
 
void addZipLocation (const std::string &path, const std::string &resourceGroupName=getDefaultResourceGroupName()) const
 
void addFileLocation (const std::string &path, const std::string &resourceGroupName=getDefaultResourceGroupName()) const
 
void loadReseourceFile (const std::string &path) const
 Load resource.cfg like file. More...
 
void initResources () const
 InitAllResources. More...
 
void loadGroup (const std::string &groupName) const
 Load in memory the content of the specified group. More...
 
- Public Member Functions inherited from Annwvyn::AnnSubSystem
 AnnSubSystem (const std::string &systemName)
 Construct a SubSystem. More...
 
virtual ~AnnSubSystem ()
 Destruct a SubSystem. More...
 

Static Public Member Functions

static const char * getDefaultResourceGroupName ()
 Return the default resource group name. More...
 
static const char * getReservedResourceGroupName ()
 Return the reserved resource group name. More...
 

Private Member Functions

void addDefaultResourceLocation () const
 Add to the default resource group "FileSystem=media" and "Zip=media/CORE.zip". More...
 

Static Private Member Functions

static void refuseResource (const std::string &name, const std::string &group)
 Log the fact that resource location creation as been rejected. More...
 

Private Attributes

Ogre::ResourceGroupManager * ResourceGroupManager
 Pointer to the resource group manager. We cache the address to prevent calling a static method all the time. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Annwvyn::AnnSubSystem
virtual void update ()
 To be called by AnnEngine : update the subsystem for the next frame. More...
 
virtual bool needUpdate ()
 To be called by AnnEngine : Return if the subsystem wants to be updated. More...
 
- Protected Attributes inherited from Annwvyn::AnnSubSystem
std::string name
 Name of the subsystem. More...
 

Detailed Description

Annwvyn interface class with Ogre's ResourceGroupManager.

Definition at line 10 of file AnnResourceManager.hpp.

Constructor & Destructor Documentation

◆ AnnResourceManager()

AnnResourceManager::AnnResourceManager ( )

Definition at line 10 of file AnnResourceManager.cpp.

Member Function Documentation

◆ addDefaultResourceLocation()

void AnnResourceManager::addDefaultResourceLocation ( ) const
private

Add to the default resource group "FileSystem=media" and "Zip=media/CORE.zip".

Definition at line 34 of file AnnResourceManager.cpp.

Here is the call graph for this function:

◆ addFileLocation()

void AnnResourceManager::addFileLocation ( const std::string path,
const std::string resourceGroupName = getDefaultResourceGroupName() 
) const

Give a directory resource location to the Ogre Resource Group Manager

Parameters
pathThe path to the directory
resourceGroupNamename of the resource group

Definition at line 26 of file AnnResourceManager.cpp.

Here is the call graph for this function:

◆ addZipLocation()

void AnnResourceManager::addZipLocation ( const std::string path,
const std::string resourceGroupName = getDefaultResourceGroupName() 
) const

Give a zipped archive resource location to the Ogre Resource Group Manager

Parameters
pathThe path to a zip file.
resourceGroupNamename of the resource group where the content will be added

Definition at line 18 of file AnnResourceManager.cpp.

Here is the call graph for this function:

◆ getDefaultResourceGroupName()

const char * AnnResourceManager::getDefaultResourceGroupName ( )
static

Return the default resource group name.

Definition at line 82 of file AnnResourceManager.cpp.

Here is the caller graph for this function:

◆ getReservedResourceGroupName()

const char * AnnResourceManager::getReservedResourceGroupName ( )
static

Return the reserved resource group name.

Definition at line 87 of file AnnResourceManager.cpp.

Here is the caller graph for this function:

◆ initResources()

void AnnResourceManager::initResources ( ) const

InitAllResources.

Definition at line 69 of file AnnResourceManager.cpp.

◆ loadGroup()

void AnnResourceManager::loadGroup ( const std::string groupName) const

Load in memory the content of the specified group.

Definition at line 76 of file AnnResourceManager.cpp.

◆ loadReseourceFile()

void AnnResourceManager::loadReseourceFile ( const std::string path) const

Load resource.cfg like file.

Definition at line 42 of file AnnResourceManager.cpp.

Here is the call graph for this function:

◆ refuseResource()

void AnnResourceManager::refuseResource ( const std::string name,
const std::string group 
)
staticprivate

Log the fact that resource location creation as been rejected.

Definition at line 92 of file AnnResourceManager.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ ResourceGroupManager

Ogre::ResourceGroupManager* Annwvyn::AnnResourceManager::ResourceGroupManager
private

Pointer to the resource group manager. We cache the address to prevent calling a static method all the time.

Definition at line 47 of file AnnResourceManager.hpp.


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