gnomemm r1454 - in gstreamermm/trunk: . gstreamer/gstreamermm gstreamer/src tools/m4



Author: jaalburqu
Date: Sun Apr 13 12:11:15 2008
New Revision: 1454
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1454&view=rev

Log:
2008-04-13  Josà Alburquerque  <jaalburqu svn gnome org>

	* tools/m4/class_boxedtype_ncopy_extra.m4:
	* tools/m4/convert.m4: Added new class macro
	_CLASS_BOXEDTYPE_NCOPY_EXTRA which is like the class macro used for
	Gst::Structure but adds extra dummy param to wrap method to
	disambiguate definitions of "Gst::Structure Glib::wrap(GstStructure*)"
	and "Gst::TagList Glib::wrap(GstStructure*)" (because GstTagList is
	declared as "typedef GstStructure GstTagList" in GStreamer API which
	in essence makes it a GstStructure)

	* gstreamer/src/taglist.hg: Added class docs and modified to use class
	macro _CLASS_BOXEDTYPE_NCOPY_EXTRA

	* gstreamer/gstreamermm/taglist.cc:
	* gstreamer/gstreamermm/taglist.h: Furthermore, had to add actual
	gmmproc generated source files in order to manually remove the
	standard 'extern "C" { typedef struct _GstTagList GstTagList; }' at
	top of *.h file, again, because GStreamer API does not define
	GstTagList in a standard way.  In bug report #518934 developers seem
	not to want to fix this.  Will post last comment in report informing
	that they are not following GObject definition standards to see if
	perhaps they will reconsider for future.

	taglist.hg has to be added to
	gstreamer/src/Makefile_list_of_hg.am_fragment when changed to
	regenerate these files and then removed and the 'extern "C" { ...}'
	has to be removed from the *.h file to keep build process working.

Added:
   gstreamermm/trunk/gstreamer/gstreamermm/taglist.cc
   gstreamermm/trunk/gstreamer/gstreamermm/taglist.h
   gstreamermm/trunk/tools/m4/class_boxedtype_ncopy_extra.m4
Modified:
   gstreamermm/trunk/ChangeLog
   gstreamermm/trunk/gstreamer/src/taglist.hg
   gstreamermm/trunk/tools/m4/convert.m4

