QtGStreamer  0.10.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
gen.cpp
00001 // Autogenerated by the QtGStreamer helper code generator - DO NOT EDIT
00002 /*
00003     Copyright (C) 2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
00004     Copyright (C) 2010 Collabora Ltd.
00005       @author George Kiagiadakis <george.kiagiadakis@collabora.co.uk>
00006 
00007     This library is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU Lesser General Public License as published
00009     by the Free Software Foundation; either version 2.1 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU Lesser General Public License for more details.
00016 
00017     You should have received a copy of the GNU Lesser General Public License
00018     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019 */
00020 
00021 #define INCLUDED_FROM_CODEGEN
00022 #include <boost/static_assert.hpp>
00023 
00024 #define REGISTER_TYPE_IMPLEMENTATION(T, GTYPE) \
00025     namespace QGlib { \
00026         GetTypeImpl<T>::operator Type() { return (GTYPE); } \
00027     }
00028 
00029 #include <glib-object.h>
00030 #include "QGlib/init.h"
00031 
00032 #include "QGlib/signal.h"
00033 
00034 namespace QGlib {
00035     BOOST_STATIC_ASSERT(static_cast<int>(Signal::RunFirst) == static_cast<int>(G_SIGNAL_RUN_FIRST));
00036     BOOST_STATIC_ASSERT(static_cast<int>(Signal::RunLast) == static_cast<int>(G_SIGNAL_RUN_LAST));
00037     BOOST_STATIC_ASSERT(static_cast<int>(Signal::RunCleanup) == static_cast<int>(G_SIGNAL_RUN_CLEANUP));
00038     BOOST_STATIC_ASSERT(static_cast<int>(Signal::NoRecurse) == static_cast<int>(G_SIGNAL_NO_RECURSE));
00039     BOOST_STATIC_ASSERT(static_cast<int>(Signal::Detailed) == static_cast<int>(G_SIGNAL_DETAILED));
00040     BOOST_STATIC_ASSERT(static_cast<int>(Signal::Action) == static_cast<int>(G_SIGNAL_ACTION));
00041     BOOST_STATIC_ASSERT(static_cast<int>(Signal::NoHooks) == static_cast<int>(G_SIGNAL_NO_HOOKS));
00042 }
00043 
00044 #include "QGlib/type.h"
00045 
00046 REGISTER_TYPE_IMPLEMENTATION(QGlib::Type,G_TYPE_GTYPE)
00047 
00048 namespace QGlib {
00049     BOOST_STATIC_ASSERT(static_cast<int>(Type::Invalid) == static_cast<int>(G_TYPE_INVALID));
00050     BOOST_STATIC_ASSERT(static_cast<int>(Type::None) == static_cast<int>(G_TYPE_NONE));
00051     BOOST_STATIC_ASSERT(static_cast<int>(Type::Interface) == static_cast<int>(G_TYPE_INTERFACE));
00052     BOOST_STATIC_ASSERT(static_cast<int>(Type::Char) == static_cast<int>(G_TYPE_CHAR));
00053     BOOST_STATIC_ASSERT(static_cast<int>(Type::Uchar) == static_cast<int>(G_TYPE_UCHAR));
00054     BOOST_STATIC_ASSERT(static_cast<int>(Type::Boolean) == static_cast<int>(G_TYPE_BOOLEAN));
00055     BOOST_STATIC_ASSERT(static_cast<int>(Type::Int) == static_cast<int>(G_TYPE_INT));
00056     BOOST_STATIC_ASSERT(static_cast<int>(Type::Uint) == static_cast<int>(G_TYPE_UINT));
00057     BOOST_STATIC_ASSERT(static_cast<int>(Type::Long) == static_cast<int>(G_TYPE_LONG));
00058     BOOST_STATIC_ASSERT(static_cast<int>(Type::Ulong) == static_cast<int>(G_TYPE_ULONG));
00059     BOOST_STATIC_ASSERT(static_cast<int>(Type::Int64) == static_cast<int>(G_TYPE_INT64));
00060     BOOST_STATIC_ASSERT(static_cast<int>(Type::Uint64) == static_cast<int>(G_TYPE_UINT64));
00061     BOOST_STATIC_ASSERT(static_cast<int>(Type::Enum) == static_cast<int>(G_TYPE_ENUM));
00062     BOOST_STATIC_ASSERT(static_cast<int>(Type::Flags) == static_cast<int>(G_TYPE_FLAGS));
00063     BOOST_STATIC_ASSERT(static_cast<int>(Type::Float) == static_cast<int>(G_TYPE_FLOAT));
00064     BOOST_STATIC_ASSERT(static_cast<int>(Type::Double) == static_cast<int>(G_TYPE_DOUBLE));
00065     BOOST_STATIC_ASSERT(static_cast<int>(Type::String) == static_cast<int>(G_TYPE_STRING));
00066     BOOST_STATIC_ASSERT(static_cast<int>(Type::Pointer) == static_cast<int>(G_TYPE_POINTER));
00067     BOOST_STATIC_ASSERT(static_cast<int>(Type::Boxed) == static_cast<int>(G_TYPE_BOXED));
00068     BOOST_STATIC_ASSERT(static_cast<int>(Type::Param) == static_cast<int>(G_TYPE_PARAM));
00069     BOOST_STATIC_ASSERT(static_cast<int>(Type::Object) == static_cast<int>(G_TYPE_OBJECT));
00070 }
00071 
00072 #include "QGlib/global.h"
00073 
00074 #include "QGlib/refpointer.h"
00075 
00076 #include "QGlib/string_p.h"
00077 
00078 #include "QGlib/error.h"
00079 
00080 #include "QGlib/object.h"
00081 
00082 REGISTER_TYPE_IMPLEMENTATION(QGlib::Object,G_TYPE_OBJECT)
00083 
00084 REGISTER_TYPE_IMPLEMENTATION(QGlib::Interface,G_TYPE_INTERFACE)
00085 
00086 namespace QGlib {
00087   QGlib::RefCountedObject *Object_new(void *instance)
00088   {
00089     QGlib::Object *cppClass = new QGlib::Object;
00090     cppClass->m_object = instance;
00091     return cppClass;
00092   }
00093 } //namespace QGlib
00094 
00095 namespace QGlib {
00096   QGlib::RefCountedObject *Interface_new(void *instance)
00097   {
00098     QGlib::Interface *cppClass = new QGlib::Interface;
00099     cppClass->m_object = instance;
00100     return cppClass;
00101   }
00102 } //namespace QGlib
00103 
00104 #include "QGlib/value.h"
00105 
00106 REGISTER_TYPE_IMPLEMENTATION(QGlib::Value,G_TYPE_VALUE)
00107 
00108 #include "QGlib/connect.h"
00109 
00110 
00111 #include "QGlib/quark.h"
00112 
00113 #include "QGlib/wrap.h"
00114 
00115 #include "QGlib/paramspec.h"
00116 
00117 REGISTER_TYPE_IMPLEMENTATION(QGlib::ParamSpec,G_TYPE_PARAM)
00118 
00119 REGISTER_TYPE_IMPLEMENTATION(QGlib::ParamSpec::ParamFlags,G_TYPE_PARAM_FLAGS)
00120 
00121 namespace QGlib {
00122   QGlib::RefCountedObject *ParamSpec_new(void *instance)
00123   {
00124     QGlib::ParamSpec *cppClass = new QGlib::ParamSpec;
00125     cppClass->m_object = instance;
00126     return cppClass;
00127   }
00128 } //namespace QGlib
00129 
00130 namespace QGlib {
00131     BOOST_STATIC_ASSERT(static_cast<int>(ParamSpec::Readable) == static_cast<int>(G_PARAM_READABLE));
00132     BOOST_STATIC_ASSERT(static_cast<int>(ParamSpec::Writable) == static_cast<int>(G_PARAM_WRITABLE));
00133     BOOST_STATIC_ASSERT(static_cast<int>(ParamSpec::ReadWrite) == static_cast<int>(G_PARAM_READWRITE));
00134     BOOST_STATIC_ASSERT(static_cast<int>(ParamSpec::Construct) == static_cast<int>(G_PARAM_CONSTRUCT));
00135     BOOST_STATIC_ASSERT(static_cast<int>(ParamSpec::ConstructOnly) == static_cast<int>(G_PARAM_CONSTRUCT_ONLY));
00136     BOOST_STATIC_ASSERT(static_cast<int>(ParamSpec::LaxValidation) == static_cast<int>(G_PARAM_LAX_VALIDATION));
00137     BOOST_STATIC_ASSERT(static_cast<int>(ParamSpec::Deprecated) == static_cast<int>(G_PARAM_DEPRECATED));
00138 }
00139 
00140 namespace QGlib {
00141 namespace Private {
00142   void registerWrapperConstructors()
00143   {
00144     QGlib::Quark q = g_quark_from_static_string("QGlib__wrapper_constructor");
00145     QGlib::GetType<Object>().setQuarkData(q, reinterpret_cast<void*>(&Object_new));
00146     QGlib::GetType<Interface>().setQuarkData(q, reinterpret_cast<void*>(&Interface_new));
00147     QGlib::GetType<ParamSpec>().setQuarkData(q, reinterpret_cast<void*>(&ParamSpec_new));
00148   }
00149 } //namespace Private
00150 } //namespace QGlib
00151