GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

module.hh

Go to the documentation of this file.
00001 /* GFC-Core: GTK+ Foundation Classes (Core Library) 00002 * Copyright (C) 2004 The GFC Development Team. 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00023 00024 #ifndef GFC_G_MODULE_HH 00025 #define GFC_G_MODULE_HH 00026 00027 #ifndef GFC_OBJECT_HH 00028 #include <gfc/object.hh> 00029 #endif 00030 00031 #ifndef __GMODULE_H__ 00032 #include <gmodule.h> 00033 #endif 00034 00035 namespace GFC { 00036 00037 namespace G { 00038 00043 00044 enum ModuleFlags 00045 { 00046 MODULE_BIND_LAZY = G_MODULE_BIND_LAZY, 00049 00050 MODULE_BIND_LOCAL = G_MODULE_BIND_LOCAL, 00054 00055 MODULE_BIND_MASK = G_MODULE_BIND_MASK 00057 }; 00058 00060 00061 typedef unsigned int ModuleFlagsField; 00062 00078 00079 class Module : public GFC::Object 00080 { 00081 Module(const Module&); 00082 Module& operator=(const Module&); 00083 00084 GModule *module_; 00085 00086 protected: 00089 00090 Module(GModule *module); 00093 00095 00096 public: 00099 00100 virtual ~Module(); 00102 00104 00105 static Module* open(const char *file_name, ModuleFlagsField flags); 00106 static Module* open(const String& file_name, ModuleFlagsField flags); 00120 00121 static bool supported(); 00124 00125 static String build_path(const char *module_name); 00126 static String build_path(const String& module_name); 00133 00134 static String build_path(const char *directory, const char *module_name); 00135 static String build_path(const String& directory, const String& module_name); 00153 00154 static String error(); 00157 00160 00161 GModule* g_module() const; 00163 00164 operator GModule* () const; 00166 00167 String name() const; 00170 00174 00175 bool close(); 00178 00179 void make_resident(); 00182 00183 bool symbol(const char *symbol_name, void **symbol); 00184 bool symbol(const String& symbol_name, void **symbol); 00189 00191 }; 00192 00193 } // namespace G 00194 00195 } // namespace GFC 00196 00197 #include <gfc/glib/inline/module.inl> 00198 00199 #endif // GFC_G_MODULE_HH

Generated on Tue Aug 24 00:04:56 2004 for GFC-Core by doxygen 1.3.8