Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MeshManager.h
Go to the documentation of this file.
1 /* Copyright (C) 2009 Wildfire Games.
2  * This file is part of 0 A.D.
3  *
4  * 0 A.D. is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * 0 A.D. is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef INCLUDED_MESHMANAGER
19 #define INCLUDED_MESHMANAGER
20 
21 #include "lib/file/vfs/vfs_path.h"
22 
23 #include <boost/shared_ptr.hpp>
24 #include <boost/unordered_map.hpp>
25 #include <boost/weak_ptr.hpp>
26 
27 class CModelDef;
28 typedef boost::shared_ptr<CModelDef> CModelDefPtr;
29 
30 class CColladaManager;
31 
33 {
35 public:
36  CMeshManager(CColladaManager& colladaManager);
37  ~CMeshManager();
38 
39  CModelDefPtr GetMesh(const VfsPath& pathname);
40 
41 private:
42  typedef boost::unordered_map<VfsPath, boost::weak_ptr<CModelDef> > mesh_map;
45 };
46 
47 #endif
CColladaManager & m_ColladaManager
Definition: MeshManager.h:44
CMeshManager(CColladaManager &colladaManager)
Definition: MeshManager.cpp:32
Definition: path.h:75
NONCOPYABLE(CMeshManager)
boost::unordered_map< VfsPath, boost::weak_ptr< CModelDef > > mesh_map
Definition: MeshManager.h:42
CModelDefPtr GetMesh(const VfsPath &pathname)
Definition: MeshManager.cpp:41
mesh_map m_MeshMap
Definition: MeshManager.h:43
boost::shared_ptr< CModelDef > CModelDefPtr
Definition: MeshManager.h:27