Gocator Development Kit
 All Classes Files Functions Variables Typedefs Friends Modules Pages
GdkToolInfo.h
Go to the documentation of this file.
1 /**
2 * @file GdkToolInfo.h
3 * @brief Declares the GdkToolInfo class.
4 *
5 * Copyright (C) 2015-2022 by LMI Technologies Inc. All rights reserved.
6 */
7 #ifndef GDK_TOOL_INFO_H
8 #define GDK_TOOL_INFO_H
9 
10 #include <Gdk/GdkDef.h>
17 
18 /**
19 * Describes a tool type which is essentially the class description
20 * of the tool to be used to instantiate instances of the tool.
21 *
22 * @class GdkToolInfo
23 * @extends kObject
24 * @ingroup Gdk-Tools
25 */
26 typedef kObject GdkToolInfo;
28 
29 /**
30 * Sets the tool type name.
31 *
32 * @public @memberof GdkToolInfo
33 * @param info Info object.
34 * @param name Type name.
35 * @return Operation status.
36 */
37 GdkFx(kStatus) GdkToolInfo_SetTypeName(GdkToolInfo info, const kChar* name);
38 
39 /**
40 * Returns the tool type name.
41 *
42 * @public @memberof GdkToolInfo
43 * @param info Info object.
44 * @return Type name.
45 */
46 GdkFx(const kChar*) GdkToolInfo_TypeName(GdkToolInfo info);
47 
48 /**
49 * Enable or disable auto versioning. When disabled, the version is set to "1" if not already set.
50 *
51 * @public @memberof GdkToolVersionInfo
52 * @param info Info object.
53 * @param enable Enable or disable.
54 * @return Params info.
55 */
57 
58 /**
59 * Sets the version name explicitly.
60 *
61 * When using multiple versions, this sets the name of the version at index 0.
62 *
63 * @public @memberof GdkToolInfo
64 * @param info Info object.
65 * @param name Version name.
66 * @return Operation status.
67 */
68 GdkFx(kStatus) GdkToolInfo_SetVersionName(GdkToolInfo info, const kChar* name);
69 
70 /**
71 * Sets the tool display label.
72 *
73 * @public @memberof GdkToolInfo
74 * @param info Info object.
75 * @param label Display label.
76 * @return Operation status.
77 */
78 GdkFx(kStatus) GdkToolInfo_SetLabel(GdkToolInfo info, const kChar* label);
79 
80 /**
81 * Returns the tool display label.
82 *
83 * @public @memberof GdkToolInfo
84 * @param info Info object.
85 * @return Display label.
86 */
87 GdkFx(const kChar*) GdkToolInfo_Label(GdkToolInfo info);
88 
89 /**
90 * Adds the data source type accepted by the tool.
91 *
92 * @public @memberof GdkToolInfo
93 * @param info Info object.
94 * @param type Data source type.
95 * @return Operation status.
96 */
98 
99 /**
100 * Add an option to the list of acceptable data sources.
101 *
102 * @public @memberof GdkToolInfo
103 * @param info Info object.
104 * @param source Data source option.
105 * @return Data type.
106 */
108 
109 /**
110 * Enables or disables anchoring capability for a specified anchoring parameter.
111 *
112 * @public @memberof GdkToolInfo
113 * @param info Info object.
114 * @param axis Anchoring parameter - axis or angle.
115 * @param enabled Enabled state.
116 * @return Operation status.
117 */
119 
120 /**
121 * Checks anchoring capability for a specified anchoring parameter.
122 *
123 * @public @memberof GdkToolInfo
124 * @param info Info object.
125 * @param axis Anchoring parameter - axis or angle.
126 * @return Whether or not anchoring capability is enabled.
127 */
129 
130 /**
131 * Returns the schema for the parameters.
132 *
133 * @public @memberof GdkToolInfo
134 * @param info Info object.
135 * @return Params info.
136 */
138 
139 /**
140 * Marks the tool as requiring a tool-license
141 *
142 * @private @memberof GdkToolInfo
143 * @param info info object
144 * @param requiresLicense Boolean: Does the tool require a license?
145 * @return Status of operation
146 */
147 GdkFx(kStatus) GdkToolInfo_SetRequiresLicense(GdkToolInfo info, kBool requiresLicense);
148 
149 /**
150 * Returns true if the tool requires a tool license
151 *
152 * @private @memberof GdkToolInfo
153 * @param info info object
154 * @return kTRUE if tool requires a license
155 */
156 GdkFx(kBool) GdkToolInfo_RequiresLicense(GdkToolInfo info);
157 
158 /**
159 * Adds a data output type to a tool with the specified data type
160 
161 * @public @memberof GdkToolInfo
162 * @param info Info object.
163 * @param dataType Tool data output type of type GdkDataType. The following types are supported:
164 * - #GDK_DATA_TYPE_MEASUREMENT
165 * - #GDK_DATA_TYPE_FEATURE_POINT
166 * - #GDK_DATA_TYPE_FEATURE_LINE
167 * - #GDK_DATA_TYPE_FEATURE_CIRCLE
168 * - #GDK_DATA_TYPE_FEATURE_PLANE
169 * - #GDK_DATA_TYPE_UNIFORM_PROFILE
170 * - #GDK_DATA_TYPE_UNIFORM_SURFACE
171 * - #GDK_DATA_TYPE_SURFACE_POINT_CLOUD
172 * - #GDK_DATA_TYPE_PROFILE_POINT_CLOUD
173 * - #GDK_DATA_TYPE_MESH
174 * - #GDK_DATA_TYPE_GENERIC_BASE to N
175 * @param name Name of the output type.
176 * @param label Label of the output.
177 * @param outputInfo Pointer to receive the new data output's info object.
178 * It is based on the dataType and should be one of the following:
179 * GdkMeasurementInfo
180 * GdkFeatureInfo
181 * GdkToolDataOutputInfo
182 * @return Operation status.
183 */
184 GdkFx(kStatus) GdkToolInfo_AddOutput(GdkToolInfo info, GdkDataType dataType, const kChar* name, const kChar* label, GdkOutputInfo *outputInfo);
185 
186 /**
187 * Adds an input data set to a tool with the specified data type
188 
189 * @public @memberof GdkToolInfo
190 * @param info Info object.
191 * @param dataType Tool data output type of type GdkDataType. The following types are supported:
192 * - #GDK_DATA_TYPE_FEATURE_POINT
193 * - #GDK_DATA_TYPE_FEATURE_LINE
194 * - #GDK_DATA_TYPE_FEATURE_CIRCLE
195 * - #GDK_DATA_TYPE_FEATURE_PLANE
196 * - #GDK_DATA_TYPE_UNIFORM_PROFILE
197 * - #GDK_DATA_TYPE_PROFILE_POINT_CLOUD
198 * - #GDK_DATA_TYPE_UNIFORM_SURFACE
199 * - #GDK_DATA_TYPE_SURFACE_POINT_CLOUD
200 * - #GDK_DATA_TYPE_MESH
201 * - #GDK_DATA_TYPE_GENERIC_BASE to N
202 * @param name Name of the input type.
203 * @param label Label of the input. If kNULL, will be set to same as name parameter
204 * @param paramInfo Pointer to receive the new input data set's param info object.
205 * @return Operation status.
206 */
207 GdkFx(kStatus) GdkToolInfo_AddInput(GdkToolInfo info, GdkDataType dataType, const kChar* name, const kChar* label, GdkParamInfo *paramInfo);
208 
209 /**
210 * Adds a parameter to a tool
211 
212 * @public @memberof GdkToolInfo
213 * @param info Info object.
214 * @param paramType Tool parameter type. The following types are supported:
215 * - #GDK_PARAM_TYPE_INT
216 * - #GDK_PARAM_TYPE_FLOAT
217 * - #GDK_PARAM_TYPE_BOOL
218 * - #GDK_PARAM_TYPE_STRING
219 * - #GDK_PARAM_TYPE_PROFILE_REGION
220 * - #GDK_PARAM_TYPE_SURFACE_REGION
221 * - #GDK_PARAM_TYPE_SURFACE_REGION_2D
222 * - #GDK_PARAM_TYPE_POINT_SET_REGION
223 * @param name Name of the parameter.
224 * @param label Label of the param. If kNULL, will be set to same as name parameter
225 * @param defValue Pointer to the default value to set the parameter. This depends on the paramType passed.
226 * @param paramInfo Pointer to receive the new input data set's paramInfo object.
227 * @return Operation status.
228 */
229 GdkFx(kStatus) GdkToolInfo_AddParam(GdkToolInfo info, GdkParamType paramType, const kChar* name, const kChar* label, const void* defValue, GdkParamInfo *paramInfo);
230 
231 /**
232 * Adds a tool configuration version.
233 *
234 * @public @memberof GdkToolInfo
235 * @param info Info object.
236 * @param name Version name (can be empty string).
237 * @param newVersion Pointer to receive new version object.
238 * @return Operation status.
239 */
240 GdkFx(kStatus) GdkToolInfo_AddVersion(GdkToolInfo info, const kChar* name, GdkToolVersionInfo* newVersion);
241 
242 /**
243 * Returns the number of version objects. Note that this always at least 1.
244 *
245 * @public @memberof GdkToolInfo
246 * @param info Info object.
247 * @return Number of version objects.
248 */
250 
251 /**
252 * Returns the version object at the specified index.
253 *
254 * @public @memberof GdkToolInfo
255 * @param info Info object.
256 * @param index Index of version object.
257 * @return Version object at index.
258 */
260 
261 /**
262 * Return the default version object. This is the version information that is
263 * used when a new tool is instantiated.
264 *
265 * @public @memberof GdkToolInfo
266 * @param info Info object.
267 * @return Version object.
268 */
270 
271 /**
272 * Sets the default version object.
273 *
274 * @public @memberof GdkToolInfo
275 * @param info Info object.
276 * @param version Version object that should be used as the default for new tool instances.
277 * @return Operation status.
278 */
280 
281 GdkFx(GdkToolFormat) GdkToolInfo_Format(GdkToolInfo info);
282 
283 
284 //// Deprecated API functions
285 
286 /**
287 * [Deprecated] Use GdkToolInfo_AddSourceType() instead.
288 *
289 * Sets the data source type accepted by the tool.
290 *
291 * @deprecated
292 * @public @memberof GdkToolInfo
293 * @param info Info object.
294 * @param type Data source type.
295 * @return Operation status.
296 */
298 
299 /**
300 * [Deprecated] Use GdkToolInfo_AddOutput() instead.
301 *
302 * Add a measurement type.
303 *
304 * @deprecated
305 * @public @memberof GdkToolInfo
306 * @param info Info object.
307 * @param type Measurement type name (should be unique within the tool).
308 * @param measurementInfo Pointer to receive the new measurement info.
309 * @return Operation status.
310 */
311 GdkFx(kStatus) GdkToolInfo_AddMeasurement(GdkToolInfo info, const kChar* type, GdkMeasurementInfo* measurementInfo);
312 
313 /**
314 * [Deprecated] Use GdkTool_MeasurementIndexByType() to retrieve index of outputs instead.
315 *
316 * Returns the number of measurement types.
317 *
318 * @deprecated
319 * @public @memberof GdkToolInfo
320 * @param info Info object.
321 * @return Measurement type count.
322 */
324 
325 /**
326 * [Deprecated] Use GdkToolInfo_AddOutput() instead.
327 *
328 * Add a feature type.
329 *
330 * @deprecated
331 * @public @memberof GdkToolInfo
332 * @param info Info object.
333 * @param type Feature Type String
334 * @param dataType Feature data type (Point, Circle, etc).
335 * @param featureInfo Pointer to receive the new feature info.
336 * @return Operation status.
337 */
338 GdkFx(kStatus) GdkToolInfo_AddFeature(GdkToolInfo info, const kChar* type, GdkFeatureDataType dataType, GdkFeatureInfo* featureInfo);
339 
340 /**
341 * [Deprecated] Use GdkTool_FeatureIndexByType() to retrieve index of outputs instead.
342 *
343 * Returns the number of feature types.
344 *
345 * @deprecated
346 * @public @memberof GdkToolInfo
347 * @param info Info object.
348 * @return Feature type count.
349 */
351 
352 /**
353 * [Deprecated] Use GdkToolInfo_AddOutput() instead.
354 *
355 * Adds a tool data output to a tool with the specified index
356 *
357 * @deprecated
358 * @public @memberof GdkToolInfo
359 * @param info Info object.
360 * @param name Tool data output name.
361 * @param dataType Tool data type of the output.
362 * @param tdOutputInfo Pointer to receive the new tool data output's info.
363 * @return Operation status.
364 */
365 GdkFx(kStatus) GdkToolInfo_AddToolDataOutput(GdkToolInfo info, const kChar* name, GdkDataType dataType, GdkToolDataOutputInfo* tdOutputInfo);
366 
367 /**
368 * [Deprecated] Use GdkTool_DataOutputIndexByType() to retrieve index of outputs instead.
369 *
370 * Returns the number of tool data outputs.
371 *
372 * @deprecated
373 * @public @memberof GdkToolInfo
374 * @param info Info object.
375 * @return Tool data output count.
376 */
378 
379 
380 #include <Gdk/Tools/GdkToolInfo.x.h>
381 
382 #endif
Essential Gdk declarations.
kStatus GdkToolInfo_SetTypeName(GdkToolInfo info, const kChar *name)
Sets the tool type name.
Describes a tool type which is essentially the class description of the tool to be used to instantiat...
Definition: GdkCfgInterfaces.h:14
Declares the GdkFeatureInfo class.
kStatus GdkToolInfo_AddMeasurement(GdkToolInfo info, const kChar *type, GdkMeasurementInfo *measurementInfo)
[Deprecated] Use GdkToolInfo_AddOutput() instead.
const kChar * GdkToolInfo_TypeName(GdkToolInfo info)
Returns the tool type name.
kStatus GdkToolInfo_AddSourceType(GdkToolInfo info, GdkDataType type)
Adds the data source type accepted by the tool.
GdkToolVersionInfo GdkToolInfo_DefaultVersion(GdkToolInfo info)
Return the default version object.
kStatus GdkToolInfo_SetDefaultVersion(GdkToolInfo info, GdkToolVersionInfo version)
Sets the default version object.
kStatus GdkToolInfo_AddSourceOption(GdkToolInfo info, GdkDataSource source)
Add an option to the list of acceptable data sources.
kStatus GdkToolInfo_SetLabel(GdkToolInfo info, const kChar *label)
Sets the tool display label.
#define kDeclareClassEx(PREFIX, SYMBOL, BASE)
GdkParamsInfo GdkToolInfo_Params(GdkToolInfo info)
Returns the schema for the parameters.
kSize GdkToolInfo_VersionCount(GdkToolInfo info)
Returns the number of version objects.
kSize GdkToolInfo_FeatureCount(GdkToolInfo info)
[Deprecated] Use GdkTool_FeatureIndexByType() to retrieve index of outputs instead.
Represents the schema of a configurable parameter.
Describes a measurement type.
Represents a data source selection.
Declares the GdkMeasurementInfo class.
const kChar * GdkToolInfo_Label(GdkToolInfo info)
Returns the tool display label.
kStatus GdkToolInfo_AddVersion(GdkToolInfo info, const kChar *name, GdkToolVersionInfo *newVersion)
Adds a tool configuration version.
kSize GdkToolInfo_ToolDataOutputCount(GdkToolInfo info)
[Deprecated] Use GdkTool_DataOutputIndexByType() to retrieve index of outputs instead.
Represents geometric feature output type.
kStatus GdkToolInfo_AddParam(GdkToolInfo info, GdkParamType paramType, const kChar *name, const kChar *label, const void *defValue, GdkParamInfo *paramInfo)
Adds a parameter to a tool.
Declares the GdkToolDataOutputInfo class.
Represents the schema of a parameter set.
GdkToolVersionInfo GdkToolInfo_VersionAt(GdkToolInfo info, kSize index)
Returns the version object at the specified index.
Describes a feature type.
Declares the GdkParamsInfo class.
kStatus GdkToolInfo_SetVersionName(GdkToolInfo info, const kChar *name)
Sets the version name explicitly.
kStatus GdkToolInfo_AddToolDataOutput(GdkToolInfo info, const kChar *name, GdkDataType dataType, GdkToolDataOutputInfo *tdOutputInfo)
[Deprecated] Use GdkToolInfo_AddOutput() instead.
Describes a output type.
kSize GdkToolInfo_MeasurementCount(GdkToolInfo info)
[Deprecated] Use GdkTool_MeasurementIndexByType() to retrieve index of outputs instead.
kStatus GdkToolInfo_AddFeature(GdkToolInfo info, const kChar *type, GdkFeatureDataType dataType, GdkFeatureInfo *featureInfo)
[Deprecated] Use GdkToolInfo_AddOutput() instead.
Describes a tool config version.
Represents anchor parameter source selections.
Represents data type. No longer used as a bitmask. Note that generic data types will have their msb s...
kStatus GdkToolInfo_EnableAutoVersion(GdkToolInfo info, kBool enable)
Enable or disable auto versioning.
kStatus GdkToolInfo_SetSourceType(GdkToolInfo info, GdkDataType type)
[Deprecated] Use GdkToolInfo_AddSourceType() instead.
Declares the GdkToolCfg class.
kStatus GdkToolInfo_EnableAnchoring(GdkToolInfo info, GdkAnchorParam axis, kBool enabled)
Enables or disables anchoring capability for a specified anchoring parameter.
kStatus GdkToolInfo_AddInput(GdkToolInfo info, GdkDataType dataType, const kChar *name, const kChar *label, GdkParamInfo *paramInfo)
Adds an input data set to a tool with the specified data type.
Declares the GdkToolVersionInfo class.
kBool GdkToolInfo_AnchoringEnabled(GdkToolInfo info, GdkAnchorParam axis)
Checks anchoring capability for a specified anchoring parameter.
Describes a GdkToolDataOutputInfo type.
kStatus GdkToolInfo_AddOutput(GdkToolInfo info, GdkDataType dataType, const kChar *name, const kChar *label, GdkOutputInfo *outputInfo)
Adds a data output type to a tool with the specified data type.
Type of a parameter.