Added: gstreamermm/trunk/gstreamer/gstreamermm/taglist.cc
==============================================================================
--- (empty file)
+++ gstreamermm/trunk/gstreamer/gstreamermm/taglist.cc	Sun Apr 13 12:11:15 2008
@@ -0,0 +1,204 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+
+#include <gstreamermm/taglist.h>
+#include <gstreamermm/private/taglist_p.h>
+
+// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+/* gstreamermm - a C++ wrapper for gstreamer
+ *
+ * Copyright 2008 The gstreamermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gst/gstenumtypes.h>
+
+/*
+static gboolean
+TagList_Foreach_gstreamermm_callback(const GstTagList* list, const gchar *tag, void* data)
+{
+  Gst::TagList::SlotForeach* slot = static_cast<Gst::TagList::SlotForeach*>(data);
+  bool result = (*slot)(Glib::wrap(list), Glib::ustring(value));
+  delete slot;
+  return result;
+}
+*/
+
+namespace Gst
+{
+
+/*
+void
+TagList::foreach(const SlotForeach& slot)
+{
+  SlotForeach* slot_copy = new SlotForeach(slot);
+  gst_taglist_foreach(gobj(), &TagList_Foreach_gstreamermm_callback, slot_copy);
+}
+*/
+
+} //namespace Gst
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gst::TagMergeMode>::value_type()
+{
+  return gst_tag_merge_mode_get_type();
+}
+
+// static
+GType Glib::Value<Gst::TagFlag>::value_type()
+{
+  return gst_tag_flag_get_type();
+}
+
+
+namespace Glib
+{
+
+Gst::TagList wrap(GstTagList* object, bool take_copy, bool destroy, bool dummy)
+{
+  return Gst::TagList(object, take_copy, destroy);
+}
+
+} // namespace Glib
+
+
+namespace Gst
+{
+
+
+// static
+GType TagList::get_type()
+{
+  return gst_tag_list_get_type();
+}
+
+TagList::TagList()
+:
+  gobject_ (gst_tag_list_new())
+{}
+
+TagList::TagList(const TagList& other)
+:
+  gobject_ (other.gobject_),  // Always use original object
+  destroy(false)  // Do not delete gobject when wrapper is destroyed (let
+                  // original wrapper do that)
+{}
+
+TagList::TagList(GstTagList* gobject, bool make_a_copy, bool destroy)
+:
+  // For this ncopy extra BoxedType wrapper, make_a_copy is false by default
+  // and destroy is true.
+  gobject_ ((make_a_copy && gobject) ? gst_tag_list_copy(gobject) : gobject),
+  destroy(destroy) // Should wrapper destroy gobject when deleted?
+{}
+
+// operator=() DOES make copies of gobject.
+TagList& TagList::operator=(const TagList& other)
+{
+  TagList temp (gobject_, true);
+  swap(temp);
+  return *this;
+}
+
+TagList::~TagList()
+{
+  if(destroy && gobject_)
+    gst_tag_list_free(gobject_);
+}
+
+void TagList::swap(TagList& other)
+{
+  GstTagList *const temp = gobject_;
+  gobject_ = other.gobject_;
+  other.gobject_ = temp;
+
+  bool const destroy_temp = destroy;
+  destroy = other.destroy;
+  other.destroy = destroy_temp;
+}
+
+GstTagList* TagList::gobj_copy() const
+{
+  return gst_tag_list_copy(gobject_);
+}
+
+//
+void TagList::set_destroy(bool destroy)
+{
+  this->destroy = destroy;
+}
+
+
+bool TagList::exists(const Glib::ustring& tag)
+{
+  return gst_tag_exists(tag.c_str());
+}
+
+
+GType TagList::get_type(const Glib::ustring& tag)
+{
+  return gst_tag_get_type(tag.c_str());
+}
+
+
+Glib::ustring TagList::get_nick(const Glib::ustring& tag)
+{
+  return Glib::convert_const_gchar_ptr_to_ustring(gst_tag_get_nick(tag.c_str()));
+}
+
+
+Glib::ustring TagList::get_description(const Glib::ustring& tag)
+{
+  return Glib::convert_const_gchar_ptr_to_ustring(gst_tag_get_description(tag.c_str()));
+}
+
+
+TagFlag TagList::get_flag(const Glib::ustring& tag)
+{
+  return (TagFlag)(gst_tag_get_flag(tag.c_str()));
+}
+
+
+bool TagList::is_fixed(const Glib::ustring& tag)
+{
+  return gst_tag_is_fixed(tag.c_str());
+}
+
+
+bool TagList::empty()
+{
+  return gst_tag_list_is_empty(gobj());
+}
+
+void TagList::insert(const TagList& other, TagMergeMode mode)
+{
+gst_tag_list_insert(gobj(), ((other).gobj()), ((GstTagMergeMode)(mode))); 
+}
+
+TagList TagList::merge(const TagList& other, TagMergeMode mode)
+{
+  return Glib::wrap(gst_tag_list_merge(gobj(), ((other).gobj()), ((GstTagMergeMode)(mode))));
+}
+
+
+} // namespace Gst
+
+

