Gocator Development Kit
 All Classes Files Functions Variables Typedefs Friends Modules Pages
GdkParamInfo.h
Go to the documentation of this file.
1 /**
2 * @file GdkParamInfo.h
3 * @brief Declares the GdkParamInfo class.
4 *
5 * Copyright (C) 2015 by LMI Technologies Inc. All rights reserved.
6 */
7 #ifndef GDK_EXT_PARAM_INFO_H
8 #define GDK_EXT_PARAM_INFO_H
9 
10 #include <Gdk/GdkDef.h>
11 
12 kBeginHeader()
13 
14 /**
15 * Represents the schema of a configurable parameter.
16 *
17 * @class GdkParamInfo
18 * @extends kObject
19 * @ingroup Gdk-Config
20 */
21 typedef kObject GdkParamInfo;
22 kDeclareClass(Gdk, GdkParamInfo, kObject)
23 
24 /**
25 * @struct GdkParamType
26 * @extends kValue
27 * @ingroup Gdk-Config
28 * @brief Type of a parameter.
29 */
30 typedef k32s GdkParamType;
31 
32 /** @relates GdkParamType @{ */
33 #define GDK_PARAM_TYPE_INT (0) ///< Integer.
34 #define GDK_PARAM_TYPE_FLOAT (1) ///< Float.
35 #define GDK_PARAM_TYPE_BOOL (2) ///< Boolean.
36 #define GDK_PARAM_TYPE_STRING (3) ///< String.
37 #define GDK_PARAM_TYPE_PROFILE_REGION (4) ///< Profile region.
38 #define GDK_PARAM_TYPE_SURFACE_REGION (5) ///< Surface region.
39 #define GDK_PARAM_TYPE_SURFACE_REGION_2D (6) ///< Surface 2D region (X and Y).
40 /** @} */
41 
42 /**
43 * Returns the parameter type.
44 *
45 * @public @memberof GdkParamInfo
46 * @param info Info object.
47 * @return Parameter type.
48 */
49 GdkFx(GdkParamType) GdkParamInfo_Type(GdkParamInfo info);
50 
51 /**
52 * Sets the name of the parameter.
53 *
54 * @public @memberof GdkParamInfo
55 * @param info Info object.
56 * @param name Parameter name.
57 * @return Operation status.
58 */
59 GdkFx(kStatus) GdkParamInfo_SetName(GdkParamInfo info, const kChar* name);
60 
61 /**
62 * Returns the name of the parameter.
63 *
64 * @public @memberof GdkParamInfo
65 * @param info Info object.
66 * @return Parameter name.
67 */
68 GdkFx(const kChar*) GdkParamInfo_Name(GdkParamInfo info);
69 
70 /**
71 * Sets a parameter to be optional or not. An optional parameter can be
72 * missing from the configuration (e.g. when loaded from storage).
73 *
74 * @public @memberof GdkParamInfo
75 * @param info Info object.
76 * @param optional Whether or not parameter is optional.
77 * @return Operation status.
78 */
79 GdkFx(kStatus) GdkParamInfo_SetIsOptional(GdkParamInfo info, kBool optional);
80 
81 /**
82 * Returns whether or not the parameter is optional.
83 *
84 * @public @memberof GdkParamInfo
85 * @param info Info object.
86 * @return Is optional.
87 */
88 GdkFx(kBool) GdkParamInfo_IsOptional(GdkParamInfo info);
89 
90 /**
91 * Sets the display label of the parameter.
92 *
93 * @public @memberof GdkParamInfo
94 * @param info Info object.
95 * @param label Parameter label.
96 * @return Operation status.
97 */
98 GdkFx(kStatus) GdkParamInfo_SetLabel(GdkParamInfo info, const kChar* label);
99 
100 /**
101 * Returns the display label of the parameter.
102 *
103 * @public @memberof GdkParamInfo
104 * @param info Info object.
105 * @return Parameter label.
106 */
107 GdkFx(const kChar*) GdkParamInfo_Label(GdkParamInfo info);
108 
109 /**
110 * Sets the units of the parameter.
111 *
112 * It is optional to specify the units.
113 *
114 * @public @memberof GdkParamInfo
115 * @param info Info object.
116 * @param units Parameter units.
117 * @return Operation status.
118 */
119 GdkFx(kStatus) GdkParamInfo_SetUnits(GdkParamInfo info, const kChar* units);
120 
121 /**
122 * Returns the units of the parameter.
123 *
124 * @public @memberof GdkParamInfo
125 * @param info Info object.
126 * @return Parameter units (empty string if not set).
127 */
128 GdkFx(const kChar*) GdkParamInfo_Units(GdkParamInfo info);
129 
130 /**
131 * Returns the number of options for the parameter.
132 *
133 * @public @memberof GdkParamInfo
134 * @param info Info object.
135 * @return Number of options.
136 */
137 GdkFx(kSize) GdkParamInfo_OptionCount(GdkParamInfo info);
138 
139 /**
140 * Returns the option name at a specified index.
141 *
142 * @public @memberof GdkParamInfo
143 * @param info Info object.
144 * @param index Option index.
145 * @return Option name.
146 */
147 GdkFx(const kChar*) GdkParamInfo_OptionNameAt(GdkParamInfo info, kSize index);
148 
149 /**
150 * Remove the option at a specified index.
151 *
152 * @public @memberof GdkParamInfo
153 * @param info Info object.
154 * @param index Option index.
155 * @return Operation status.
156 */
157 GdkFx(kStatus) GdkParamInfo_RemoveOption(GdkParamInfo info, kSize index);
158 
159 /**
160 * Clears all options for the parameter.
161 *
162 * @public @memberof GdkParamInfo
163 * @param info Info object.
164 * @return Operation status.
165 */
166 GdkFx(kStatus) GdkParamInfo_ClearOptions(GdkParamInfo info);
167 
168 /**
169 * Sets the minimum value for an integer parameter.
170 *
171 * @public @memberof GdkParamInfo
172 * @param info Info object.
173 * @param min Minimum value.
174 * @return Operation status.
175 */
176 GdkFx(kStatus) GdkParamInfo_SetMinInt(GdkParamInfo info, k32s min);
177 
178 /**
179 * Returns the minimum value for an integer parameter.
180 *
181 * @public @memberof GdkParamInfo
182 * @param info Info object.
183 * @return Minimum value.
184 */
185 GdkFx(k32s) GdkParamInfo_MinInt(GdkParamInfo info);
186 
187 /**
188 * Sets the maximum value for an integer parameter.
189 *
190 * @public @memberof GdkParamInfo
191 * @param info Info object.
192 * @param max Maximum value.
193 * @return Operation status.
194 */
195 GdkFx(kStatus) GdkParamInfo_SetMaxInt(GdkParamInfo info, k32s max);
196 
197 /**
198 * Returns the maximum value for an integer parameter.
199 *
200 * @public @memberof GdkParamInfo
201 * @param info Info object.
202 * @return Maximum value.
203 */
204 GdkFx(k32s) GdkParamInfo_MaxInt(GdkParamInfo info);
205 
206 /**
207 * Add an option for an integer parameter.
208 *
209 * @public @memberof GdkParamInfo
210 * @param info Info object.
211 * @param option Option value.
212 * @param name Option name.
213 * @return Operation status.
214 */
215 GdkFx(kStatus) GdkParamInfo_AddOptionInt(GdkParamInfo info, k32s option, const kChar* name);
216 
217 /**
218 * Returns the option at a specified index for an integer parameter.
219 *
220 * @public @memberof GdkParamInfo
221 * @param info Info object.
222 * @param index Option index.
223 * @return Option value.
224 */
225 GdkFx(k32s) GdkParamInfo_OptionAtInt(GdkParamInfo info, kSize index);
226 
227 /**
228 * Sets the minimum value for a decimal parameter.
229 *
230 * @public @memberof GdkParamInfo
231 * @param info Info object.
232 * @param min Minimum value.
233 * @return Operation status.
234 */
235 GdkFx(kStatus) GdkParamInfo_SetMinFloat(GdkParamInfo info, k64f min);
236 
237 /**
238 * Returns the minimum value for a decimal parameter.
239 *
240 * @public @memberof GdkParamInfo
241 * @param info Info object.
242 * @return Minimum value.
243 */
244 GdkFx(k64f) GdkParamInfo_MinFloat(GdkParamInfo info);
245 
246 /**
247 * Sets the maximum value for a decimal parameter.
248 *
249 * @public @memberof GdkParamInfo
250 * @param info Info object.
251 * @param max Maximum value.
252 * @return Operation status.
253 */
254 GdkFx(kStatus) GdkParamInfo_SetMaxFloat(GdkParamInfo info, k64f max);
255 
256 /**
257 * Returns the maximum value for a decimal parameter.
258 *
259 * @public @memberof GdkParamInfo
260 * @param info Info object.
261 * @return Maximum value.
262 */
263 GdkFx(k64f) GdkParamInfo_MaxFloat(GdkParamInfo info);
264 
265 GdkFx(kStatus) GdkParamInfo_SetDefault(GdkParamInfo info, const void* value);
266 
267 kEndHeader()
268 
269 #endif
Essential Gdk declarations.
kStatus GdkParamInfo_AddOptionInt(GdkParamInfo info, k32s option, const kChar *name)
Add an option for an integer parameter.
k64f GdkParamInfo_MaxFloat(GdkParamInfo info)
Returns the maximum value for a decimal parameter.
kSize GdkParamInfo_OptionCount(GdkParamInfo info)
Returns the number of options for the parameter.
kStatus GdkParamInfo_ClearOptions(GdkParamInfo info)
Clears all options for the parameter.
kStatus GdkParamInfo_SetUnits(GdkParamInfo info, const kChar *units)
Sets the units of the parameter.
const kChar * GdkParamInfo_Name(GdkParamInfo info)
Returns the name of the parameter.
k32s GdkParamInfo_OptionAtInt(GdkParamInfo info, kSize index)
Returns the option at a specified index for an integer parameter.
kStatus GdkParamInfo_SetMaxInt(GdkParamInfo info, k32s max)
Sets the maximum value for an integer parameter.
Represents the schema of a configurable parameter.
kStatus GdkParamInfo_RemoveOption(GdkParamInfo info, kSize index)
Remove the option at a specified index.
const kChar * GdkParamInfo_Label(GdkParamInfo info)
Returns the display label of the parameter.
const kChar * GdkParamInfo_Units(GdkParamInfo info)
Returns the units of the parameter.
kStatus GdkParamInfo_SetMinFloat(GdkParamInfo info, k64f min)
Sets the minimum value for a decimal parameter.
kStatus GdkParamInfo_SetMinInt(GdkParamInfo info, k32s min)
Sets the minimum value for an integer parameter.
kStatus GdkParamInfo_SetLabel(GdkParamInfo info, const kChar *label)
Sets the display label of the parameter.
const kChar * GdkParamInfo_OptionNameAt(GdkParamInfo info, kSize index)
Returns the option name at a specified index.
kBool GdkParamInfo_IsOptional(GdkParamInfo info)
Returns whether or not the parameter is optional.
k64f GdkParamInfo_MinFloat(GdkParamInfo info)
Returns the minimum value for a decimal parameter.
kStatus GdkParamInfo_SetName(GdkParamInfo info, const kChar *name)
Sets the name of the parameter.
GdkParamType GdkParamInfo_Type(GdkParamInfo info)
Returns the parameter type.
kStatus GdkParamInfo_SetMaxFloat(GdkParamInfo info, k64f max)
Sets the maximum value for a decimal parameter.
k32s GdkParamInfo_MinInt(GdkParamInfo info)
Returns the minimum value for an integer parameter.
k32s GdkParamInfo_MaxInt(GdkParamInfo info)
Returns the maximum value for an integer parameter.
Type of a parameter.
Definition: GdkParamInfo.h:22
kStatus GdkParamInfo_SetIsOptional(GdkParamInfo info, kBool optional)
Sets a parameter to be optional or not.