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

BaseSharedLib.h

Go to the documentation of this file.
00001 // 
00002 // Copyright (C) CERN, Geneva 
00003 // 
00004 
00005 #ifndef BaseSharedLib_h
00006 #define BaseSharedLib_h
00007 
00008 #if defined(__hpux)
00009   #include "dl.h"
00010 #endif
00011 
00012 #ifdef _WIN32
00013   #include <windows.h>
00014 #endif 
00015 
00016 #if defined(__sun) || defined(__sgi) || defined(__osf__) || defined(__linux)
00017   #define STD_SH_LIB
00018   #include <dlfcn.h>
00019 #endif 
00020 
00028 class BaseSharedLib {
00029 private:
00030   char *fLibPath;    // schema lib path name
00031   // schema library handles (one for each OS :-( )
00032 #ifdef __hpux 
00033   typedef shl_t SharedLibHandle;
00034 #endif
00035 #ifdef WIN32
00036   typedef HINSTANCE SharedLibHandle;
00037 #endif
00038 #ifdef STD_SH_LIB
00039   typedef void * SharedLibHandle;
00040 #endif
00041 
00042   SharedLibHandle fLibHandle;
00043 
00044 public:
00046   BaseSharedLib(const char *pathName="", int loadIt=0);
00047   
00049   ~BaseSharedLib();
00050 
00052   void setPathName(const char *name);
00053 
00055   const char *getPathName();
00056   
00060   int load();
00061 
00063   void unload();
00064 
00066   void *lookUp (const char *funName);
00067 };
00068 
00069 #endif /* BaseSharedLib_h */
00070 
00071 
00072 
00073 
00074 

Generated on Tue May 20 14:50:25 2003 for HepUtilities by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002