dynamic_loader.h

Go to the documentation of this file.
00001 #ifndef DYNAMIC_LIBRARY_LOADER_CLASS
00002 #define DYNAMIC_LIBRARY_LOADER_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : dynamic_library_loader                                            *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 1998-$now By Author.  This program is free software; you can  *
00011 * redistribute it and/or modify it under the terms of the GNU General Public  *
00012 * License as published by the Free Software Foundation; either version 2 of   *
00013 * the License or (at your option) any later version.  This is online at:      *
00014 *     http://www.fsf.org/copyleft/gpl.html                                    *
00015 * Please send any updates to: fred@gruntose.com                               *
00016 \*****************************************************************************/
00017 
00019 
00020 #include "opsysdll.h"
00021 
00022 namespace library_plugins {
00023 
00024   // forward.
00025   class virtual_library;
00026   class vl_data_pack;
00027 
00028   class OPSYSTEM_CLASS_STYLE dynamic_library_loader
00029   { 
00030   public:
00031     dynamic_library_loader(const istring &dll_name, bool load_it = true);
00033 
00039     virtual ~dynamic_library_loader();
00040 
00041     bool load_the_library();
00043 
00046     bool loaded() const;
00048 
00049     const istring &dll_name() const;  
00050 
00051     virtual_library *create(vl_data_pack &parameters);
00053 
00059     virtual void *load_library(const char *to_load);
00061 
00066     virtual void free_library(void *to_free);
00068 
00069     typedef void shared_method();
00071 
00072     static shared_method *load_method(void *handle, const char *method_name);
00074 
00075   private:
00076     istring *_dll_name;  
00077     void *_dll_handle;  
00078 
00079     // not used.
00080     dynamic_library_loader(dynamic_library_loader &);
00081     dynamic_library_loader &operator =(dynamic_library_loader &);
00082   };
00083 
00084 } // namespace.
00085 
00086 #endif // outer guard.
00087 

Generated on Thu Nov 20 04:29:03 2008 for HOOPLE Libraries by  doxygen 1.5.1