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

LibFactory.h

00001          /**************** LibFactory.h ******************/
00002 
00003 #ifndef LIB_FACTORY_H
00004 #define LIB_FACTORY_H
00005 
00006 #include <map>
00007 #include <dlfcn.h> 
00008 #include "Querier.h"
00009 #include <string>
00010 #include <vector>
00011 #include <iostream>
00012 #include "LibTriple.h"
00013 
00036 namespace libfactory{
00037 
00041 class LibFactory{
00042 public:
00043 
00044         bool Register(std::string const & LibID, std::string const & Library,
00045                  std::string const & Creator, std::string const & Destructor);
00046    
00047    bool Unregister(std::string const & LibID);
00048    
00049    void* LibCreate(std::string const & LibID, LcgInfo::create_Querier** Creator,
00050                    LcgInfo::destroy_Querier** Destructor);
00051 
00052    std::vector<std::string> List() const;
00053 
00054 private:
00055 
00056    typedef std::pair<std::string, libtriple::triple<std::string,
00057                     std::string, std::string> > IdPairToLib;
00058 
00059    typedef std::map<std::string, libtriple::triple<std::string,
00060                     std::string, std::string> > IdToLib;
00061 
00062    IdToLib libassociations_;
00063 
00064 };//end of class LibFactory
00065 
00066 }//end of namespace libfactory
00067 
00068 #endif 
00069 

Generated on Tue Oct 5 14:42:45 2004 for LCG Information System Interface by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002