Ocular Engine
ResourceLoader.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_RESOURCES_RESOURCE_LOADER__H__
19 #define __H__OCULAR_RESOURCES_RESOURCE_LOADER__H__
20 
21 #include "Resource.hpp"
22 #include <string>
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Core
37  {
56  {
57  public:
58 
59  AResourceLoader(std::string const& extension, ResourceType type);
60  virtual ~AResourceLoader();
61 
65  virtual std::string getSupportedFileType() const;
66 
72  virtual bool loadResource(Resource* &resource, File const& file, std::string const& mappingName);
73 
79  virtual bool loadSubResource(Resource* &resource, File const& file, std::string const& mappingName);
80 
89  virtual bool exploreResource(File const& file);
90 
94  ResourceType getResourceType() const;
95 
96  protected:
97 
108  bool isFileValid(Core::File const& file) const;
109 
110  //------------------------------------------------------------
111 
112  std::string m_SupportedExtension;
113 
114  ResourceType m_Type;
115 
116  private:
117  };
118  }
122 }
127 //------------------------------------------------------------------------------------------
128 
129 #endif
virtual bool loadResource(Resource *&resource, File const &file, std::string const &mappingName)
Definition: ResourceLoader.cpp:53
bool isFileValid(Core::File const &file) const
Definition: ResourceLoader.cpp:77
virtual bool loadSubResource(Resource *&resource, File const &file, std::string const &mappingName)
Definition: ResourceLoader.cpp:58
Definition: ResourceLoader.hpp:55
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
virtual bool exploreResource(File const &file)
Definition: ResourceLoader.cpp:63
Definition: File.hpp:41
ResourceType getResourceType() const
Definition: ResourceLoader.cpp:68
virtual std::string getSupportedFileType() const
Definition: ResourceLoader.cpp:48
Definition: Resource.hpp:46