Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound 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 
00066   GnomeModuleInfo*       gobj()       { return gobject_; }
00067   const GnomeModuleInfo* gobj() const { return gobject_; }
00068 
00069   // The caller is responsible for freeing it. Use when directly setting fields in structs.
00070   GnomeModuleInfo* gobj_copy() const;
00071 
00072 protected:
00073   GnomeModuleInfo* gobject_;
00074 
00075 private:
00076 
00077 public:
00078 
00079   
00080   ModuleInfo();
00081 
00083   ModuleInfo(const gchar* name, const gchar* version, const gchar* description);
00084 
00085 
00086   Glib::ustring get_name() const;
00087   Glib::ustring get_version() const;
00088   Glib::ustring get_description() const;
00089 
00090   //requirements array must be statically allocated.
00091   //last element has NULL version
00092   void set_requirements(GnomeModuleRequirement* requirements);
00093 
00094   void set_post_args_parse(GnomeModuleHook function);
00095 
00096 //
00097 //   GnomeModuleHook instance_init;
00098 //   GnomeModuleHook pre_args_parse, post_args_parse;
00099 //
00100 //   struct poptOption *options;
00101 //
00102 //   GnomeModuleInitHook init_pass;
00103 //
00104 //   GnomeModuleClassInitHook class_init;
00105 
00106 
00107 };
00108 
00109 } //namespace Gnome
00110 
00111 
00112 namespace Gnome
00113 {
00114 
00116 inline void swap(ModuleInfo& lhs, ModuleInfo& rhs)
00117   { lhs.swap(rhs); }
00118 
00119 } // namespace Gnome
00120 
00121 namespace Glib
00122 {
00123 
00125 Gnome::ModuleInfo wrap(GnomeModuleInfo* object, bool take_copy = false);
00126 
00127 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00128 template <>
00129 class Value<Gnome::ModuleInfo> : public Glib::Value_Boxed<Gnome::ModuleInfo>
00130 {};
00131 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00132 
00133 } // namespace Glib
00134 
00135 #endif /* _LIBGNOMEMM_MODULEINFO_H */
00136 

Generated on Thu Sep 11 17:15:52 2003 for libgnomemm by doxygen 1.3.2