- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List

# 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 /* gstreamermm - a C++ wrapper for gstreamer
    00010  *
    00011  * Copyright 2008 The gstreamermm Development Team
    00012  *
    00013  * This library is free software; you can redistribute it and/or
    00014  * modify it under the terms of the GNU Lesser General Public
    00015  * License as published by the Free Software Foundation; either
    00016  * version 2.1 of the License, or (at your option) any later version.
    00017  *
    00018  * This library is distributed in the hope that it will be useful,
    00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00021  * Lesser General Public License for more details.
    00022  *
    00023  * You should have received a copy of the GNU Lesser General Public
    00024  * License along with this library; if not, write to the Free
    00025  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    00026  */
    00027
    00028 #include <gst/gstxml.h>
    00029 #include <gstreamermm/object.h>
    00030 #include <libxml++/document.h>
    00031
    00032
    00033 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00034 typedef struct _GstXML GstXML;
    00035 typedef struct _GstXMLClass GstXMLClass;
    00036 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00037
    00038
    00039 namespace Gst
    00040 { class XML_Class; } // namespace Gst
    00041 namespace Gst
    00042 {
    00043
    00044 class Element;
    00045
    00056 class XML : public Object
    00057 {
    00058
    00059 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00060
    00061 public:
    00062   typedef XML CppObjectType;
    00063   typedef XML_Class CppClassType;
    00064   typedef GstXML BaseObjectType;
    00065   typedef GstXMLClass BaseClassType;
    00066
    00067 private:  friend class XML_Class;
    00068   static CppClassType xml_class_;
    00069
    00070 private:
    00071   // noncopyable
    00072   XML(const XML&);
    00073   XML& operator=(const XML&);
    00074
    00075 protected:
    00076   explicit XML(const Glib::ConstructParams& construct_params);
    00077   explicit XML(GstXML* castitem);
    00078
    00079 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00080
    00081 public:
    00082   virtual ~XML();
    00083
    00084 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00085   static GType get_type()      G_GNUC_CONST;
    00086   static GType get_base_type() G_GNUC_CONST;
    00087 #endif
    00088
    00090   GstXML*       gobj()       { return reinterpret_cast<GstXML*>(gobject_); }
    00091
    00093   const GstXML* gobj() const { return reinterpret_cast<GstXML*>(gobject_); }
    00094
    00096   GstXML* gobj_copy();
    00097
    00098 private:
    00099
    00100
    00101 protected:
    00102   XML();
    00103
    00104 public:
    00109   static Glib::RefPtr<XML> create();
    00110
    00111
    00116   static xmlDocPtr write(const Glib::RefPtr<const Gst::Element>& element);
    00117
    00124   static void write_to_stream(const Glib::RefPtr<const Gst::Element>& element, std::ostream& out);
    00125
    00126
    00133   bool parse_doc(xmlpp::Document* doc, Glib::ustring& root);
    00134
    00147   bool parse_file(const std::string& filename, const Glib::ustring& root);
    00148
    00156   bool parse_memory(const std::string& buffer, const Glib::ustring& root);
    00157
    00158
    00165   Glib::RefPtr<Gst::Element> get_element(const Glib::ustring& name);
    00166
    00173   Glib::RefPtr<const Gst::Element> get_element(const Glib::ustring& name) const;
    00174
    00175
    00182   Glib::ListHandle< Glib::RefPtr<Gst::Element> > get_topelements();
    00183
    00184
    00191   Glib::ListHandle< Glib::RefPtr<const Gst::Element> > get_topelements() const;
    00192
    00193
    00199   static Glib::RefPtr<Gst::Element> make_element(xmlpp::Node* curr, const Glib::RefPtr<Gst::Object>& parent);
    00200
    00201
    00204   //TODO: use xmlpp::Node for second parameter?
    00205
    00211   Glib::SignalProxy2< void,const Glib::RefPtr<Gst::Object>&,xmlNodePtr > signal_object_loaded();
    00212
    00213
    00214 public:
    00215
    00216 public:
    00217   //C++ methods used to invoke GTK+ virtual functions:
    00218 #ifdef GLIBMM_VFUNCS_ENABLED
    00219 #endif //GLIBMM_VFUNCS_ENABLED
    00220
    00221 protected:
    00222   //GTK+ Virtual Functions (override these to change behaviour):
    00223 #ifdef GLIBMM_VFUNCS_ENABLED
    00224 #endif //GLIBMM_VFUNCS_ENABLED
    00225
    00226   //Default Signal Handlers::
    00227 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00228   virtual void on_object_loaded(const Glib::RefPtr<Gst::Object>& object, xmlNodePtr xml_node);
    00229 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00230
    00231
    00232 };
    00233
    00234 } //namespace Gst
    00235
    00236
    00237 namespace Glib
    00238 {
    00247   Glib::RefPtr<Gst::XML> wrap(GstXML* object, bool take_copy = false);
    00248 }
    00249
    00250
    00251 #endif /* _GSTREAMERMM_XML_H */
    00252