1 // Generated by gmmproc 2.64.2 -- DO NOT MODIFY!
2 
3 
4 #include <glibmm.h>
5 
6 #include <giomm/charsetconverter.h>
7 #include <giomm/private/charsetconverter_p.h>
8 
9 
10 /* Copyright (C) 2012 The giomm Development Team
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
24  */
25 
26 #include <gio/gio.h>
27 
28 namespace Gio
29 {
30 
CharsetConverter(const Glib::ustring & to_charset,const Glib::ustring & from_charset)31 CharsetConverter::CharsetConverter(
32   const Glib::ustring& to_charset, const Glib::ustring& from_charset)
33 : // Mark this class as non-derived to allow C++ vfuncs to be skipped.
34   Glib::ObjectBase(nullptr),
35   Glib::Object(Glib::ConstructParams(charsetconverter_class_.init(), "to-charset",to_charset.c_str(),"from-charset",from_charset.c_str(), nullptr))
36 {
37 }
38 
39 } // namespace Gio
40 
41 namespace
42 {
43 } // anonymous namespace
44 
45 
46 namespace Glib
47 {
48 
wrap(GCharsetConverter * object,bool take_copy)49 Glib::RefPtr<Gio::CharsetConverter> wrap(GCharsetConverter* object, bool take_copy)
50 {
51   return Glib::RefPtr<Gio::CharsetConverter>( dynamic_cast<Gio::CharsetConverter*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
52   //We use dynamic_cast<> in case of multiple inheritance.
53 }
54 
55 } /* namespace Glib */
56 
57 
58 namespace Gio
59 {
60 
61 
62 /* The *_Class implementation: */
63 
init()64 const Glib::Class& CharsetConverter_Class::init()
65 {
66   if(!gtype_) // create the GType if necessary
67   {
68     // Glib::Class has to know the class init function to clone custom types.
69     class_init_func_ = &CharsetConverter_Class::class_init_function;
70 
71     // This is actually just optimized away, apparently with no harm.
72     // Make sure that the parent type has been created.
73     //CppClassParent::CppObjectType::get_type();
74 
75     // Create the wrapper type, with the same class/instance size as the base type.
76     register_derived_type(g_charset_converter_get_type());
77 
78     // Add derived versions of interfaces, if the C type implements any interfaces:
79   Converter::add_interface(get_type());
80 
81   }
82 
83   return *this;
84 }
85 
86 
class_init_function(void * g_class,void * class_data)87 void CharsetConverter_Class::class_init_function(void* g_class, void* class_data)
88 {
89   const auto klass = static_cast<BaseClassType*>(g_class);
90   CppClassParent::class_init_function(klass, class_data);
91 
92 
93 }
94 
95 
wrap_new(GObject * object)96 Glib::ObjectBase* CharsetConverter_Class::wrap_new(GObject* object)
97 {
98   return new CharsetConverter((GCharsetConverter*)object);
99 }
100 
101 
102 /* The implementation: */
103 
gobj_copy()104 GCharsetConverter* CharsetConverter::gobj_copy()
105 {
106   reference();
107   return gobj();
108 }
109 
CharsetConverter(const Glib::ConstructParams & construct_params)110 CharsetConverter::CharsetConverter(const Glib::ConstructParams& construct_params)
111 :
112   Glib::Object(construct_params)
113 {
114 
115 }
116 
CharsetConverter(GCharsetConverter * castitem)117 CharsetConverter::CharsetConverter(GCharsetConverter* castitem)
118 :
119   Glib::Object((GObject*)(castitem))
120 {}
121 
122 
CharsetConverter(CharsetConverter && src)123 CharsetConverter::CharsetConverter(CharsetConverter&& src) noexcept
124 : Glib::Object(std::move(src))
125   , Converter(std::move(src))
126 {}
127 
operator =(CharsetConverter && src)128 CharsetConverter& CharsetConverter::operator=(CharsetConverter&& src) noexcept
129 {
130   Glib::Object::operator=(std::move(src));
131   Converter::operator=(std::move(src));
132   return *this;
133 }
134 
135 
~CharsetConverter()136 CharsetConverter::~CharsetConverter() noexcept
137 {}
138 
139 
140 CharsetConverter::CppClassType CharsetConverter::charsetconverter_class_; // initialize static member
141 
get_type()142 GType CharsetConverter::get_type()
143 {
144   return charsetconverter_class_.init().get_type();
145 }
146 
147 
get_base_type()148 GType CharsetConverter::get_base_type()
149 {
150   return g_charset_converter_get_type();
151 }
152 
153 
create(const Glib::ustring & to_charset,const Glib::ustring & from_charset)154 Glib::RefPtr<CharsetConverter> CharsetConverter::create(const Glib::ustring& to_charset, const Glib::ustring& from_charset)
155 {
156   return Glib::RefPtr<CharsetConverter>( new CharsetConverter(to_charset, from_charset) );
157 }
158 
set_use_fallback(bool use_fallback)159 void CharsetConverter::set_use_fallback(bool use_fallback)
160 {
161   g_charset_converter_set_use_fallback(gobj(), static_cast<int>(use_fallback));
162 }
163 
get_use_fallback() const164 bool CharsetConverter::get_use_fallback() const
165 {
166   return g_charset_converter_get_use_fallback(const_cast<GCharsetConverter*>(gobj()));
167 }
168 
get_num_fallbacks() const169 guint CharsetConverter::get_num_fallbacks() const
170 {
171   return g_charset_converter_get_num_fallbacks(const_cast<GCharsetConverter*>(gobj()));
172 }
173 
174 
property_from_charset() const175 Glib::PropertyProxy_ReadOnly< Glib::ustring > CharsetConverter::property_from_charset() const
176 {
177   return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "from-charset");
178 }
179 
property_to_charset() const180 Glib::PropertyProxy_ReadOnly< Glib::ustring > CharsetConverter::property_to_charset() const
181 {
182   return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "to-charset");
183 }
184 
property_use_fallback()185 Glib::PropertyProxy< bool > CharsetConverter::property_use_fallback()
186 {
187   return Glib::PropertyProxy< bool >(this, "use-fallback");
188 }
189 
property_use_fallback() const190 Glib::PropertyProxy_ReadOnly< bool > CharsetConverter::property_use_fallback() const
191 {
192   return Glib::PropertyProxy_ReadOnly< bool >(this, "use-fallback");
193 }
194 
195 
196 } // namespace Gio
197 
198 
199