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

Storage.h

00001 /*
00002  *  Copyright (c) 2004 on behalf of the EU EGEE Project:
00003  *  The European Organization for Nuclear Research (CERN),
00004  *  Istituto Nazionale di Fisica Nucleare (INFN), Italy
00005  *  Datamat Spa, Italy
00006  *  Centre National de la Recherche Scientifique (CNRS), France
00007  *  CS Systeme d'Information (CSSI), France
00008  *  Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden
00009  *  Universiteit van Amsterdam (UvA), Netherlands
00010  *  University of Helsinki (UH.HIP), Finland
00011  *  University of Bergen (UiB), Norway
00012  *  Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom
00013  */
00014 #ifndef STORAGELOCATION_H
00015 #define STORAGELOCATION_H
00016 
00017 #include <string>
00018 
00019 namespace glite
00020 {
00021     namespace rgma
00022     {
00042         class Storage
00043         {
00044 
00045             private:
00046                 std::string m_location;
00047                 std::string m_userName;
00048                 std::string m_password;
00049 
00050                 std::string m_logicalName;
00051 
00052                 int m_type;
00053 
00054                 bool compare(std::string a, std::string b);
00055 
00056             public:
00058                 const static Storage MEMORY;
00059 
00061                 const static Storage DATABASE;
00062 
00064                 const static Storage FILE;
00065 
00066                 virtual ~Storage();
00067 
00072                 Storage(const Storage& storage);
00073 
00078                 Storage& operator=(const Storage& storage);
00079 
00089                 static Storage getDatabase(const std::string location,
00090                     const std::string userName, const std::string password);
00091 
00099                 static Storage getDatabase(const std::string logicalName);
00100 
00106                 bool isDatabase();
00107 
00113                 bool isFile();
00114 
00120                 bool isMemory();
00121 
00127                 std::string getPassword();
00128 
00134                 std::string getLocation();
00135 
00141                 std::string getUserName();
00142 
00148                 std::string getLogicalName();
00149 
00157                 //bool equals(Storage storage) ;
00158 
00164                 bool hasDetails();
00165 
00173                 int hashCode();
00174 
00183                 bool operator==(const Storage storage);
00184 
00193                 bool operator!=(const Storage storage);
00194 
00203                 bool equals(Storage Storage);
00204 
00205                 Storage(){};
00206                 int getType();
00207 
00208             protected:
00210                 const static int M = 1;
00212                 const static int D = 2;
00214                 const static int F = 4;
00215 
00221                 Storage(int type);
00222 
00229                 Storage( const int type, const std::string logicalName );
00230 
00239                 Storage( const std::string location, const std::string userName,
00240                     const std::string password);
00241 
00242         };
00243     }
00244 }
00245 #endif                                            // STORAGELOCATION_H

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