Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __BARRY_A_OSLOADER_H__
00024 #define __BARRY_A_OSLOADER_H__
00025
00026 #include <iostream>
00027 #include <vector>
00028 #include <map>
00029
00030 #include "dll.h"
00031 #include "a_application.h"
00032 #include "a_library.h"
00033 #include <tr1/memory>
00034
00035
00036 #define OS_LANG_ENGLISH ""
00037 #define OS_LANG_ARABIC "0x0001"
00038 #define OS_LANG_CATALAN "0x0003"
00039 #define OS_LANG_CZECH "0x0005"
00040 #define OS_LANG_GERMAN "0x0007"
00041 #define OS_LANG_SPANISH "0x000a"
00042 #define OS_LANG_FRENCH "0x000c"
00043 #define OS_LANG_HEBREW "0x000d"
00044 #define OS_LANG_HUNGARIAN "0x000e"
00045 #define OS_LANG_ITALIAN "0x0010"
00046 #define OS_LANG_JAPANESE "0x0011"
00047 #define OS_LANG_KOREAN "0x0012"
00048
00049
00050 namespace Barry {
00051
00052 namespace ALX {
00053
00054 class BXEXPORT OSLoader
00055 {
00056 public:
00057 typedef std::tr1::shared_ptr<CODSection> CODSectionPtr;
00058 typedef std::vector<CODSectionPtr> CODSectionList;
00059 typedef std::map<std::string, std::string> PropertyMap;
00060
00061 private:
00062 std::string sfifile;
00063 CODSectionList applications;
00064 CODSectionList libraries;
00065 PropertyMap properties;
00066
00067 public:
00068 OSLoader(void);
00069 ~OSLoader(void);
00070
00071 void Load(const std::string& path);
00072
00073
00074 void LoadALXFile(const std::string& alxfile, const bool enable=true);
00075
00076 void Dump(std::ostream &os) const;
00077
00078 void AddProperties(const std::string& property, const std::string& value);
00079 void AddProperties(const xmlpp::SaxParser::AttributeList& attrs);
00080 void SetSFIFile(const std::string& name);
00081 bool IsSupported(const xmlpp::SaxParser::AttributeList& attrs);
00082 void AddApplication(CODSectionPtr app);
00083 void AddLibrary(CODSectionPtr lib);
00084 };
00085
00086
00087 inline std::ostream& operator<<(std::ostream& os, const OSLoader& osloader)
00088 {
00089 osloader.Dump(os);
00090 return os;
00091 }
00092
00093
00094 }
00095
00096 }
00097
00098 #endif
00099