- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# 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
    00087
    00088   static GType get_base_type() G_GNUC_CONST;
    00089 #endif
    00090
    00092   GstXML*       gobj()       { return reinterpret_cast<GstXML*>(gobject_); }
    00093
    00095   const GstXML* gobj() const { return reinterpret_cast<GstXML*>(gobject_); }
    00096
    00098   GstXML* gobj_copy();
    00099
    00100 private:
    00101
    00102
    00103 protected:
    00104   XML();
    00105
    00106 public:
    00111   static Glib::RefPtr<XML> create();
    00112
    00113
    00118   static xmlDocPtr write(const Glib::RefPtr<const Gst::Element>& element);
    00119
    00126   static void write_to_stream(const Glib::RefPtr<const Gst::Element>& element, std::ostream& out);
    00127
    00128
    00135   bool parse_doc(xmlpp::Document* doc, Glib::ustring& root);
    00136
    00149   bool parse_file(const std::string& filename, const Glib::ustring& root);
    00150
    00158   bool parse_memory(const std::string& buffer, const Glib::ustring& root);
    00159
    00160
    00167   Glib::RefPtr<Gst::Element> get_element(const Glib::ustring& name);
    00168
    00175   Glib::RefPtr<const Gst::Element> get_element(const Glib::ustring& name) const;
    00176
    00177
    00184   Glib::ListHandle< Glib::RefPtr<Gst::Element> > get_topelements();
    00185
    00186
    00193   Glib::ListHandle< Glib::RefPtr<const Gst::Element> > get_topelements() const;
    00194
    00195
    00201   static Glib::RefPtr<Gst::Element> make_element(xmlpp::Node* curr, const Glib::RefPtr<Gst::Object>& parent);
    00202
    00203
    00206   //TODO: use xmlpp::Node for second parameter?
    00207
    00213   Glib::SignalProxy2< void,const Glib::RefPtr<Gst::Object>&,xmlNodePtr > signal_object_loaded();
    00214
    00215
    00216 public:
    00217
    00218 public:
    00219   //C++ methods used to invoke GTK+ virtual functions:
    00220 #ifdef GLIBMM_VFUNCS_ENABLED
    00221 #endif //GLIBMM_VFUNCS_ENABLED
    00222
    00223 protected:
    00224   //GTK+ Virtual Functions (override these to change behaviour):
    00225 #ifdef GLIBMM_VFUNCS_ENABLED
    00226 #endif //GLIBMM_VFUNCS_ENABLED
    00227
    00228   //Default Signal Handlers::
    00229 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00230   virtual void on_object_loaded(const Glib::RefPtr<Gst::Object>& object, xmlNodePtr xml_node);
    00231 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00232
    00233
    00234 };
    00235
    00236 } //namespace Gst
    00237
    00238
    00239 namespace Glib
    00240 {
    00249   Glib::RefPtr<Gst::XML> wrap(GstXML* object, bool take_copy = false);
    00250 }
    00251
    00252
    00253 #endif /* _GSTREAMERMM_XML_H */
    00254