miniobject.h

Go to the documentation of this file.
00001 /* gstreamermm - a C++ wrapper for gstreamer
00002  *
00003  * Copyright 2008 The gstreamermm Development Team
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public
00016  * License along with this library; if not, write to the Free
00017  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018  */
00019 
00020 #ifndef _GSTREAMERMM_MINIOBJECT_H
00021 #define _GSTREAMERMM_MINIOBJECT_H
00022 
00023 #include <glibmm/objectbase.h>
00024 #include <gst/gstminiobject.h>
00025 
00026 namespace Gst
00027 {
00028 
00029 class MiniObject_Class;
00030 
00034 class MiniObject : public Glib::ObjectBase
00035 {
00036 public:
00037 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00038   typedef MiniObject       CppObjectType;
00039   typedef MiniObject_Class CppClassType;
00040   typedef GstMiniObject      BaseObjectType;
00041   typedef GstMiniObjectClass BaseClassType;
00042 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00043 
00044 //protected:
00045 public:
00046   //friend Glib::wrap;
00047 
00048   MiniObject();
00049   MiniObject(GstMiniObject* castitem, bool take_copy = false);
00050 
00051 public:
00052   virtual ~MiniObject();
00053   
00054   //Note that we don't add a constructor for gst_mini_object_new()
00055   //because it's just an equivalent for g_object_new(), 
00056   //which is just an equivalent for C++'s new(). 
00057 
00058 //private:
00059   // noncopyable
00060   MiniObject(const MiniObject&);
00061   MiniObject& operator=(const MiniObject&);
00062 
00063 public:
00064   //Glib::RefPtr<Gst::MiniObject> copy();
00065 
00066   bool is_writable() const;
00067   void make_writable();
00068 
00069   void reference() const;
00070   void unreference() const;
00071 
00073   GstMiniObject*       gobj()       { return reinterpret_cast<GstMiniObject*>(gobject_); }
00074 
00076   const GstMiniObject* gobj() const { return reinterpret_cast<GstMiniObject*>(gobject_); }
00077 
00078 
00079   // static void replace(Glib::RefPtr<Gst::MiniObject> & olddata, Glib::RefPtr<Gst::MiniObject> & newdata);
00080 
00081 protected:
00082   void swap(MiniObject& other);
00083 
00084 protected:
00085   GstMiniObject* gobject_; //TODO: Doesn't this shadow a member variable in Glib::ObjectBase?
00086 };
00087 
00088 } // namespace Gst
00089 
00090 /*
00091 namespace Glib
00092 {
00093   inline Glib::RefPtr<Gst::MiniObject> wrap(GstMiniObject *object, bool take_copy)
00094   {
00095     return Glib::RefPtr<Gst::MiniObject>(new MiniObject(object, take_copy));
00096   }
00097 
00098 } //namespace Glib
00099 */
00100 
00101 #endif //#ifndef _GSTREAMERMM_MINIOBJECT_H
00102 

Generated on Sun Jul 27 17:07:20 2008 for gstreamermm by  doxygen 1.5.4