| OGRE 1.11.1 Object-Oriented Graphics Rendering Engine

Public Types | Public Member Functions | Static Public Member Functions | List of all members
Ogre::ArchiveManager Class Reference
Core » Resources

This class manages the available ArchiveFactory plugins. More...

`#include <OgreArchiveManager.h>`

Inheritance diagram for Ogre::ArchiveManager:
[legend]

## Public Types
typedef MapIterator< ArchiveMap > | ArchiveMapIterator

## Public Member Functions
| ArchiveManager ()
| Default constructor - should never get called by a client app. More...
virtual | ~ArchiveManager ()
| Default destructor. More...
void | addArchiveFactory (ArchiveFactory *factory)
| Adds a new ArchiveFactory to the list of available factories. More...
ArchiveMapIterator | getArchiveIterator (void)
| Get an iterator over the Archives in this Manager. More...
Archive * | load (const String &filename, const String &archiveType, bool readOnly)
| Opens an archive for file reading. More...
void | unload (Archive *arch)
| Unloads an archive. More...
void | unload (const String &filename)
| Unloads an archive by name. More...

## Static Public Member Functions
static ArchiveManager & | getSingleton (void)
| Get the singleton instance. More...
static ArchiveManager * | getSingletonPtr (void)
| Get the singleton instance. More...

## Detailed Description

This class manages the available ArchiveFactory plugins.

## Member Typedef Documentation

## ◆ ArchiveMapIterator

typedef MapIterator<ArchiveMap> Ogre::ArchiveManager::ArchiveMapIterator

## Constructor & Destructor Documentation

## ◆ ArchiveManager()

Ogre::ArchiveManager::ArchiveManager | ( |  | ) |

Default constructor - should never get called by a client app.

## ◆ ~ArchiveManager()

virtual Ogre::ArchiveManager::~ArchiveManager | ( |  | ) |
| virtual

Default destructor.

## Member Function Documentation

## ◆ load()

Archive* Ogre::ArchiveManager::load | ( | const String & | filename,
|  | const String & | archiveType,
|  | bool | readOnly
| ) |  |

Opens an archive for file reading.

Remarks
  The archives are created using class factories within extension libraries.

Parameters

  filename | The filename that will be opened
  archiveType | The type of archive that this is. For example: "Zip".
  readOnly | Whether the Archive is read only

Returns
  If the function succeeds, a valid pointer to an Archive object is returned.

  If the function fails, an exception is thrown.

## ◆ unload() [1/2]

void Ogre::ArchiveManager::unload | ( | Archive * | arch | ) |

Unloads an archive.

Remarks
  You must ensure that this archive is not being used before removing it.

## ◆ unload() [2/2]

void Ogre::ArchiveManager::unload | ( | const String & | filename | ) |

Unloads an archive by name.

Remarks
  You must ensure that this archive is not being used before removing it.

## ◆ getArchiveIterator()

ArchiveMapIterator Ogre::ArchiveManager::getArchiveIterator | ( | void |  | ) |

Get an iterator over the Archives in this Manager.

## ◆ addArchiveFactory()

void Ogre::ArchiveManager::addArchiveFactory | ( | ArchiveFactory * | factory | ) |

Adds a new ArchiveFactory to the list of available factories.

Remarks
  Plugin developers who add new archive codecs need to call this after defining their ArchiveFactory subclass and Archive subclasses for their archive type.

## ◆ getSingleton()

static ArchiveManager& Ogre::ArchiveManager::getSingleton | ( | void |  | ) |
| static

Get the singleton instance.

## ◆ getSingletonPtr()

static ArchiveManager* Ogre::ArchiveManager::getSingletonPtr | ( | void |  | ) |
| static

Get the singleton instance.

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

- OgreArchiveManager.h