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

Library.h

Go to the documentation of this file.
00001 #ifndef _SOLARIS_LIBRARY_H_
00002 #define _SOLARIS_LIBRARY_H_
00003 
00004 #include <dlfcn.h>
00005 #include "OSDependent/OSDependent.h"
00006 
00007 /*
00008  * Class to dynamically load a library for Solaris.
00009  */
00010 class Library {
00011 private:
00012   void * _handle;
00013 
00014 public:
00015   Library();
00016   ~Library();
00017  
00018   /*
00019    * Mode to open library.
00020    */
00021   enum Mode { LAZY = RTLD_LAZY, NOW = RTLD_NOW };
00022 
00023   int load(const char *libName, int mode = LAZY);
00024   int unload();
00025   void *getFuncPtr(const char *funcName) const;
00026 
00027   static void getNativeLibName (const char *genericName, char *nativeName);
00028 };
00029 
00030 #endif  // _SOLARIS_LIBRARY_H_
00031 
00032 
00033 
00034 

Generated on Mon Oct 7 09:33:29 2002 for Gaia by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001