Gocator Development Kit
 All Classes Files Functions Variables Typedefs Friends Modules Pages
GdkToolOutput.h
Go to the documentation of this file.
1 /**
2 * @file GdkToolOutput.h
3 * @brief Declares the GdkToolOutput class.
4 *
5 * Copyright (C) 2015-2022 by LMI Technologies Inc. All rights reserved.
6 */
7 #ifndef GDK_TOOL_OUTPUT_H
8 #define GDK_TOOL_OUTPUT_H
9 
10 #include <Gdk/GdkDef.h>
11 #include <Gdk/Data/GdkGraphic.h>
12 #include <Gdk/Tools/GdkFeature.h>
13 #include <../GoVision/GoVision/Data/GvMeasureMsg.h>
14 #include <../GoVision/GoVision/Data/GvFeatureMsg.h>
15 #include <../GoVision/GoVision/Data/GvProfileMsg.h>
16 #include <../GoVision/GoVision/Data/GvSurfaceMsg.h>
17 #include <../GoVision/GoVision/Data/GvGenericMsg.h>
18 #include <../GoVision/GoVision/Data/GvMeshMsg.h>
19 
20 /**
21 * Represents a tool output collection.
22 *
23 * @class GdkToolOutput
24 * @extends kObject
25 * @ingroup Gdk-Tools
26 */
27 typedef kObject GdkToolOutput;
29 kDeclareValueEx(Gdk, GdkToolOutputItem, kValue)
30 kDeclareValueEx(Gdk, GdkToolDiagnosticOutputItem, kValue)
31 
32 
33 /**
34 * Sets the measurement rendering at a specified index.
35 *
36 * @public @memberof GdkToolOutput
37 * @param output Output object.
38 * @param index Measurement index within the tool.
39 * @param graphic GdkGraphic object (ownership is transferred).
40 * @return Operation status.
41 */
42 GdkFx(kStatus) GdkToolOutput_SetRendering(GdkToolOutput output, kSize index, GdkGraphic graphic);
43 
44 /**
45 * Sets the diagnostic output at a specified index.
46 *
47 * @public @memberof GdkToolOutput
48 * @param output Output object.
49 * @param index diagnostic output index within the tool. (The place in order the diagnostic output was added to the tool).
50 * @param msg An object that implements kMsgSet (ownership is transferred).
51 * @return Operation status.
52 */
54 
55 /**
56 * Retrieves the GvMeasureMsg object for the measurement at the specified index.
57 *
58 * @public @memberof GdkToolOutput
59 * @param output Output object.
60 * @param index Index of the output object to retrieve relative to all outputs
61 * @param msg Pointer to where the GvMeasureMsg is to be set
62 * @return Operation status.
63 */
64 GdkFx(kStatus) GdkToolOutput_InitMeasurementAt(GdkToolOutput output, kSize index, GvMeasureMsg* msg);
65 
66 /**
67 * Retrieves the GvFeatureMsg object for the feature at the specified index.
68 *
69 * @public @memberof GdkToolOutput
70 * @param output Output object.
71 * @param index Index of the output object to retrieve relative to all outputs
72 * @param msg Pointer to where the GvFeatureMsg-based class object is to be set
73 * This can be one of the following:
74 * GvPointFeatureMsg
75 * GvLineFeatureMsg
76 * GvCircleFeatureMsg
77 * GvPlaneFeaturemsg
78 * @return Operation status.
79 */
80 GdkFx(kStatus) GdkToolOutput_InitFeatureAt(GdkToolOutput output, kSize index, GvFeatureMsg* msg);
81 
82 /**
83 * Constructs/reuses a GvProfileMsg object at the specified index.
84 * If the indicated index is a #GDK_DATA_TYPE_UNIFORM_PROFILE, the profile array will be of type k16s
85 * If the indicated index is a #GDK_DATA_TYPE_PROFILE_POINT_CLOUD, the profile array will be of type kPoint16s
86 *
87 * @public @memberof GdkToolOutput
88 * @param output Output object.
89 * @param index Index of the output object to retrieve relative to all outputs
90 * @param pointCount Count of points for this profile
91 * @param msg Pointer to where the GvProfileMsg is to be set
92 * @return Operation status.
93 */
94 GdkFx(kStatus) GdkToolOutput_InitProfileAt(GdkToolOutput output, kSize index, kSize pointCount, GvProfileMsg* msg);
95 
96 /**
97 * Constructs a GvSurfaceMsg object for a Uniform surface at the specified index.
98 *
99 * @public @memberof GdkToolOutput
100 * @param output Output object.
101 * @param index Index of the output object to retrieve relative to all outputs
102 * @param width Width of the surface
103 * @param height Height of the surface
104 * @param msg Pointer to where the GvSurfaceMsg is to be set (PointType = k16s)
105 * @return Operation status.
106 */
107 GdkFx(kStatus) GdkToolOutput_InitSurfaceAt(GdkToolOutput output, kSize index, kSize width, kSize height, GvSurfaceMsg* msg);
108 
109 /**
110 * Constructs a GvSurfaceMsg object for a raw surface at the specified index.
111 *
112 * @public @memberof GdkToolOutput
113 * @param output Output object.
114 * @param index Index of the output object to retrieve relative to all outputs
115 * @param width Width of the surface
116 * @param height Height of the surface
117 * @param msg Pointer to where the GvSurfaceMsg is to be set (PointType = kPoint3d16s)
118 * @return Operation status.
119 */
120 GdkFx(kStatus) GdkToolOutput_InitRawSurfaceAt(GdkToolOutput output, kSize index, kSize width, kSize height, GvSurfaceMsg* msg);
121 
122 /**
123 * Constructs/reuses a GvGenericMsg object at the specified index.
124 *
125 * @public @memberof GdkToolOutput
126 * @param output Output object.
127 * @param index Index of the output object to retrieve relative to all outputs
128 * @param isObject Flag indicating is the generic data is a kObject or a data buffer
129 * @param dataSize Size of the generic data
130 * @param msg Pointer to where the GvGenericMsg is to be set
131 * @return Operation status.
132 */
133 GdkFx(kStatus) GdkToolOutput_InitGenericDataAt(GdkToolOutput output, kSize index, kBool isObject, kSize dataSize, GvGenericMsg* msg);
134 
135 /**
136 * Constructs/reuses a GvMeshMsg object at the specified index.
137 *
138 * @public @memberof GdkToolOutput
139 * @param output Output object.
140 * @param index Index of the output object to retrieve relative to all outputs
141 * @param msg Pointer to where the GvMeshMsg is to be set
142 * @return Operation status.
143 */
144 GdkFx(kStatus) GdkToolOutput_InitMeshAt(GdkToolOutput output, kSize index, GvMeshMsg* msg);
145 
146 //// Deprecated API functions
147 
148 /**
149 * [Deprecated] Use GvMeasureMsg_SetValue(), GvMeasureMsg_SetStatus() instead.
150 *
151 * Sets the measurement output at a specified index.
152 *
153 * @deprecated
154 * @public @memberof GdkToolOutput
155 * @param output Output object.
156 * @param index Measurement index within the tool.
157 * @param value Output value.
158 * @param decision Output decision.
159 * @return Operation status.
160 */
161 GdkFx(kStatus) GdkToolOutput_SetResult(GdkToolOutput output, kSize index, k64f value, GdkMeasurementDecision decision);
162 
163 /**
164 * [Deprecated] Use GvMeasureMsg_SetResultPosition() instead.
165 *
166 * If the measurement value is a component of the position of a feature, use this
167 * function to associate the full position with the measurement.
168 *
169 * For a measurement that may be used as an anchor input to other tools, the
170 * position of the associated feature should be provided so downstream tools
171 * can use it for visualization or more advanced processing techniques.
172 *
173 * @deprecated
174 * @public @memberof GdkToolOutput
175 * @param output Output object.
176 * @param index Measurement index within the tool.
177 * @param position Position.
178 * @return Operation status.
179 */
180 GdkFx(kStatus) GdkToolOutput_SetResultPosition(GdkToolOutput output, kSize index, const kPoint3d64f* position);
181 
182 /**
183 * [Deprecated] Use GdkToolOutput_InitFeatureAt() instead.
184 *
185 * Gets the feature class object at the specified index.
186 *
187 * @deprecated
188 * @public @memberof GdkToolOutput
189 * @param output Output object.
190 * @param index Index of the output object to retrieve.
191 * @return GdkFeature class object.
192 */
194 
195 #include <Gdk/Tools/GdkToolOutput.x.h>
196 
197 #endif
Essential Gdk declarations.
Definition: GdkCfgInterfaces.h:14
kStatus GdkToolOutput_InitFeatureAt(GdkToolOutput output, kSize index, GvFeatureMsg *msg)
Retrieves the GvFeatureMsg object for the feature at the specified index.
#define kDeclareClassEx(PREFIX, SYMBOL, BASE)
GdkFeature GdkToolOutput_FeatureAt(GdkToolOutput output, kSize index)
[Deprecated] Use GdkToolOutput_InitFeatureAt() instead.
Represents a collection of vector graphics.
kStatus GdkToolOutput_InitRawSurfaceAt(GdkToolOutput output, kSize index, kSize width, kSize height, GvSurfaceMsg *msg)
Constructs a GvSurfaceMsg object for a raw surface at the specified index.
kStatus GdkToolOutput_InitProfileAt(GdkToolOutput output, kSize index, kSize pointCount, GvProfileMsg *msg)
Constructs/reuses a GvProfileMsg object at the specified index.
kStatus GdkToolOutput_InitMeshAt(GdkToolOutput output, kSize index, GvMeshMsg *msg)
Constructs/reuses a GvMeshMsg object at the specified index.
kStatus GdkToolOutput_SetRendering(GdkToolOutput output, kSize index, GdkGraphic graphic)
Sets the measurement rendering at a specified index.
Declares geometric feature class.
kStatus GdkToolOutput_InitMeasurementAt(GdkToolOutput output, kSize index, GvMeasureMsg *msg)
Retrieves the GvMeasureMsg object for the measurement at the specified index.
Declares the GdkGraphic class.
kStatus GdkToolOutput_SetDiagnostic(GdkToolOutput output, kSize index, kMsgSet msg)
Sets the diagnostic output at a specified index.
kStatus GdkToolOutput_SetResultPosition(GdkToolOutput output, kSize index, const kPoint3d64f *position)
[Deprecated] Use GvMeasureMsg_SetResultPosition() instead.
kStatus GdkToolOutput_InitSurfaceAt(GdkToolOutput output, kSize index, kSize width, kSize height, GvSurfaceMsg *msg)
Constructs a GvSurfaceMsg object for a Uniform surface at the specified index.
kStatus GdkToolOutput_SetResult(GdkToolOutput output, kSize index, k64f value, GdkMeasurementDecision decision)
[Deprecated] Use GvMeasureMsg_SetValue(), GvMeasureMsg_SetStatus() instead.
Represents a tool output collection.
kStatus GdkToolOutput_InitGenericDataAt(GdkToolOutput output, kSize index, kBool isObject, kSize dataSize, GvGenericMsg *msg)
Constructs/reuses a GvGenericMsg object at the specified index.