Added: gstreamermm/trunk/gstreamer/gstreamermm/taglist.h
==============================================================================
--- (empty file)
+++ gstreamermm/trunk/gstreamer/gstreamermm/taglist.h	Sun Apr 13 12:11:15 2008
@@ -0,0 +1,266 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GSTREAMERMM_TAGLIST_H
+#define _GSTREAMERMM_TAGLIST_H
+
+
+#include <glibmm.h>
+
+// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+/* gstreamermm - a C++ wrapper for gstreamer
+ *
+ * Copyright 2008 The gstreamermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gst/gsttaglist.h>
+
+
+namespace Gst
+{
+
+/** @addtogroup gstreamermmEnums Enums and Flags */
+
+/**
+ * @ingroup gstreamermmEnums
+ */
+enum TagMergeMode
+{
+  TAG_MERGE_UNDEFINED,
+  TAG_MERGE_REPLACE_ALL,
+  TAG_MERGE_REPLACE,
+  TAG_MERGE_APPEND,
+  TAG_MERGE_PREPEND,
+  TAG_MERGE_KEEP,
+  TAG_MERGE_KEEP_ALL,
+  TAG_MERGE_COUNT
+};
+
+} // namespace Gst
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gst::TagMergeMode> : public Glib::Value_Enum<Gst::TagMergeMode>
+{
+public:
+  static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gst
+{
+
+/**
+ * @ingroup gstreamermmEnums
+ */
+enum TagFlag
+{
+  TAG_FLAG_UNDEFINED,
+  TAG_FLAG_META,
+  TAG_FLAG_ENCODED,
+  TAG_FLAG_DECODED,
+  TAG_FLAG_COUNT
+};
+
+} // namespace Gst
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gst::TagFlag> : public Glib::Value_Enum<Gst::TagFlag>
+{
+public:
+  static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gst
+{
+
+
+/** TagList â List of tags and values used to describe media metadata.
+ */
+class TagList
+{
+  public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+  typedef TagList CppObjectType;
+  typedef GstTagList BaseObjectType;
+
+  static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+  TagList();
+
+  explicit TagList(GstTagList* gobject, bool make_a_copy = false, bool destroy = true);
+
+  TagList(const TagList& other);
+  TagList& operator=(const TagList& other);
+
+  ~TagList();
+
+  void swap(TagList& other);
+
+  ///Provides access to the underlying C instance.
+  GstTagList*       gobj()       { return gobject_; }
+
+  ///Provides access to the underlying C instance.
+  const GstTagList* gobj() const { return gobject_; }
+
+  ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+  GstTagList* gobj_copy() const;
+
+  //Change whether wrapper should destroy gobject or not when wrapper is deleted.
+  void set_destroy(bool destroy);
+
+protected:
+  GstTagList* gobject_;
+
+private:
+  bool destroy;
+
+private:
+
+
+public:
+  /** For example,
+   * void on_foreach(const TagList& taglist, const Glib::Ustring& tag);
+   */
+  typedef sigc::slot<void, const TagList&, const Glib::ustring&> SlotForeach;
+
+  
+  /** Checks if the given type is already registered.
+   * @param tag Name of the tag.
+   * @return <tt>true</tt> if the type is already registered.
+   */
+  static bool exists(const Glib::ustring& tag);
+  
+  /** Gets the Type used for this tag.
+   * @param tag The tag.
+   * @return The Type of this tag.
+   */
+  static GType get_type(const Glib::ustring& tag);
+  
+  /** Returns: the human-readable name of this tag
+   * @param tag The tag.
+   * @return The human-readable name of this tag.
+   */
+  static Glib::ustring get_nick(const Glib::ustring& tag);
+  
+  /** Returns: the human-readable description of this tag
+   * @param tag The tag.
+   * @return The human-readable description of this tag.
+   */
+  static Glib::ustring get_description(const Glib::ustring& tag);
+  
+  /** Gets the flag of @a tag.
+   * @param tag The tag.
+   * @return The flag of this tag.
+   */
+  static TagFlag get_flag(const Glib::ustring& tag);
+  
+  /** Checks if the given tag is fixed. A fixed tag can only contain one value.
+   * Unfixed tags can contain lists of values.
+   * @param tag Tag to check.
+   * @return <tt>true</tt>, if the given tag is fixed.
+   */
+  static bool is_fixed(const Glib::ustring& tag);
+  
+  /** Checks if the given taglist is empty.
+   * @return <tt>true</tt> if the taglist is empty, otherwise <tt>false</tt>.
+   * 
+   * Since: 0.10.11.
+   */
+  bool empty();
+  
+  /** Inserts the tags of the second list into the first list using the given mode.
+   * @param from List to merge from.
+   * @param mode The mode to use.
+   */
+  void insert(const TagList& other, TagMergeMode mode);
+  
+  /** Merges the two given lists into a new list. If one of the lists is <tt>0</tt>, a
+   * copy of the other is returned. If both lists are <tt>0</tt>, <tt>0</tt> is returned.
+   * @param list2 Second list to merge.
+   * @param mode The mode to use.
+   * @return The new list.
+   */
+  TagList merge(const TagList& other, TagMergeMode mode);
+
+  void foreach(const SlotForeach& slot);
+
+
+};
+
+} //namespace Gst
+
+
+namespace Gst
+{
+
+/** @relates Gst::TagList
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(TagList& lhs, TagList& rhs)
+  { lhs.swap(rhs); }
+
+} // namespace Gst
+
+namespace Glib
+{
+
+/** A Glib::wrap() method for this object.
+ * 
+ * @param object The C instance.
+ * @param take_copy False if the result should take ownership of the C
+ * instance. True if it should take a new copy or ref.
+ * @param destroy False if the result should not delete the C instance when
+ * wrapper is destroyed. True if it should.
+ * @param dummy Unused; simply an extra param to disambiguate wrap in weird
+ * case such as GStreamer types GstStructure and GstTagList which are both
+ * really same C type
+ * @result A C++ instance that wraps this C instance.
+ *
+ * @relates Gst::TagList
+ */
+Gst::TagList wrap(GstTagList* object, bool take_copy = false, bool destroy = true, bool dummy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Gst::TagList> : public Glib::Value_Boxed<Gst::TagList>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+
+#endif /* _GSTREAMERMM_TAGLIST_H */
+

Modified: gstreamermm/trunk/gstreamer/src/taglist.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/taglist.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/taglist.hg	Sun Apr 13 12:11:15 2008
@@ -29,9 +29,11 @@
 _WRAP_ENUM(TagMergeMode, GstTagMergeMode)
 _WRAP_ENUM(TagFlag, GstTagFlag)
 
+/** TagList â List of tags and values used to describe media metadata.
+ */
 class TagList
 {
-  _CLASS_BOXEDTYPE_NCOPY(TagList, GstTagList, gst_tag_list_new, gst_tag_list_copy, gst_tag_list_free)
+  _CLASS_BOXEDTYPE_NCOPY_EXTRA(TagList, GstTagList, gst_tag_list_new, gst_tag_list_copy, gst_tag_list_free)
 
 public:
   /** For example,

Added: gstreamermm/trunk/tools/m4/class_boxedtype_ncopy_extra.m4
==============================================================================
--- (empty file)
+++ gstreamermm/trunk/tools/m4/class_boxedtype_ncopy_extra.m4	Sun Apr 13 12:11:15 2008
@@ -0,0 +1,242 @@
+dnl Modified from class_boxed_type.m4 in glibmm (designed to work in a similar
+dnl fashion except that the gobject is not copied if it can be helped and
+dnl destruction of underlying gobject at wrapper destruction is flexible)
+
+define(`_CLASS_BOXEDTYPE_NCOPY_EXTRA',`dnl
+_PUSH()
+dnl
+dnl  Define the args for later macros
+define(`__CPPNAME__',`$1')
+define(`__CNAME__',`$2')
+define(`__BOXEDTYPE_FUNC_NEW',`$3')
+define(`__BOXEDTYPE_FUNC_COPY',`$4')
+define(`__BOXEDTYPE_FUNC_FREE',`$5')
+
+define(`_CUSTOM_DEFAULT_CTOR',`dnl
+_PUSH()
+dnl Define this macro to be tested for later.
+define(`__BOOL_CUSTOM_DEFAULT_CTOR__',`$1')
+_POP()
+')
+
+
+_POP()
+_SECTION(SECTION_CLASS2)
+') dnl End of _CLASS_BOXEDTYPE_NCOPY_EXTRA.
+
+dnl Some of the Gdk types are unions - e.g. GdkEvent.
+define(`_CUSTOM_STRUCT_PROTOTYPE',`dnl
+_PUSH()
+dnl Define this macro to be tested for later.
+define(`__BOOL_CUSTOM_STRUCT_PROTOTYPE__',`$1')
+_POP()
+')
+
+dnl
+dnl _END_CLASS_BOXEDTYPE_NCOPY_EXTRA()
+dnl   denotes the end of a class
+dnl
+define(`_END_CLASS_BOXEDTYPE_NCOPY_EXTRA',`
+_SECTION(SECTION_HEADER1)
+ifdef(`__BOOL_CUSTOM_STRUCT_PROTOTYPE__',`dnl
+',`dnl
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _`'__CNAME__ __CNAME__; }
+#endif
+')dnl
+
+_SECTION(SECTION_HEADER3)
+
+__NAMESPACE_BEGIN__
+
+/** @relates __NAMESPACE__::__CPPNAME__
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(__CPPNAME__& lhs, __CPPNAME__& rhs)
+  { lhs.swap(rhs); }
+
+__NAMESPACE_END__
+
+namespace Glib
+{
+ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
+',`dnl else
+
+/** A Glib::wrap() method for this object.
+ * 
+ * @param object The C instance.
+ * @param take_copy False if the result should take ownership of the C
+ * instance. True if it should take a new copy or ref.
+ * @param destroy False if the result should not delete the C instance when
+ * wrapper is destroyed. True if it should.
+ * @param dummy Unused; simply an extra param to disambiguate wrap in weird
+ * case such as GStreamer types GstStructure and GstTagList which are both
+ * really same C type
+ * @result A C++ instance that wraps this C instance.
+ *
+ * @relates __NAMESPACE__::__CPPNAME__
+ */
+__NAMESPACE__::__CPPNAME__ wrap(__CNAME__* object, bool take_copy = false, bool destroy = true, bool dummy = false);
+')dnl endif __BOOL_NO_WRAP_FUNCTION__
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<__NAMESPACE__::__CPPNAME__> : public Glib::Value_Boxed<__NAMESPACE__::__CPPNAME__>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+_SECTION(SECTION_SRC_GENERATED)
+
+ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
+',`dnl else
+namespace Glib
+{
+
+__NAMESPACE__::__CPPNAME__ wrap(__CNAME__* object, bool take_copy, bool destroy, bool dummy)
+{
+  return __NAMESPACE__::__CPPNAME__`'(object, take_copy, destroy);
+}
+
+} // namespace Glib
+')dnl endif
+
+
+__NAMESPACE_BEGIN__
+
+dnl
+dnl The implementation:
+dnl
+
+// static
+GType __CPPNAME__::get_type()
+{
+  return _GET_TYPE_FUNC(__CNAME__);
+}
+
+ifdef(`__BOOL_CUSTOM_DEFAULT_CTOR__',`dnl
+',`dnl else
+__CPPNAME__::__CPPNAME__`'()
+:
+ifelse(__BOXEDTYPE_FUNC_NEW,NONE,`dnl
+  gobject_ (0), // Allows creation of invalid wrapper, e.g. for output arguments to methods.
+  destroy(false)  // destroy tells whether to free gobject when wrapper is destroyed
+',`dnl else
+  gobject_ (__BOXEDTYPE_FUNC_NEW`'())
+')dnl
+{}
+')dnl endif __BOOL_CUSTOM_DEFAULT_CTOR__
+
+__CPPNAME__::__CPPNAME__`'(const __CPPNAME__& other)
+:
+  gobject_ (other.gobject_),  // Always use original object
+  destroy(false)  // Do not delete gobject when wrapper is destroyed (let
+                  // original wrapper do that)
+{}
+
+__CPPNAME__::__CPPNAME__`'(__CNAME__* gobject, bool make_a_copy, bool destroy)
+:
+  // For this ncopy extra BoxedType wrapper, make_a_copy is false by default
+  // and destroy is true.
+  gobject_ ((make_a_copy && gobject) ? __BOXEDTYPE_FUNC_COPY`'(gobject) : gobject),
+  destroy(destroy) // Should wrapper destroy gobject when deleted?
+{}
+
+// operator=() DOES make copies of gobject.
+__CPPNAME__& __CPPNAME__::operator=(const __CPPNAME__`'& other)
+{
+  __CPPNAME__ temp (gobject_, true);
+  swap(temp);
+  return *this;
+}
+
+__CPPNAME__::~__CPPNAME__`'()
+{
+dnl This could be a free or an unref, we do not need to know.
+  if(destroy && gobject_)
+    __BOXEDTYPE_FUNC_FREE`'(gobject_);
+}
+
+void __CPPNAME__::swap(__CPPNAME__& other)
+{
+  __CNAME__ *const temp = gobject_;
+  gobject_ = other.gobject_;
+  other.gobject_ = temp;
+
+  bool const destroy_temp = destroy;
+  destroy = other.destroy;
+  other.destroy = destroy_temp;
+}
+
+__CNAME__* __CPPNAME__::gobj_copy() const
+{
+  return __BOXEDTYPE_FUNC_COPY`'(gobject_);
+}
+
+//
+void __CPPNAME__::set_destroy(bool destroy)
+{
+  this->destroy = destroy;
+}
+
+_IMPORT(SECTION_CC)
+
+__NAMESPACE_END__
+
+
+dnl
+dnl
+dnl
+dnl
+_POP()
+dnl
+dnl
+dnl The actual class, e.g. Pango::FontDescription, declaration:
+dnl
+_IMPORT(SECTION_CLASS1)
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+  typedef __CPPNAME__ CppObjectType;
+  typedef __CNAME__ BaseObjectType;
+
+  static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ifdef(`__BOOL_CUSTOM_DEFAULT_CTOR__',`dnl
+',`dnl else
+  __CPPNAME__`'();
+')dnl
+
+  explicit __CPPNAME__`'(__CNAME__* gobject, bool make_a_copy = false, bool destroy = true);
+
+  __CPPNAME__`'(const __CPPNAME__& other);
+  __CPPNAME__& operator=(const __CPPNAME__& other);
+
+  ~__CPPNAME__`'();
+
+  void swap(__CPPNAME__& other);
+
+  ///Provides access to the underlying C instance.
+  __CNAME__*       gobj()       { return gobject_; }
+
+  ///Provides access to the underlying C instance.
+  const __CNAME__* gobj() const { return gobject_; }
+
+  ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+  __CNAME__* gobj_copy() const;
+
+  //Change whether wrapper should destroy gobject or not when wrapper is deleted.
+  void set_destroy(bool destroy);
+
+protected:
+  __CNAME__* gobject_;
+
+private:
+  bool destroy;
+
+private:
+_IMPORT(SECTION_CLASS2)
+')
+

Modified: gstreamermm/trunk/tools/m4/convert.m4
==============================================================================
--- gstreamermm/trunk/tools/m4/convert.m4	(original)
+++ gstreamermm/trunk/tools/m4/convert.m4	Sun Apr 13 12:11:15 2008
@@ -3,3 +3,4 @@
 include(convert_gst.m4)
 include(class_gstminiobject.m4)
 include(class_boxedtype_ncopy.m4)
+include(class_boxedtype_ncopy_extra.m4)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]