00001 #ifndef _GSTMM_OBJECT_H
00002 #define _GSTMM_OBJECT_H
00003
00004
00005 #include <glibmm.h>
00006 #include <glibmm/object.h>
00007
00008
00009 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00010 typedef struct _GstObject GstObject;
00011 typedef struct _GstObjectClass GstObjectClass;
00012 #endif
00013
00014
00015 namespace Gst
00016 {
00017 class Object_Class;
00018 }
00019
00020 namespace Gst
00021 {
00022
00023
00024
00025
00026
00030 class Object : public Glib::Object
00031 {
00032
00033 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00034
00035 public:
00036 typedef Object CppObjectType;
00037 typedef Object_Class CppClassType;
00038 typedef GstObject BaseObjectType;
00039 typedef GstObjectClass BaseClassType;
00040
00041 private: friend class Object_Class;
00042 static CppClassType object_class_;
00043
00044 private:
00045
00046 Object(const Object&);
00047 Object& operator=(const Object&);
00048
00049 protected:
00050 explicit Object(const Glib::ConstructParams& construct_params);
00051 explicit Object(GstObject* castitem);
00052
00053 #endif
00054
00055 public:
00056 virtual ~Object();
00057
00058 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00059 static GType get_type() G_GNUC_CONST;
00060 static GType get_base_type() G_GNUC_CONST;
00061 #endif
00062
00064 GstObject* gobj() { return reinterpret_cast<GstObject*>(gobject_); }
00065
00067 const GstObject* gobj() const { return reinterpret_cast<GstObject*>(gobject_); }
00068
00070 GstObject* gobj_copy();
00071
00072 protected:
00073 Object();
00074
00075 public:
00076
00077
00078 void reference() const;
00079 void unreference() const;
00080
00081
00082 bool set_name(const Glib::ustring& name);
00083 Glib::ustring get_name() const;
00084
00085 bool set_parent(const Glib::RefPtr<Object>& parent);
00086 Glib::RefPtr<Object> get_parent();
00087 Glib::RefPtr<const Object> get_parent() const;
00088
00089
00090 void unparent();
00091
00092 Glib::ustring get_name_prefix() const;
00093 void set_name_prefix(const Glib::ustring& prefix);
00094
00095
00096
00097
00098
00099
00100 #ifdef GLIBMM_PROPERTIES_ENABLED
00101
00107 Glib::PropertyProxy<Glib::ustring> property_name() ;
00108 #endif //#GLIBMM_PROPERTIES_ENABLED
00109
00110 #ifdef GLIBMM_PROPERTIES_ENABLED
00111
00117 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_name() const;
00118 #endif //#GLIBMM_PROPERTIES_ENABLED
00119
00120 };
00121
00122 }
00123
00124
00125 namespace Glib
00126 {
00135 Glib::RefPtr<Gst::Object> wrap(GstObject* object, bool take_copy = false);
00136 }
00137
00138
00139 #endif
00140