00001
00002
00003
00004
00005
00006
00007 #ifndef RGMA_PROPERTIES_H
00008 #define RGMA_PROPERTIES_H
00009
00010 #include "rgma/RGMAException.h"
00011 #include <map>
00012 #include <stdio.h>
00013
00014 namespace glite
00015 {
00016 namespace rgma
00017 {
00023 class Properties
00024 {
00025 public:
00026
00032 Properties(std::string className = "") throw (RGMAException);
00033
00037 virtual ~Properties();
00038
00043 virtual void load(std::string filename) throw (RGMAException);
00044
00051 std::string getProperty(std::string key) throw (RGMAException);
00052
00060 std::string getProperty(std::string key,
00061 std::string defaultValue);
00062
00068 bool Properties::present(std::string key);
00069
00070 protected:
00071 typedef std::map<std::string, std::string> Table;
00072 Table table;
00073
00082 int getLine(char** line, int* length, FILE* inStream);
00083
00084 private:
00085 };
00086 }
00087 }
00088 #endif // GLITE_PROPERTIES_H