Merged revisions 6293,6296-6306,6308 via svnmerge from
[ardour.git] / libs / glibmm2 / gio / giomm / bufferedoutputstream.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3
4 #include <giomm/bufferedoutputstream.h>
5 #include <giomm/private/bufferedoutputstream_p.h>
6
7 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
8
9 /* Copyright (C) 2008 The gtkmm Development Team
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Library General Public
13  * License as published by the Free Software Foundation; either
14  * version 2 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Library General Public License for more details.
20  *
21  * You should have received a copy of the GNU Library General Public
22  * License along with this library; if not, write to the Free
23  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  */
25
26 #include <gio/gio.h>
27 #include "slot_async.h"
28
29 namespace Gio
30 {
31 Glib::RefPtr<BufferedOutputStream> BufferedOutputStream::create_sized(const Glib::RefPtr<OutputStream>& base_stream, gsize size)
32 {
33     return Glib::RefPtr<Gio::BufferedOutputStream>(new BufferedOutputStream(base_stream, size));
34 }
35
36 }   // namespace Gio
37
38 namespace
39 {
40 } // anonymous namespace
41
42
43 namespace Glib
44 {
45
46 Glib::RefPtr<Gio::BufferedOutputStream> wrap(GBufferedOutputStream* object, bool take_copy)
47 {
48   return Glib::RefPtr<Gio::BufferedOutputStream>( dynamic_cast<Gio::BufferedOutputStream*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
49   //We use dynamic_cast<> in case of multiple inheritance.
50 }
51
52 } /* namespace Glib */
53
54
55 namespace Gio
56 {
57
58
59 /* The *_Class implementation: */
60
61 const Glib::Class& BufferedOutputStream_Class::init()
62 {
63   if(!gtype_) // create the GType if necessary
64   {
65     // Glib::Class has to know the class init function to clone custom types.
66     class_init_func_ = &BufferedOutputStream_Class::class_init_function;
67
68     // This is actually just optimized away, apparently with no harm.
69     // Make sure that the parent type has been created.
70     //CppClassParent::CppObjectType::get_type();
71
72     // Create the wrapper type, with the same class/instance size as the base type.
73     register_derived_type(g_buffered_output_stream_get_type());
74
75     // Add derived versions of interfaces, if the C type implements any interfaces:
76
77   }
78
79   return *this;
80 }
81
82 void BufferedOutputStream_Class::class_init_function(void* g_class, void* class_data)
83 {
84   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
85   CppClassParent::class_init_function(klass, class_data);
86
87 #ifdef GLIBMM_VFUNCS_ENABLED
88 #endif //GLIBMM_VFUNCS_ENABLED
89
90 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
91 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
92 }
93
94 #ifdef GLIBMM_VFUNCS_ENABLED
95 #endif //GLIBMM_VFUNCS_ENABLED
96
97 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
98 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
99
100
101 Glib::ObjectBase* BufferedOutputStream_Class::wrap_new(GObject* object)
102 {
103   return new BufferedOutputStream((GBufferedOutputStream*)object);
104 }
105
106
107 /* The implementation: */
108
109 GBufferedOutputStream* BufferedOutputStream::gobj_copy()
110 {
111   reference();
112   return gobj();
113 }
114
115 BufferedOutputStream::BufferedOutputStream(const Glib::ConstructParams& construct_params)
116 :
117   Gio::FilterOutputStream(construct_params)
118 {
119
120 }
121
122 BufferedOutputStream::BufferedOutputStream(GBufferedOutputStream* castitem)
123 :
124   Gio::FilterOutputStream((GFilterOutputStream*)(castitem))
125 {}
126
127
128 BufferedOutputStream::~BufferedOutputStream()
129 {}
130
131
132 BufferedOutputStream::CppClassType BufferedOutputStream::bufferedoutputstream_class_; // initialize static member
133
134 GType BufferedOutputStream::get_type()
135 {
136   return bufferedoutputstream_class_.init().get_type();
137 }
138
139 GType BufferedOutputStream::get_base_type()
140 {
141   return g_buffered_output_stream_get_type();
142 }
143
144
145 BufferedOutputStream::BufferedOutputStream(const Glib::RefPtr<OutputStream>& base_stream)
146 :
147   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
148   Glib::ObjectBase(0),
149   Gio::FilterOutputStream(Glib::ConstructParams(bufferedoutputstream_class_.init(), "base_stream", const_cast<GOutputStream*>(Glib::unwrap(base_stream)), static_cast<char*>(0)))
150 {
151   
152
153 }
154
155 BufferedOutputStream::BufferedOutputStream(const Glib::RefPtr<OutputStream>& base_stream, gsize size)
156 :
157   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
158   Glib::ObjectBase(0),
159   Gio::FilterOutputStream(Glib::ConstructParams(bufferedoutputstream_class_.init(), "base_stream", const_cast<GOutputStream*>(Glib::unwrap(base_stream)), "size", size, static_cast<char*>(0)))
160 {
161   
162
163 }
164
165 Glib::RefPtr<BufferedOutputStream> BufferedOutputStream::create(const Glib::RefPtr<OutputStream>& base_stream)
166 {
167   return Glib::RefPtr<BufferedOutputStream>( new BufferedOutputStream(base_stream) );
168 }
169 gsize BufferedOutputStream::get_buffer_size() const
170 {
171   return g_buffered_output_stream_get_buffer_size(const_cast<GBufferedOutputStream*>(gobj()));
172 }
173
174 void BufferedOutputStream::set_buffer_size(gsize size)
175 {
176 g_buffered_output_stream_set_buffer_size(gobj(), size); 
177 }
178
179 void BufferedOutputStream::set_auto_grow(bool auto_grow)
180 {
181 g_buffered_output_stream_set_auto_grow(gobj(), static_cast<int>(auto_grow)); 
182 }
183
184 bool BufferedOutputStream::get_auto_grow() const
185 {
186   return g_buffered_output_stream_get_auto_grow(const_cast<GBufferedOutputStream*>(gobj()));
187 }
188
189
190 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
191 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
192
193 #ifdef GLIBMM_VFUNCS_ENABLED
194 #endif //GLIBMM_VFUNCS_ENABLED
195
196
197 } // namespace Gio
198
199