]> git.localhorst.tv Git - l2e.git/blob - src/loader/Loader.h
cf7dd132a3e76b60c44464cb44aff5a0af82a6fd
[l2e.git] / src / loader / Loader.h
1 #ifndef LOADER_LOADER_H_
2 #define LOADER_LOADER_H_
3
4 #include "ObjectFile.h"
5 #include "TypeDescription.h"
6
7 #include <map>
8 #include <string>
9 #include <SDL.h>
10
11 namespace loader {
12
13 class Loader {
14
15 public:
16         Loader() { }
17         ~Loader();
18
19 public:
20         void Load(const std::string &file);
21
22 private:
23         void LoadExports(char *src, Export *begin, Export *end);
24         void LoadExternals(char *src, External *begin, External *end);
25         void LoadObjects(char *src, Object *begin, Object *end);
26         void LoadObject(char *src, char *dest, const TypeDescription &);
27
28 private:
29         std::map<std::string, char *> objectFiles;
30         std::map<std::string, LoadedExport> exports;
31
32 };
33
34 }
35 #endif