Ocular Engine
MultiResource.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_RESOURCES_MULTI_RESOURCE__H__
19 #define __H__OCULAR_RESOURCES_MULTI_RESOURCE__H__
20 
21 #include "Resource.hpp"
22 #include <unordered_map>
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Core
37  {
55  class MultiResource : public Resource
56  {
57  public:
58 
59  MultiResource();
60  virtual ~MultiResource();
61 
62  //------------------------------------------------------------
63 
67  virtual void addSubResource(Resource* resource, std::string const& name);
68 
72  virtual Resource* getSubResource(std::string const& name);
73 
77  virtual void getSubResourceNames(std::vector<std::string>& names);
78 
82  virtual void getSubResources(std::vector<Resource*>& resources);
83 
87  virtual uint32_t getNumSubResources() const;
88 
89  protected:
90 
91  std::unordered_map<std::string, Resource*> m_SubResources;
92 
93  private:
94  };
95  }
99 }
104 //------------------------------------------------------------------------------------------
105 
106 #endif
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: MultiResource.hpp:55
Definition: Resource.hpp:46