00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019
00020
00021 #ifndef LINUX_SO_DYN_LIB_HEADER
00022 #define LINUX_SO_DYN_LIB_HEADER
00023
00024 #include "../BasicDynLib.h"
00025 #include <dlfcn.h>
00026
00027 namespace SOME
00028 {
00029
00030 class DynLib: public SOME::BasicDynLib
00031 {
00032 private:
00033 DynLib();
00034 friend SOME::BasicDynLib* SOME::newDynLib();
00035
00036 public:
00037 ~DynLib()
00038 {
00039 unloadLibrary();
00040 }
00041 virtual bool loadLibrary(const char* filepath);
00042 virtual void* getFunction(const char* func);
00043
00044 protected:
00045 virtual bool parsePath( const std::string &path, std::string &return_dir, std::string &return_pattern );
00046 virtual std::list < std::string > enumPlatformDirectory( const std::string& path );
00047
00048 private:
00049 virtual void unloadLibrary();
00050
00051 private:
00052 void* lib;
00053 };
00054
00055 }
00056
00057 #endif