xml.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _GSTREAMERMM_XML_H
00004 #define _GSTREAMERMM_XML_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00010 
00011 /* gstreamermm - a C++ wrapper for gstreamer
00012  *
00013  * Copyright 2008 The gstreamermm Development Team
00014  *
00015  * This library is free software; you can redistribute it and/or
00016  * modify it under the terms of the GNU Library General Public
00017  * License as published by the Free Software Foundation; either
00018  * version 2 of the License, or (at your option) any later version.
00019  *
00020  * This library is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023  * Library General Public License for more details.
00024  *
00025  * You should have received a copy of the GNU Library General Public
00026  * License along with this library; if not, write to the Free
00027  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00028  */
00029 
00030 #include <gst/gstxml.h>
00031 #include <gstreamermm/object.h>
00032 
00033 
00034 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00035 typedef struct _GstXML GstXML;
00036 typedef struct _GstXMLClass GstXMLClass;
00037 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00038 
00039 
00040 namespace Gst
00041 { class XML_Class; } // namespace Gst
00042 namespace Gst
00043 {
00044 
00045 class Element;
00046 
00047 
00048 class XML : public Object
00049 {
00050   
00051 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00052 
00053 public:
00054   typedef XML CppObjectType;
00055   typedef XML_Class CppClassType;
00056   typedef GstXML BaseObjectType;
00057   typedef GstXMLClass BaseClassType;
00058 
00059 private:  friend class XML_Class;
00060   static CppClassType xml_class_;
00061 
00062 private:
00063   // noncopyable
00064   XML(const XML&);
00065   XML& operator=(const XML&);
00066 
00067 protected:
00068   explicit XML(const Glib::ConstructParams& construct_params);
00069   explicit XML(GstXML* castitem);
00070 
00071 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00072 
00073 public:
00074   virtual ~XML();
00075 
00076 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00077   static GType get_type()      G_GNUC_CONST;
00078   static GType get_base_type() G_GNUC_CONST;
00079 #endif
00080 
00082   GstXML*       gobj()       { return reinterpret_cast<GstXML*>(gobject_); }
00083 
00085   const GstXML* gobj() const { return reinterpret_cast<GstXML*>(gobject_); }
00086 
00088   GstXML* gobj_copy();
00089 
00090 private:
00091 
00092 
00093 protected:
00094   XML();
00095 
00096 public:
00097   
00098   static Glib::RefPtr<XML> create();
00099 
00100 
00107   bool parse_doc(xmlDocPtr doc, const std::string& root);
00108   
00121   bool parse_file(const std::string& filename, const std::string& root);
00122 
00130   bool parse_memory(const std::string& buffer, const std::string& root);
00131 
00132   //Note: gst_xml_get_element() returns a reference.
00133   
00140   Glib::RefPtr<Element> get_element(const std::string& name);
00141   
00148   Glib::RefPtr<const Element> get_element(const std::string& name) const;
00149 
00150  
00157   Glib::ListHandle< Glib::RefPtr<Element> > get_topelements();
00158 
00159  
00166   Glib::ListHandle< Glib::RefPtr<const Element> > get_topelements() const;
00167 
00168   
00174   Glib::SignalProxy2< void,const Glib::RefPtr<Gst::Object>&,xmlNode* > signal_object_loaded();
00175 
00176 
00177 public:
00178 
00179 public:
00180   //C++ methods used to invoke GTK+ virtual functions:
00181 #ifdef GLIBMM_VFUNCS_ENABLED
00182 #endif //GLIBMM_VFUNCS_ENABLED
00183 
00184 protected:
00185   //GTK+ Virtual Functions (override these to change behaviour):
00186 #ifdef GLIBMM_VFUNCS_ENABLED
00187 #endif //GLIBMM_VFUNCS_ENABLED
00188 
00189   //Default Signal Handlers::
00190 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00191   virtual void on_object_loaded(const Glib::RefPtr<Gst::Object>& object, xmlNode* xml_node);
00192 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00193 
00194 
00195 };
00196 
00197 xmlDocPtr write_xml(const Glib::RefPtr<Element>& element);
00198 int write_xml_file(const Glib::RefPtr<Element>& element, const std::string& filename);
00199 Glib::RefPtr<Element> make_element(const xmlNodePtr& xml_node, const Glib::RefPtr<Object>& parent);
00200 
00201 } //namespace Gst
00202 
00203 
00204 namespace Glib
00205 {
00214   Glib::RefPtr<Gst::XML> wrap(GstXML* object, bool take_copy = false);
00215 }
00216 
00217 
00218 #endif /* _GSTREAMERMM_XML_H */
00219 

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