Debian Codegraph @

gstreamer/src/valuelist.ccg

raw
1 /* gstreamermm - a C++ wrapper for gstreamer
2 *
3 * Copyright 2008 The gstreamermm Development Team
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
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 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser 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.
18 */
19
20 namespace Gst
21 {
22
23 ValueList::ValueList()
24 {}
25
26 // static
27 GType ValueList::get_type()
28 {
29 return GST_TYPE_LIST;
30 }
31
32 guint ValueList::size() const
33 {
34 return gst_value_list_get_size(gobj());
35 }
36
37 bool ValueList::get(guint index, Glib::ValueBase& value) const
38 {
39 const GValue* g_value = gst_value_list_get_value(gobj(), index);
40
41 if(g_value)
42 {
43 value.init(g_value);
44 return true;
45 }
46 else
47 return false;
48 }
49
50 Gst::ValueList& ValueList::append(const Glib::ValueBase& value)
51 {
52 gst_value_list_append_value(gobj(), value.gobj());
53 return *this;
54 }
55
56 Gst::ValueList& ValueList::prepend(const Glib::ValueBase& value)
57 {
58 gst_value_list_prepend_value(gobj(), value.gobj());
59 return *this;
60 }
61
62
63 } // Glib namespace