1
// Generated by gtkmmproc -- DO NOT MODIFY!
6
#include <libgdamm/quarklist.h>
7
#include <libgdamm/private/quarklist_p.h>
14
* Copyright 2001 Free Software Foundation
16
* This library is free software; you can redistribute it and/or
17
* modify it under the terms of the GNU Lesser General Public
18
* License as published by the Free Software Foundation; either
19
* version 2.1 of the License, or (at your option) any later version.
21
* This library is distributed in the hope that it will be useful,
22
* but WITHOUT ANY WARRANTY; without even the implied warranty of
23
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24
* Lesser General Public License for more details.
26
* You should have received a copy of the GNU Lesser General Public
27
* License along with this library; if not, write to the Free
28
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
31
#include <libgda/gda-quark-list.h>
35
static void quarklist_foreach_callback(gpointer ckey, gpointer cvalue, void* data)
39
Gnome::Gda::QuarkList::ForeachSlot& slot = *static_cast<Gnome::Gda::QuarkList::ForeachSlot*>(data);
40
Glib::ustring key(static_cast<gchar*>(ckey));
41
Glib::ustring value(static_cast<gchar*>(cvalue));
47
Glib::exception_handlers_invoke();
58
void QuarkList::foreach(const QuarkList::ForeachSlot& slot)
60
ForeachSlot slot_copy (slot);
61
gda_quark_list_foreach(gobj(), &quarklist_foreach_callback, &slot_copy);
70
} // anonymous namespace
76
Gnome::Gda::QuarkList wrap(GdaQuarkList* object, bool take_copy)
78
return Gnome::Gda::QuarkList(object, take_copy);
92
GType QuarkList::get_type()
94
return gda_quark_list_get_type();
97
QuarkList::QuarkList()
99
gobject_ (gda_quark_list_new())
102
QuarkList::QuarkList(const QuarkList& other)
104
gobject_ ((other.gobject_) ? gda_quark_list_copy(other.gobject_) : 0)
107
QuarkList::QuarkList(GdaQuarkList* gobject, bool make_a_copy)
109
// For BoxedType wrappers, make_a_copy is true by default. The static
110
// BoxedType wrappers must always take a copy, thus make_a_copy = true
111
// ensures identical behaviour if the default argument is used.
112
gobject_ ((make_a_copy && gobject) ? gda_quark_list_copy(gobject) : gobject)
115
QuarkList& QuarkList::operator=(const QuarkList& other)
117
QuarkList temp (other);
122
QuarkList::~QuarkList()
125
gda_quark_list_free(gobject_);
128
void QuarkList::swap(QuarkList& other)
130
GdaQuarkList *const temp = gobject_;
131
gobject_ = other.gobject_;
132
other.gobject_ = temp;
135
GdaQuarkList* QuarkList::gobj_copy() const
137
return gda_quark_list_copy(gobject_);
141
void QuarkList::clear()
143
gda_quark_list_clear(gobj());
146
void QuarkList::add_from_string(const Glib::ustring& name, bool cleanup)
148
gda_quark_list_add_from_string(gobj(), name.c_str(), static_cast<int>(cleanup));
151
Glib::ustring QuarkList::find(const Glib::ustring& name) const
153
return Glib::convert_const_gchar_ptr_to_ustring(gda_quark_list_find(const_cast<GdaQuarkList*>(gobj()), name.c_str()));
156
void QuarkList::remove(const Glib::ustring& name)
158
gda_quark_list_remove(gobj(), name.c_str());