Gocator Development Kit
 All Classes Files Functions Variables Typedefs Friends Modules Pages
GdkToolCfg.h
Go to the documentation of this file.
1 /**
2 * @file GdkToolCfg.h
3 * @brief Declares the GdkToolCfg class.
4 *
5 * Copyright (C) 2015-2022 by LMI Technologies Inc. All rights reserved.
6 */
7 #ifndef GDK_TOOL_CFG_H
8 #define GDK_TOOL_CFG_H
9 
13 #include <Gdk/Config/GdkParams.h>
14 
15 #include <Gdk/GdkDef.h>
16 
17 /**
18 * Represents the configuration instance for a tool.
19 * Where the GdkToolInfo is used to define the tool class, the GdkToolCfg
20 * is used to interface with the instance of the corresponding tool class.
21 *
22 * @class GdkToolCfg
23 * @ingroup Gdk-Config
24 */
25 typedef kPointer GdkToolCfg;
26 
27 /**
28 * Returns the tool name.
29 *
30 * @public @memberof GdkToolCfg
31 * @param config Configuration object.
32 * @return Pointer to type name.
33 */
34 GdkFx(const kChar*) GdkToolCfg_Name(GdkToolCfg config);
35 
36 /**
37 * Set the data source used by the tool.
38 *
39 * This function should be called only during configuration initialization.
40 *
41 * @public @memberof GdkToolCfg
42 * @param config Configuration object.
43 * @param source Data source.
44 * @return Operation status.
45 */
47 
48 /**
49 * Returns the data source used by the tool.
50 *
51 * @public @memberof GdkToolCfg
52 * @param config Configuration object.
53 * @return Data source.
54 */
56 
57 /**
58 * Set the anchor source used by the tool.
59 *
60 * This function should be called only during configuration initialization.
61 *
62 * @public @memberof GdkToolCfg
63 * @param config Configuration object.
64 * @param axis Anchoring parameter - axis or angle.
65 * @param id ID of source measurement.
66 * @return Operation status.
67 */
69 
70 /**
71 * Returns the anchor source used by the tool.
72 *
73 * @public @memberof GdkToolCfg
74 * @param config Configuration object.
75 * @param axis Anchoring parameter - axis or angle.
76 * @return ID of source measurement.
77 */
78 GdkFx(k32s) GdkToolCfg_Anchor(GdkToolCfg config, GdkAnchorParam axis);
79 
80 /**
81 * Returns user-defined parameter set.
82 *
83 * @public @memberof GdkToolCfg
84 * @param config Configuration object.
85 * @return Parameter set.
86 */
88 
89 /**
90 * Add a new measurement to the tool.
91 *
92 * @public @memberof GdkToolCfg
93 * @param config Configuration object.
94 * @param type Type name of the measurement.
95 * @param measurementCfg Pointer to receive the new measurement.
96 * @return Operation status.
97 */
98 GdkFx(kStatus) GdkToolCfg_AddMeasurement(GdkToolCfg config, const kChar* type, GdkMeasurementCfg* measurementCfg);
99 
100 /**
101 * Returns the number of measurements in the tool.
102 *
103 * @public @memberof GdkToolCfg
104 * @return Number of measurements.
105 */
107 
108 /**
109 * Returns the measurement at an index.
110 *
111 * @public @memberof GdkToolCfg
112 * @param config Configuration object.
113 * @param index Index of measurement.
114 * @return Measurement handle.
115 */
117 
118 /**
119 * Removes the measurement at an index.
120 *
121 * @public @memberof GdkToolCfg
122 * @param config Configuration object.
123 * @param index Index of measurement.
124 * @return Operation status.
125 */
127 
128 /**
129 * Add a new feature to the tool.
130 *
131 * @public @memberof GdkToolCfg
132 * @param config Configuration object.
133 * @param type Type of the feature.
134 * @param featureCfg Pointer to receive the new feature.
135 * @return Operation status.
136 */
137 GdkFx(kStatus) GdkToolCfg_AddFeature(GdkToolCfg config, const kChar* type, GdkFeatureCfg* featureCfg);
138 
139 /**
140 * Returns the number of features in the tool.
141 *
142 * @public @memberof GdkToolCfg
143 * @return Number of features.
144 */
146 
147 /**
148 * Returns the feature at an index.
149 *
150 * @public @memberof GdkToolCfg
151 * @param config Configuration object.
152 * @param index Index of feature.
153 * @return Feature handle.
154 */
155 GdkFx(GdkFeatureCfg) GdkToolCfg_FeatureAt(GdkToolCfg config, kSize index);
156 
157 /**
158 * Removes the feature at an index.
159 *
160 * @public @memberof GdkToolCfg
161 * @param config Configuration object.
162 * @param index Index of feature.
163 * @return Operation status.
164 */
165 GdkFx(kStatus) GdkToolCfg_RemoveFeature(GdkToolCfg config, kSize index);
166 
167 /**
168 * Add a new data output to the tool.
169 *
170 * @public @memberof GdkToolCfg
171 * @param config Configuration object.
172 * @param type Type of the data output.
173 * @param dataOutputCfg Pointer to receive the new data outpout.
174 * @return Operation status.
175 */
176 GdkFx(kStatus) GdkToolCfg_AddToolDataOutput(GdkToolCfg config, const kChar* type, GdkToolDataOutputCfg* dataOutputCfg);
177 
178 /**
179 * Returns the number of data outputs in the tool.
180 *
181 * @public @memberof GdkToolCfg
182 * @return Number of data outputs.
183 */
185 
186 /**
187 * Returns the data output at an index.
188 *
189 * @public @memberof GdkToolCfg
190 * @param config Configuration object.
191 * @param index Index of data output.
192 * @return Tool data handle.
193 */
195 
196 /**
197 * Removes the tool data output at an index.
198 *
199 * @public @memberof GdkToolCfg
200 * @param config Configuration object.
201 * @param index Index of output.
202 * @return Operation status.
203 */
205 
206 /**
207 * Returns the version of the configuration.
208 *
209 * @public @memberof GdkToolCfg
210 * @param config Configuration object.
211 * @return Config version.
212 */
213 GdkFx(const kChar*) GdkToolCfg_Version(GdkToolCfg config);
214 
215 /**
216 * Returns whether the version not set.
217 *
218 * @public @memberof GdkToolCfg
219 * @param config Configuration object.
220 * @return Flag indicating whether the version is set.
221 */
223 
224 /**
225 * Returns the parameter at an index.
226 *
227 * @public @memberof GdkToolCfg
228 * @param config Configuration object.
229 * @param index Index of parameter.
230 * @return Parameter handle.
231 */
232 GdkFx(GdkParam) GdkToolCfg_ParameterAt(GdkToolCfg config, kSize index);
233 
234 /**
235 * Returns the parameter matching the name passed.
236 *
237 * @public @memberof GdkToolCfg
238 * @param config Configuration object.
239 * @param name Name of parameter.
240 * @return Matching parameter handle or kNULL if not found
241 */
242 GdkFx(GdkParam) GdkToolCfg_FindParameter(GdkToolCfg config, const kChar *name);
243 
244 /**
245 * Returns the count of parameters in the tool.
246 *
247 * @public @memberof GdkToolCfg
248 * @return Number of parameters.
249 */
251 
252 /**
253 * Returns the count of outputs in the tool.
254 *
255 * @public @memberof GdkToolCfg
256 * @param config Configuration object.
257 * @return Number of outputs currently instantiated in the tool.
258 */
260 
261 /**
262 * Returns the output of the tool at the index.
263 *
264 * @public @memberof GdkToolCfg
265 * @param config Configuration object.
266 * @param index Index of all the outputs (unified index).
267 * @return Output data handle corresponding to the index which could be one of
268 * GdkMeasurementCfg, GdkFeatureCfg or GdkToolDataOutputCfg.
269 */
271 
272 #endif
Represents configuration for a tool data output.
Essential Gdk declarations.
Represents configuration for a feature.
GdkToolDataOutputCfg GdkToolCfg_ToolDataOutputAt(GdkToolCfg config, kSize index)
Returns the data output at an index.
GdkMeasurementCfg GdkToolCfg_MeasurementAt(GdkToolCfg config, kSize index)
Returns the measurement at an index.
GdkToolOutputCfg GdkToolCfg_OutputAt(GdkToolCfg config, kSize index)
Returns the output of the tool at the index.
Declares the GdkFeatureCfg class.
Represents configuration for a measurement.
kStatus GdkToolCfg_AddToolDataOutput(GdkToolCfg config, const kChar *type, GdkToolDataOutputCfg *dataOutputCfg)
Add a new data output to the tool.
kStatus GdkToolCfg_AddFeature(GdkToolCfg config, const kChar *type, GdkFeatureCfg *featureCfg)
Add a new feature to the tool.
GdkParam GdkToolCfg_FindParameter(GdkToolCfg config, const kChar *name)
Returns the parameter matching the name passed.
kStatus GdkToolCfg_RemoveMeasurement(GdkToolCfg config, kSize index)
Removes the measurement at an index.
Declares the GdkMeasurementCfg class.
kSize GdkToolCfg_ToolDataOutputCount(GdkToolCfg config)
Returns the number of data outputs in the tool.
const kChar * GdkToolCfg_Name(GdkToolCfg config)
Returns the tool name.
Represents the configuration output object base class.
kStatus GdkToolCfg_AddMeasurement(GdkToolCfg config, const kChar *type, GdkMeasurementCfg *measurementCfg)
Add a new measurement to the tool.
Represents a data source selection.
Declares the GdkParams class.
Represents a set of parameters.
kStatus GdkToolCfg_RemoveToolDataOutput(GdkToolCfg config, kSize index)
Removes the tool data output at an index.
k32s GdkToolCfg_Anchor(GdkToolCfg config, GdkAnchorParam axis)
Returns the anchor source used by the tool.
kStatus GdkToolCfg_SetSource(GdkToolCfg config, GdkDataSource source)
Set the data source used by the tool.
kSize GdkToolCfg_MeasurementCount(GdkToolCfg config)
Returns the number of measurements in the tool.
kBool GdkToolCfg_VersionUnknown(GdkToolCfg config)
Returns whether the version not set.
GdkParams GdkToolCfg_Parameters(GdkToolCfg config)
Returns user-defined parameter set.
GdkFeatureCfg GdkToolCfg_FeatureAt(GdkToolCfg config, kSize index)
Returns the feature at an index.
const kChar * GdkToolCfg_Version(GdkToolCfg config)
Returns the version of the configuration.
kStatus GdkToolCfg_SetAnchor(GdkToolCfg config, GdkAnchorParam axis, k32s id)
Set the anchor source used by the tool.
Declares the GdkToolDataOutputCfg class.
kSize GdkToolCfg_FeatureCount(GdkToolCfg config)
Returns the number of features in the tool.
kSize GdkToolCfg_OutputCount(GdkToolCfg config)
Returns the count of outputs in the tool.
Represents the data of a configurable parameter.
GdkParam GdkToolCfg_ParameterAt(GdkToolCfg config, kSize index)
Returns the parameter at an index.
GdkDataSource GdkToolCfg_Source(GdkToolCfg config)
Returns the data source used by the tool.
Represents the configuration instance for a tool.
Represents anchor parameter source selections.
kSize GdkToolCfg_ParameterCount(GdkToolCfg config)
Returns the count of parameters in the tool.
kStatus GdkToolCfg_RemoveFeature(GdkToolCfg config, kSize index)
Removes the feature at an index.