Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

moduleinfo.h

Go to the documentation of this file.
00001 // -*- c++ -*- 00002 // Generated by gtkmmproc -- DO NOT MODIFY! 00003 #ifndef _LIBGNOMEMM_MODULEINFO_H 00004 #define _LIBGNOMEMM_MODULEINFO_H 00005 00006 #include <glibmm.h> 00007 00008 /* $Id: moduleinfo.hg,v 1.5 2002/04/01 16:54:24 murrayc Exp $ */ 00009 00010 /* moduleinfo.h 00011 * 00012 * Copyright 2001 Free Software Foundation 00013 * 00014 * This library is free software; you can redistribute it and/or 00015 * modify it under the terms of the GNU Library General Public 00016 * License as published by the Free Software Foundation; either 00017 * version 2 of the License, or (at your option) any later version. 00018 * 00019 * This library is distributed in the hope that it will be useful, 00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00022 * Library General Public License for more details. 00023 * 00024 * You should have received a copy of the GNU Library General Public 00025 * License along with this library; if not, write to the Free 00026 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00027 */ 00028 00029 #include <glibmm/containers.h> 00030 #include <libgnome/gnome-program.h> 00031 00032 00033 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00034 extern "C" { typedef struct _GnomeModuleInfo GnomeModuleInfo; } 00035 #endif 00036 00037 namespace Gnome 00038 { 00039 00040 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00041 //The C copy and free functions are hidden, but they are registered: 00042 GnomeModuleInfo* gnomemm_module_info_copy(const GnomeModuleInfo* src); 00043 void gnomemm_module_info_free(GnomeModuleInfo* src); 00044 #endif //DOXYGEN_SHOULD_SKIP_THIS 00045 00046 class ModuleInfo 00047 { 00048 public: 00049 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00050 typedef ModuleInfo CppObjectType; 00051 typedef GnomeModuleInfo BaseObjectType; 00052 00053 static GType get_type() G_GNUC_CONST; 00054 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00055 00056 00057 explicit ModuleInfo(GnomeModuleInfo* gobject, bool make_a_copy = true); 00058 00059 ModuleInfo(const ModuleInfo& other); 00060 ModuleInfo& operator=(const ModuleInfo& other); 00061 00062 ~ModuleInfo(); 00063 00064 void swap(ModuleInfo& other); 00065 00067 GnomeModuleInfo* gobj() { return gobject_; } 00068 00070 const GnomeModuleInfo* gobj() const { return gobject_; } 00071 00072 // The caller is responsible for freeing it. Use when directly setting fields in structs. 00073 GnomeModuleInfo* gobj_copy() const; 00074 00075 protected: 00076 GnomeModuleInfo* gobject_; 00077 00078 private: 00079 00080 public: 00081 00082 00083 ModuleInfo(); 00084 00086 ModuleInfo(const gchar* name, const gchar* version, const gchar* description); 00087 00088 00089 Glib::ustring get_name() const; 00090 Glib::ustring get_version() const; 00091 Glib::ustring get_description() const; 00092 00093 //requirements array must be statically allocated. 00094 //last element has NULL version 00095 void set_requirements(GnomeModuleRequirement* requirements); 00096 00097 void set_post_args_parse(GnomeModuleHook function); 00098 00099 // 00100 // GnomeModuleHook instance_init; 00101 // GnomeModuleHook pre_args_parse, post_args_parse; 00102 // 00103 // struct poptOption *options; 00104 // 00105 // GnomeModuleInitHook init_pass; 00106 // 00107 // GnomeModuleClassInitHook class_init; 00108 00109 00110 }; 00111 00112 } //namespace Gnome 00113 00114 00115 namespace Gnome 00116 { 00117 00119 inline void swap(ModuleInfo& lhs, ModuleInfo& rhs) 00120 { lhs.swap(rhs); } 00121 00122 } // namespace Gnome 00123 00124 namespace Glib 00125 { 00126 00128 Gnome::ModuleInfo wrap(GnomeModuleInfo* object, bool take_copy = false); 00129 00130 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00131 template <> 00132 class Value<Gnome::ModuleInfo> : public Glib::Value_Boxed<Gnome::ModuleInfo> 00133 {}; 00134 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00135 00136 } // namespace Glib 00137 00138 #endif /* _LIBGNOMEMM_MODULEINFO_H */ 00139

Generated on Wed Jul 21 11:52:37 2004 for libgnomemm by doxygen 1.3.7