resources.h
Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 #ifndef _WX_OGRE_RESOURCES_H_ 
00021 #define _WX_OGRE_RESOURCES_H_ 
00022 
00023 #include <Ogre.h>
00024 
00025 #include "wx/ogre/utils.h"
00026 
00031 class wxOgreResources : public Ogre::Singleton<wxOgreResources> 
00032 {
00033 
00034 #define DEFAULT_GROUP Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME
00035 
00036 public:
00037 
00038     wxOgreResources();
00039 
00041     void InitialiseAllResources();
00042 
00044     void AddResource(const Ogre::String& path,
00045                      const Ogre::String& type = "FileSystem",
00046                      const Ogre::String& group = DEFAULT_GROUP);
00047 
00052     bool LoadResourceFile(const Ogre::String& file);
00053 
00055     Ogre::StringVectorPtr GetResourcesList(const Ogre::String& group,
00056                                            const Ogre::String& pattern);
00057 
00059     Ogre::StringVectorPtr GetResourcesList(const Ogre::String& group);
00060 
00062     Ogre::StringVector GetResourcesGroups();
00063 
00064 private:
00065 
00066     Ogre::ResourceGroupManager* m_rmgr;
00067 
00068     DECLARE_OGRE_SINGLETON(wxOgreResources)
00069 };
00070 
00071 #endif