]> git.localhorst.tv Git - l2e.git/blob - src/loader/Loader.h
activated the loader
[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         const std::map<std::string, LoadedExport> &Exports() const { return exports; }
23
24 private:
25         void LoadExports(char *src, Export *begin, Export *end);
26         void LoadExternals(char *src, External *begin, External *end);
27         void LoadObjects(char *src, Object *begin, Object *end);
28         void LoadObject(char *src, char *dest, const TypeDescription &);
29         void LoadArrays(char *src, Array *begin, Array *end);
30
31 private:
32         std::map<std::string, char *> objectFiles;
33         std::map<std::string, LoadedExport> exports;
34
35 };
36
37 }
38 #endif