~ubuntu-branches/ubuntu/utopic/glib2.0/utopic

« back to all changes in this revision

Viewing changes to docs/reference/gobject/tmpl/value_collection.sgml

Tags: upstream-2.12.12
ImportĀ upstreamĀ versionĀ 2.12.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!-- ##### SECTION Title ##### -->
 
2
Varargs Value Collection
 
3
 
 
4
<!-- ##### SECTION Short_Description ##### -->
 
5
Converting varargs to generic values
 
6
 
 
7
<!-- ##### SECTION Long_Description ##### -->
 
8
<para>
 
9
The macros in this section provide the varargs parsing support needed
 
10
in variadic GObject functions such as g_object_new() or g_object_set().
 
11
They currently support the collection of integral types, floating point 
 
12
types and pointers.
 
13
</para>
 
14
 
 
15
<!-- ##### SECTION See_Also ##### -->
 
16
<para>
 
17
#GValueTable
 
18
</para>
 
19
 
 
20
<!-- ##### SECTION Stability_Level ##### -->
 
21
 
 
22
 
 
23
<!-- ##### UNION GTypeCValue ##### -->
 
24
<para>
 
25
A union holding one collected value.
 
26
</para>
 
27
 
 
28
 
 
29
<!-- ##### MACRO G_VALUE_COLLECT ##### -->
 
30
<para>
 
31
Collects a variable argument value from a va_list. We have to
 
32
implement the varargs collection as a macro, because on some systems
 
33
va_list variables cannot be passed by reference.
 
34
</para>
 
35
 
 
36
@value: a #GValue return location. @value is supposed to be initialized 
 
37
  according to the value type to be collected
 
38
@var_args: the va_list variable; it may be evaluated multiple times
 
39
@flags: flags which are passed on to the collect_value() function of
 
40
  the #GTypeValueTable of @value.
 
41
@__error: a #gchar** variable that will be modified to hold a g_new()
 
42
  allocated error messages if something fails
 
43
 
 
44
 
 
45
<!-- ##### MACRO G_VALUE_LCOPY ##### -->
 
46
<para>
 
47
Collects a value's variable argument locations from a va_list. 
 
48
</para>
 
49
 
 
50
@value: a #GValue return location. @value is supposed to be initialized 
 
51
  according to the value type to be collected
 
52
@var_args: the va_list variable; it may be evaluated multiple times
 
53
@flags: flags which are passed on to the lcopy_value() function of
 
54
  the #GTypeValueTable of @value.
 
55
@__error: a #gchar** variable that will be modified to hold a g_new()
 
56
  allocated error messages if something fails
 
57
 
 
58
 
 
59
<!-- ##### MACRO G_VALUE_COLLECT_FORMAT_MAX_LENGTH ##### -->
 
60
<para>
 
61
The maximal number of #GTypeCValue<!-- -->s which can be collected for a 
 
62
single #GValue.
 
63
</para>
 
64
 
 
65
 
 
66