OgreArchiveManager.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef _ArchiveManager_H__
#define _ArchiveManager_H__
#include "OgrePrerequisites.h"
#include "OgreResourceManager.h"
#include "OgreSingleton.h"
#include "OgreHeaderPrefix.h"
namespace Ogre {
class _OgreExport ArchiveManager : public Singleton<ArchiveManager>, public ArchiveAlloc
{
protected:
typedef map<String, ArchiveFactory*>::type ArchiveFactoryMap;
ArchiveFactoryMap mArchFactories;
typedef map<String, Archive*>::type ArchiveMap;
ArchiveMap mArchives;
public:
ArchiveManager();
virtual ~ArchiveManager();
Archive* load( const String& filename, const String& archiveType, bool readOnly);
void unload(Archive* arch);
void unload(const String& filename);
typedef MapIterator<ArchiveMap> ArchiveMapIterator;
ArchiveMapIterator getArchiveIterator(void);
void addArchiveFactory(ArchiveFactory* factory);
static ArchiveManager& getSingleton(void);
static ArchiveManager* getSingletonPtr(void);
};
}
#include "OgreHeaderSuffix.h"
#endif
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::MapIterator
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
Definition: OgreIteratorWrapper.h:319
OgreSingleton.h
OgrePrerequisites.h
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
OgreResourceManager.h
Ogre::ArchiveManager::mArchives
ArchiveMap mArchives
Definition: OgreArchiveManager.h:55
Ogre::ArchiveFactory
Abstract factory class, archive codec plugins can register concrete subclasses of this...
Definition: OgreArchiveFactory.h:59
OgreHeaderSuffix.h
Ogre::ArchiveManager
This class manages the available ArchiveFactory plugins.
Definition: OgreArchiveManager.h:47
Ogre::ArchiveManager::mArchFactories
ArchiveFactoryMap mArchFactories
Factories available to create archives, indexed by archive type (String identifier e...
Definition: OgreArchiveManager.h:52
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::ArchiveManager::ArchiveMapIterator
MapIterator< ArchiveMap > ArchiveMapIterator
Definition: OgreArchiveManager.h:91
OgreHeaderPrefix.h
Ogre::Singleton
Template class for creating single-instance global classes.
Definition: OgreSingleton.h:64
Ogre::Archive
Archive-handling class.
Definition: OgreArchive.h:88
Ogre::map
Definition: OgrePrerequisites.h:533
Ogre::ArchiveManager::ArchiveFactoryMap
map< String, ArchiveFactory * >::type ArchiveFactoryMap
Definition: OgreArchiveManager.h:50
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:58
Ogre::ArchiveManager::ArchiveMap
map< String, Archive * >::type ArchiveMap
Currently loaded archives.
Definition: OgreArchiveManager.h:54

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.