Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Configuration.h

Go to the documentation of this file.
00001 /*
00002  *
00003  * Configuration.h
00004  *
00005  * Copyright (c) 2002 INFN, CERN on behalf of the EU DataGrid.
00006  * For license conditions see LICENSE file or 
00007  * http://www.edg.org/license.html
00008  * 
00009  */
00010 
00011 #ifndef EDGReplicaManager_Configuration_H
00012 #define EDGReplicaManager_Configuration_H
00013 
00014 /*
00015  * @author <a href="mailto:Giuseppe.Andronico@ct.infn.it">Heinz Stockinger</a>
00016  * @author <a href="mailto:Flavia.Donno@pi.infn.it">Flavia Donno</a>
00017  * @author <a href="mailto:Heinz.Stockinger@cern.ch">Giuseppe Andronico</a>
00018  * @author <a href="mailto:Peter.Kunszt@cern.ch">Peter Kunszt</a>
00019  * @version $Id: Configuration.h,v 1.6 2004/06/14 12:01:17 jamesc Exp $
00020  */
00021 
00022 #include <string>
00023 #include <map>
00024 #include <fstream>
00025 
00026 #include "EdgReplicaManager/ReplicaManagerExceptions.h"
00027 
00028 namespace EdgReplicaManager {
00029 
00030     class Configuration {
00031     public:
00032 
00033 
00036         Configuration(const std::string &configFile) throw(ReplicaManagerException);
00037 
00040         ~Configuration(void);
00041 
00044         std::string getProperty (const std::string &key) throw(ReplicaManagerException);
00045 
00049     private:
00050 
00055         void readConfFile(void)  throw(ReplicaManagerException);
00056 
00059         void trim(std::string & input);
00060 
00061         std::ifstream m_fconf;
00062         std::string m_configFile;
00063         std::map<std::string, std::string> m_envNames;
00064 
00065     };
00066 
00067 };
00068 
00080 #endif
The EU DataGrid Project. All rights reserved.