[657] | 1 | /*
|
---|
| 2 | -----------------------------------------------------------------------------
|
---|
| 3 | This source file is part of OGRE
|
---|
| 4 | (Object-oriented Graphics Rendering Engine)
|
---|
| 5 | For the latest info, see http://www.ogre3d.org/
|
---|
| 6 |
|
---|
| 7 | Copyright (c) 2000-2005 The OGRE Team
|
---|
| 8 | Also see acknowledgements in Readme.html
|
---|
| 9 |
|
---|
| 10 | This program is free software; you can redistribute it and/or modify it under
|
---|
| 11 | the terms of the GNU Lesser General Public License as published by the Free Software
|
---|
| 12 | Foundation; either version 2 of the License, or (at your option) any later
|
---|
| 13 | version.
|
---|
| 14 |
|
---|
| 15 | This program is distributed in the hope that it will be useful, but WITHOUT
|
---|
| 16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
---|
| 17 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
---|
| 18 |
|
---|
| 19 | You should have received a copy of the GNU Lesser General Public License along with
|
---|
| 20 | this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
---|
| 21 | Place - Suite 330, Boston, MA 02111-1307, USA, or go to
|
---|
| 22 | http://www.gnu.org/copyleft/lesser.txt.
|
---|
| 23 | -----------------------------------------------------------------------------
|
---|
| 24 | */
|
---|
| 25 | #ifndef __SkeletonManager_H__
|
---|
| 26 | #define __SkeletonManager_H__
|
---|
| 27 |
|
---|
| 28 | #include "OgrePrerequisites.h"
|
---|
| 29 |
|
---|
| 30 | #include "OgreResourceManager.h"
|
---|
| 31 | #include "OgreSingleton.h"
|
---|
| 32 |
|
---|
| 33 | namespace Ogre {
|
---|
| 34 |
|
---|
| 35 | /** Handles the management of skeleton resources.
|
---|
| 36 | @remarks
|
---|
| 37 | This class deals with the runtime management of
|
---|
| 38 | skeleton data; like other resource managers it handles
|
---|
| 39 | the creation of resources (in this case skeleton data),
|
---|
| 40 | working within a fixed memory budget.
|
---|
| 41 | */
|
---|
| 42 | class _OgreExport SkeletonManager: public ResourceManager, public Singleton<SkeletonManager>
|
---|
| 43 | {
|
---|
| 44 | public:
|
---|
| 45 | /// Constructor
|
---|
| 46 | SkeletonManager();
|
---|
| 47 | ~SkeletonManager();
|
---|
| 48 |
|
---|
| 49 | /** Override standard Singleton retrieval.
|
---|
| 50 | @remarks
|
---|
| 51 | Why do we do this? Well, it's because the Singleton
|
---|
| 52 | implementation is in a .h file, which means it gets compiled
|
---|
| 53 | into anybody who includes it. This is needed for the
|
---|
| 54 | Singleton template to work, but we actually only want it
|
---|
| 55 | compiled into the implementation of the class based on the
|
---|
| 56 | Singleton, not all of them. If we don't change this, we get
|
---|
| 57 | link errors when trying to use the Singleton-based class from
|
---|
| 58 | an outside dll.
|
---|
| 59 | @par
|
---|
| 60 | This method just delegates to the template version anyway,
|
---|
| 61 | but the implementation stays in this single compilation unit,
|
---|
| 62 | preventing link errors.
|
---|
| 63 | */
|
---|
| 64 | static SkeletonManager& getSingleton(void);
|
---|
| 65 | /** Override standard Singleton retrieval.
|
---|
| 66 | @remarks
|
---|
| 67 | Why do we do this? Well, it's because the Singleton
|
---|
| 68 | implementation is in a .h file, which means it gets compiled
|
---|
| 69 | into anybody who includes it. This is needed for the
|
---|
| 70 | Singleton template to work, but we actually only want it
|
---|
| 71 | compiled into the implementation of the class based on the
|
---|
| 72 | Singleton, not all of them. If we don't change this, we get
|
---|
| 73 | link errors when trying to use the Singleton-based class from
|
---|
| 74 | an outside dll.
|
---|
| 75 | @par
|
---|
| 76 | This method just delegates to the template version anyway,
|
---|
| 77 | but the implementation stays in this single compilation unit,
|
---|
| 78 | preventing link errors.
|
---|
| 79 | */
|
---|
| 80 | static SkeletonManager* getSingletonPtr(void);
|
---|
| 81 | protected:
|
---|
| 82 |
|
---|
| 83 | /// @copydoc ResourceManager::createImpl
|
---|
| 84 | Resource* createImpl(const String& name, ResourceHandle handle,
|
---|
| 85 | const String& group, bool isManual, ManualResourceLoader* loader,
|
---|
| 86 | const NameValuePairList* createParams);
|
---|
| 87 |
|
---|
| 88 | };
|
---|
| 89 |
|
---|
| 90 |
|
---|
| 91 | }
|
---|
| 92 |
|
---|
| 93 |
|
---|
| 94 | #endif
|
---|