~ubuntu-branches/ubuntu/karmic/mergeant/karmic

« back to all changes in this revision

Viewing changes to doc/libmergeant/C/tmpl/mg-context.sgml

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo R. Montesino
  • Date: 2007-11-29 08:44:48 UTC
  • mfrom: (2.1.4 hardy)
  • Revision ID: james.westby@ubuntu.com-20071129084448-6aon73d22bv6hzfw
Tags: 0.67-3
* Re-enable installation of the mime files in mergeant.install
* mergeant.dirs: create usr/share/mime/packages to make dh_installmime add
  the update-mime-database code snippets

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!-- ##### SECTION Title ##### -->
2
 
MgContext
3
 
 
4
 
<!-- ##### SECTION Short_Description ##### -->
5
 
Manages all the #MgParameter objects required to execute a query
6
 
 
7
 
<!-- ##### SECTION Long_Description ##### -->
8
 
<para>
9
 
Some queries require arguments before they can be executed. For such queries, the arguments are passed using 
10
 
#MgParameter objects (the list of parameters can be obtained using mg_entity_get_parameters()). 
11
 
The #MgContext object removes the hassle
12
 
of managing these #MgParameter objects. For a query, a #MgContext can be obtained using the 
13
 
mg_entity_get_exec_context() function.
14
 
</para>
15
 
<para>
16
 
Each #MgContext object then provides two lists to be used by the programmer: the 'parameters' list which is a simple
17
 
copy of the parameters list given as argument to mg_context_new(), and the 'nodes' list which is a list of
18
 
#MgContextNode structures created by the #MgContext object. These two lists should not be modified.
19
 
</para>
20
 
 
21
 
<!-- ##### SECTION See_Also ##### -->
22
 
<para>
23
 
 
24
 
</para>
25
 
 
26
 
<!-- ##### STRUCT MgContext ##### -->
27
 
<para>
28
 
 
29
 
</para>
30
 
 
31
 
 
32
 
<!-- ##### SIGNAL MgContext::param-changed ##### -->
33
 
<para>
34
 
 
35
 
</para>
36
 
 
37
 
@mgcontext: the object which received the signal.
38
 
@arg1: 
39
 
 
40
 
<!-- ##### ARG MgContext:prop ##### -->
41
 
<para>
42
 
 
43
 
</para>
44
 
 
45
 
<!-- ##### STRUCT MgContextNode ##### -->
46
 
<para>
47
 
The #MgContext object creates a list of #MgContextNode structures which in a way "sort" the #MgParameter objects.
48
 
Each #MgParameter can either be a "free fill" parameter (which means any value is acceptable as long as it is
49
 
of the requested data type), or can depend on a list of values provided by a single #MgQfield object within a query.
50
 
</para>
51
 
<para>
52
 
Each #MgContextNode structure groups one or more parameters:
53
 
<itemizedlist>
54
 
<listitem><para>exactly one #MgParameter object if that parameter is a "free fill" parameter</para></listitem>
55
 
<listitem><para>a list of one or more #MgParameter objects if all the parameters in the list are dependant
56
 
on values of a common SELECT Query</para></listitem>
57
 
</itemizedlist>
58
 
</para>
59
 
 
60
 
@param: a pointer to the #MgParameter if it is a "free fill" parameter
61
 
@query: a pointer to the #MgQuery regulating the possible values of the parameters listed in the @params attribute
62
 
@params: the list of #MgParameter objects which are regulated by the @query query
63
 
@params_pos_in_query: a #GHashTable which holds, for each parameter in @params, the position in @query's resultset of the values which are acceptable for the parameter.
64
 
 
65
 
<!-- ##### FUNCTION mg_context_get_type ##### -->
66
 
<para>
67
 
 
68
 
</para>
69
 
 
70
 
@Returns: 
71
 
 
72
 
 
73
 
<!-- ##### FUNCTION mg_context_new ##### -->
74
 
<para>
75
 
 
76
 
</para>
77
 
 
78
 
@conf: 
79
 
@params: 
80
 
@Returns: 
81
 
 
82
 
 
83
 
<!-- ##### FUNCTION mg_context_new_copy ##### -->
84
 
<para>
85
 
 
86
 
</para>
87
 
 
88
 
@orig: 
89
 
@copy_params: 
90
 
@replacements: 
91
 
@Returns: 
92
 
 
93
 
 
94
 
<!-- ##### FUNCTION mg_context_add_param ##### -->
95
 
<para>
96
 
 
97
 
</para>
98
 
 
99
 
@context: 
100
 
@param: 
101
 
 
102
 
 
103
 
<!-- ##### FUNCTION mg_context_merge_context_params ##### -->
104
 
<para>
105
 
 
106
 
</para>
107
 
 
108
 
@context: 
109
 
@context_to_merge: 
110
 
 
111
 
 
112
 
<!-- ##### FUNCTION mg_context_is_coherent ##### -->
113
 
<para>
114
 
 
115
 
</para>
116
 
 
117
 
@context: 
118
 
@error: 
119
 
@Returns: 
120
 
 
121
 
 
122
 
<!-- ##### FUNCTION mg_context_is_valid ##### -->
123
 
<para>
124
 
 
125
 
</para>
126
 
 
127
 
@context: 
128
 
@Returns: 
129
 
 
130
 
 
131
 
<!-- ##### FUNCTION mg_context_needs_user_input ##### -->
132
 
<para>
133
 
 
134
 
</para>
135
 
 
136
 
@context: 
137
 
@Returns: 
138
 
 
139
 
 
140
 
<!-- ##### FUNCTION mg_context_find_parameter_for_field ##### -->
141
 
<para>
142
 
 
143
 
</para>
144
 
 
145
 
@context: 
146
 
@for_field: 
147
 
@Returns: 
148
 
 
149
 
 
150
 
<!-- ##### FUNCTION mg_context_find_node_for_param ##### -->
151
 
<para>
152
 
 
153
 
</para>
154
 
 
155
 
@context: 
156
 
@param: 
157
 
@Returns: 
158
 
 
159
 
 
160
 
<!-- ##### FUNCTION mg_context_set_param_default_value ##### -->
161
 
<para>
162
 
 
163
 
</para>
164
 
 
165
 
@context: 
166
 
@param: 
167
 
@value: 
168
 
 
169
 
 
170
 
<!-- ##### FUNCTION mg_context_set_param_default_alias ##### -->
171
 
<para>
172
 
 
173
 
</para>
174
 
 
175
 
@context: 
176
 
@param: 
177
 
@alias: 
178
 
 
179
 
 
180
 
<!-- ##### FUNCTION mg_context_get_param_default_value ##### -->
181
 
<para>
182
 
 
183
 
</para>
184
 
 
185
 
@context: 
186
 
@param: 
187
 
@Returns: 
188
 
 
189