Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

Properties.h

00001 /* Copyright (c) 2001-2003 EU DataGrid. */
00002 /* For license conditions see http://www.eu-datagrid.org/license.html */
00003 
00004 // When making changes to this class, note that it is used by SSLContextProperties
00005 // as well as APIBase
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

Generated on Wed May 17 17:48:18 2006 for glite-rgma-api-cpp by doxygen 1.3.5