1 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 /* Copyright (C) 2007 The gtkmm Development Team
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #ifdef GLIBMM_EXCEPTIONS_ENABLED
26 bool DataOutputStream::put_byte(guchar data)
28 bool DataOutputStream::put_byte(guchar data, std::auto_ptr<Glib::Error>& error)
29 #endif //GLIBMM_EXCEPTIONS_ENABLED
32 guchar retvalue = g_data_output_stream_put_byte(gobj(), data, NULL, &(gerror));
33 #ifdef GLIBMM_EXCEPTIONS_ENABLED
35 ::Glib::Error::throw_exception(gerror);
38 error = ::Glib::Error::throw_exception(gerror);
39 #endif //GLIBMM_EXCEPTIONS_ENABLED
44 #ifdef GLIBMM_EXCEPTIONS_ENABLED
45 bool DataOutputStream::put_int16(gint16 data)
47 bool DataOutputStream::put_int16(gint16 data, std::auto_ptr<Glib::Error>& error)
48 #endif //GLIBMM_EXCEPTIONS_ENABLED
51 gint16 retvalue = g_data_output_stream_put_int16(gobj(), data, NULL, &(gerror));
52 #ifdef GLIBMM_EXCEPTIONS_ENABLED
54 ::Glib::Error::throw_exception(gerror);
57 error = ::Glib::Error::throw_exception(gerror);
58 #endif //GLIBMM_EXCEPTIONS_ENABLED
63 #ifdef GLIBMM_EXCEPTIONS_ENABLED
64 bool DataOutputStream::put_uint16(guint16 data)
66 bool DataOutputStream::put_uint16(guint16 data, std::auto_ptr<Glib::Error>& error)
67 #endif //GLIBMM_EXCEPTIONS_ENABLED
70 guint16 retvalue = g_data_output_stream_put_uint16(gobj(), data, NULL, &(gerror));
71 #ifdef GLIBMM_EXCEPTIONS_ENABLED
73 ::Glib::Error::throw_exception(gerror);
76 error = ::Glib::Error::throw_exception(gerror);
77 #endif //GLIBMM_EXCEPTIONS_ENABLED
82 #ifdef GLIBMM_EXCEPTIONS_ENABLED
83 bool DataOutputStream::put_int32(gint32 data)
85 bool DataOutputStream::put_int32(gint32 data, std::auto_ptr<Glib::Error>& error)
86 #endif //GLIBMM_EXCEPTIONS_ENABLED
89 gint32 retvalue = g_data_output_stream_put_int32(gobj(), data, NULL, &(gerror));
90 #ifdef GLIBMM_EXCEPTIONS_ENABLED
92 ::Glib::Error::throw_exception(gerror);
95 error = ::Glib::Error::throw_exception(gerror);
96 #endif //GLIBMM_EXCEPTIONS_ENABLED
101 #ifdef GLIBMM_EXCEPTIONS_ENABLED
102 bool DataOutputStream::put_uint32(guint32 data)
104 bool DataOutputStream::put_uint32(guint32 data, std::auto_ptr<Glib::Error>& error)
105 #endif //GLIBMM_EXCEPTIONS_ENABLED
108 guint32 retvalue = g_data_output_stream_put_uint32(gobj(), data, NULL, &(gerror));
109 #ifdef GLIBMM_EXCEPTIONS_ENABLED
111 ::Glib::Error::throw_exception(gerror);
114 error = ::Glib::Error::throw_exception(gerror);
115 #endif //GLIBMM_EXCEPTIONS_ENABLED
120 #ifdef GLIBMM_EXCEPTIONS_ENABLED
121 bool DataOutputStream::put_int64(gint64 data)
123 bool DataOutputStream::put_int64(gint64 data, std::auto_ptr<Glib::Error>& error)
124 #endif //GLIBMM_EXCEPTIONS_ENABLED
127 gint64 retvalue = g_data_output_stream_put_int64(gobj(), data, NULL, &(gerror));
128 #ifdef GLIBMM_EXCEPTIONS_ENABLED
130 ::Glib::Error::throw_exception(gerror);
133 error = ::Glib::Error::throw_exception(gerror);
134 #endif //GLIBMM_EXCEPTIONS_ENABLED
139 #ifdef GLIBMM_EXCEPTIONS_ENABLED
140 bool DataOutputStream::put_uint64(guint64 data)
142 bool DataOutputStream::put_uint64(guint64 data, std::auto_ptr<Glib::Error>& error)
143 #endif //GLIBMM_EXCEPTIONS_ENABLED
146 guint64 retvalue = g_data_output_stream_put_uint64(gobj(), data, NULL, &(gerror));
147 #ifdef GLIBMM_EXCEPTIONS_ENABLED
149 ::Glib::Error::throw_exception(gerror);
152 error = ::Glib::Error::throw_exception(gerror);
153 #endif //GLIBMM_EXCEPTIONS_ENABLED
158 #ifdef GLIBMM_EXCEPTIONS_ENABLED
159 bool DataOutputStream::put_string(std::string str)
161 bool DataOutputStream::put_string(std::string str, std::auto_ptr<Glib::Error>& error)
162 #endif //GLIBMM_EXCEPTIONS_ENABLED
165 bool retval = g_data_output_stream_put_string(gobj(),
169 #ifdef GLIBMM_EXCEPTIONS_ENABLED
171 ::Glib::Error::throw_exception(gerror);
174 error = ::Glib::Error::throw_exception(gerror);
175 #endif //GLIBMM_EXCEPTIONS_ENABLED