-/*
- * Loader.h
- *
- * Created on: Sep 13, 2012
- * Author: holy
- */
-
#ifndef LOADER_LOADER_H_
#define LOADER_LOADER_H_
#include "ObjectFile.h"
#include "TypeDescription.h"
-namespace loader {
-
#include <map>
#include <string>
-#include <vector>
+#include <SDL.h>
+
+namespace loader {
class Loader {
void Load(const std::string &file);
private:
- void LoadHeader(LoadedObjectFile &);
- void LoadExports(LoadedObjectFile &);
- void LinkExternals(LoadedObjectFile &);
- void LoadImages(LoadedObjectFile &);
- void LinkObjects(LoadedObjectFile &);
- void LinkObject(LoadedObjectFile &, const TypeDescription &, char *object);
+ void LoadExports(char *src, Export *begin, Export *end);
+ void LoadExternals(char *src, External *begin, External *end);
+ void LoadObjects(char *src, Object *begin, Object *end);
+ void LoadObject(char *src, char *dest, const TypeDescription &);
private:
- std::map<std::string, LoadedObjectFile> objectFiles;
+ std::map<std::string, char *> objectFiles;
std::map<std::string, LoadedExport> exports;
};
}
-#endif /* LOADER_LOADER_H_ */
+#endif