@phoenix-wing/code-core 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +4 -0
- package/README.md +14 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/pnwCaaDialogHandoff.d.ts +17 -0
- package/dist/pnwCaaDialogHandoff.d.ts.map +1 -0
- package/dist/pnwCaaDialogHandoff.js +34 -0
- package/dist/pnwCaaDialogHandoff.js.map +1 -0
- package/dist/pnwCaaEnvironment.d.ts +17 -0
- package/dist/pnwCaaEnvironment.d.ts.map +1 -0
- package/dist/pnwCaaEnvironment.js +23 -0
- package/dist/pnwCaaEnvironment.js.map +1 -0
- package/dist/pnwCodeRenamePlan.d.ts +47 -0
- package/dist/pnwCodeRenamePlan.d.ts.map +1 -0
- package/dist/pnwCodeRenamePlan.js +105 -0
- package/dist/pnwCodeRenamePlan.js.map +1 -0
- package/dist/pnwFileResultTree.d.ts +25 -0
- package/dist/pnwFileResultTree.d.ts.map +1 -0
- package/dist/pnwFileResultTree.js +37 -0
- package/dist/pnwFileResultTree.js.map +1 -0
- package/dist/pnwReorderCpp.d.ts +7 -0
- package/dist/pnwReorderCpp.d.ts.map +1 -0
- package/dist/pnwReorderCpp.js +389 -0
- package/dist/pnwReorderCpp.js.map +1 -0
- package/dist/pnwReorderHeader.d.ts +21 -0
- package/dist/pnwReorderHeader.d.ts.map +1 -0
- package/dist/pnwReorderHeader.js +896 -0
- package/dist/pnwReorderHeader.js.map +1 -0
- package/dist/pnwUuid.d.ts +25 -0
- package/dist/pnwUuid.d.ts.map +1 -0
- package/dist/pnwUuid.js +140 -0
- package/dist/pnwUuid.js.map +1 -0
- package/dist/pnwUuidReplacementPlan.d.ts +57 -0
- package/dist/pnwUuidReplacementPlan.d.ts.map +1 -0
- package/dist/pnwUuidReplacementPlan.js +101 -0
- package/dist/pnwUuidReplacementPlan.js.map +1 -0
- package/dist/pnwWorkset.d.ts +20 -0
- package/dist/pnwWorkset.d.ts.map +1 -0
- package/dist/pnwWorkset.js +51 -0
- package/dist/pnwWorkset.js.map +1 -0
- package/package.json +50 -0
- package/src/fixtures/annotation_sep.cpp +27 -0
- package/src/fixtures/caa2_wizard_section.h +17 -0
- package/src/fixtures/clang_format_class_tail.h +23 -0
- package/src/fixtures/clang_format_doubled.h +16 -0
- package/src/fixtures/clang_format_nested_markers.h +24 -0
- package/src/fixtures/clang_format_off_on.h +18 -0
- package/src/fixtures/internal_calls.cpp +29 -0
- package/src/fixtures/kevin_wizard_section.h +23 -0
- package/src/fixtures/ktalarmclock.clang-format.yaml +57 -0
- package/src/fixtures/ktca_KTCAutoCodeFrm_KTCAutoCodeUI.m_src_KTCAutoDialog.cpp +242 -0
- package/src/fixtures/ktca_KTCAutoCodeFrm_PublicInterfaces_KTCAutoDialog.h +165 -0
- package/src/fixtures/ktca_KTCAutoCodeInterfaces_KTCAutoCodeItf.m_src_KTCAutoAttrAccess.cpp +423 -0
- package/src/fixtures/ktca_KTCAutoCodeInterfaces_KTCAutoCodeItf.m_src_KTCAutoBuildGSM.cpp +105 -0
- package/src/fixtures/ktca_KTCAutoCodeInterfaces_KTCAutoCodeItf.m_src_KTCAutoPartDoc.cpp +121 -0
- package/src/fixtures/ktca_KTCAutoCodeInterfaces_PublicInterfaces_KTCAutoAttrAccess.h +310 -0
- package/src/fixtures/ktca_KTCAutoCodeInterfaces_PublicInterfaces_KTCAutoBuildGSM.h +56 -0
- package/src/fixtures/ktca_KTCAutoCodeInterfaces_PublicInterfaces_KTCAutoCatalogParam.h +52 -0
- package/src/fixtures/ktca_KTCAutoCodeInterfaces_PublicInterfaces_KTCAutoGSM.h +91 -0
- package/src/fixtures/ktca_KTCAutoCodeInterfaces_PublicInterfaces_KTCAutoPartDoc.h +106 -0
- package/src/fixtures/pnx_bom_analysis_cmd_min.cpp +72 -0
- package/src/fixtures/pnx_bom_analysis_param_min.h +49 -0
- package/src/fixtures/pnx_bom_param_system_split.h +39 -0
- package/src/fixtures/pnx_caa2_widget_decl.h +19 -0
- package/src/fixtures/pragma_region.h +18 -0
- package/src/index.ts +78 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Shanghai Kuntai Software Technology Co., Ltd. 2025
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @author Phoenix Wing
|
|
5
|
+
* @checkout PNXAutoCode
|
|
6
|
+
* @file
|
|
7
|
+
* @version V1.0
|
|
8
|
+
* @brief
|
|
9
|
+
* @details
|
|
10
|
+
* @date 2025-12-17
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
#ifndef KTCAutoAttrAccess_H
|
|
14
|
+
#define KTCAutoAttrAccess_H
|
|
15
|
+
|
|
16
|
+
// CAT
|
|
17
|
+
#include "CATICkeInst.h"
|
|
18
|
+
#include "CATICkeParm.h"
|
|
19
|
+
#include "CATISpecAttrAccess.h"
|
|
20
|
+
#include "CATISpecAttrKey.h"
|
|
21
|
+
#include "CATISpecObject.h"
|
|
22
|
+
#include "CATLISTV_CATISpecObject.h"
|
|
23
|
+
#include "CATListOfCATUnicodeString.h"
|
|
24
|
+
#include "CATUnicodeString.h"
|
|
25
|
+
|
|
26
|
+
// Auto Code
|
|
27
|
+
#include "KTCAutoAttrAccess.h"
|
|
28
|
+
#include "KTCAutoCodeItf.h"
|
|
29
|
+
#include "KtString.h"
|
|
30
|
+
|
|
31
|
+
/** @brief KTC AutoCode Param */
|
|
32
|
+
class ExportedByKTCAutoCodeItf KTCAutoAttrAccess {
|
|
33
|
+
public:
|
|
34
|
+
/** @brief Standard constructors and destructors */
|
|
35
|
+
KTCAutoAttrAccess();
|
|
36
|
+
virtual ~KTCAutoAttrAccess();
|
|
37
|
+
|
|
38
|
+
private:
|
|
39
|
+
/** @brief Copy constructor and equal operator */
|
|
40
|
+
KTCAutoAttrAccess(const KTCAutoAttrAccess&);
|
|
41
|
+
KTCAutoAttrAccess& operator=(const KTCAutoAttrAccess&);
|
|
42
|
+
|
|
43
|
+
public:
|
|
44
|
+
/**
|
|
45
|
+
* @brief Is Available
|
|
46
|
+
* @return bool
|
|
47
|
+
*/
|
|
48
|
+
inline bool available() const {
|
|
49
|
+
return NULL != attrAccess_;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @brief get CATICkeInst_var
|
|
54
|
+
* @param name attribute name
|
|
55
|
+
* @return CATICkeInst_var
|
|
56
|
+
*/
|
|
57
|
+
CATICkeInst_var get_CATICkeInst(const char* name) const;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @brief get CATICkeParm pointer
|
|
61
|
+
* @param name attribute name
|
|
62
|
+
* @return CATICkeParm*, Need release by user
|
|
63
|
+
*/
|
|
64
|
+
CATICkeParm* get_CATICkeParm(const char* name) const;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @brief get CATISpecAttrKey pointer
|
|
68
|
+
* @param name attribute name
|
|
69
|
+
* @return CATISpecAttrKey*, Need release by user
|
|
70
|
+
*/
|
|
71
|
+
CATISpecAttrKey* get_CATISpecAttrKey(const char* name) const;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @brief initial CATISpecAttrAccess
|
|
75
|
+
* @param baseUnkonwn base Unkonwn object
|
|
76
|
+
* @return bool
|
|
77
|
+
*/
|
|
78
|
+
HRESULT initial(CATBaseUnknown* baseUnkonwn);
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @brief Lists SpecObjects referred to by the attribute.
|
|
82
|
+
* @param attrKey access key to attribute.
|
|
83
|
+
* @return list of SpecObjects refered by the attribute. it is a list of
|
|
84
|
+
* CATISpecObject. please delete pointer after use
|
|
85
|
+
* @note Do not use.
|
|
86
|
+
*/
|
|
87
|
+
CATListValCATBaseUnknown_var* ListSpecObjects(const CATISpecAttrKey* attrKey) const;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @brief set CATISpecAttrAccess
|
|
91
|
+
* @param attrAcess out side CATISpecAttrAccess
|
|
92
|
+
*/
|
|
93
|
+
inline void set_CATISpecAttrAccess(CATISpecAttrAccess* attrAcess) {
|
|
94
|
+
attrAccess_ = attrAcess;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
public:
|
|
98
|
+
/**
|
|
99
|
+
* @brief Get List Value of CATBaseUnknown_var
|
|
100
|
+
* @param name attribute name
|
|
101
|
+
* @param value output value
|
|
102
|
+
* @return HRESULT
|
|
103
|
+
*/
|
|
104
|
+
HRESULT
|
|
105
|
+
GetListValue(const char* name, CATListValCATBaseUnknown_var& value) const;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @brief Get List Value of specobject
|
|
109
|
+
* @param name attribute name
|
|
110
|
+
* @param value output value
|
|
111
|
+
* @return HRESULT
|
|
112
|
+
*/
|
|
113
|
+
HRESULT
|
|
114
|
+
GetListValue(const char* name, CATListValCATISpecObject_var& value) const;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @brief Get Value of specobject
|
|
118
|
+
* @param name attribute name
|
|
119
|
+
* @param value output value
|
|
120
|
+
* @return HRESULT
|
|
121
|
+
*/
|
|
122
|
+
HRESULT GetSpecValue(const char* name, CATISpecObject_var& value) const;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @brief Get Value of CATBoolean
|
|
126
|
+
* @param name attribute name
|
|
127
|
+
* @param value output value
|
|
128
|
+
* @return HRESULT
|
|
129
|
+
*/
|
|
130
|
+
HRESULT GetSpecValue(const char* name, CATBoolean& value) const;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @brief Get Value of int
|
|
134
|
+
* @param name attribute name
|
|
135
|
+
* @param value output value
|
|
136
|
+
* @return HRESULT
|
|
137
|
+
*/
|
|
138
|
+
HRESULT GetSpecValue(const char* name, int& value) const;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @brief Get Value of double
|
|
142
|
+
* @param name attribute name
|
|
143
|
+
* @param value output value
|
|
144
|
+
* @return HRESULT
|
|
145
|
+
*/
|
|
146
|
+
HRESULT GetSpecValue(const char* name, double& value) const;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @brief Get Value of CATUnicodeString
|
|
150
|
+
* @param name attribute name
|
|
151
|
+
* @param value output value
|
|
152
|
+
* @return HRESULT
|
|
153
|
+
*/
|
|
154
|
+
HRESULT GetSpecValue(const char* name, CATUnicodeString& value) const;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @brief Get Value of CATBoolean
|
|
158
|
+
* @param name attribute name
|
|
159
|
+
* @param value output value
|
|
160
|
+
* @return HRESULT
|
|
161
|
+
*/
|
|
162
|
+
HRESULT GetValue(const char* name, CATBoolean& value) const;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @brief Get Value of int
|
|
166
|
+
* @param name attribute name
|
|
167
|
+
* @param value output value
|
|
168
|
+
* @return HRESULT
|
|
169
|
+
*/
|
|
170
|
+
HRESULT GetValue(const char* name, int& value) const;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @brief Get Value of double
|
|
174
|
+
* @param name attribute name
|
|
175
|
+
* @param value output value
|
|
176
|
+
* @return HRESULT
|
|
177
|
+
*/
|
|
178
|
+
HRESULT GetValue(const char* name, double& value) const;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @brief Get Value of CATUnicodeString
|
|
182
|
+
* @param name attribute name
|
|
183
|
+
* @param value output value
|
|
184
|
+
* @return HRESULT
|
|
185
|
+
*/
|
|
186
|
+
HRESULT GetValue(const char* name, CATUnicodeString& value) const;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* @brief Get Value of KtString
|
|
190
|
+
* @param name attribute name
|
|
191
|
+
* @param value output value
|
|
192
|
+
* @return HRESULT
|
|
193
|
+
*/
|
|
194
|
+
HRESULT GetValue(const char* name, KtString& value) const;
|
|
195
|
+
|
|
196
|
+
public: // Set
|
|
197
|
+
/**
|
|
198
|
+
* @brief Set Spec Value
|
|
199
|
+
* @param name attribute name
|
|
200
|
+
* @param[in] value CATListValCATISpecObject_var
|
|
201
|
+
* @param[in] checkExist whether check exist
|
|
202
|
+
* @return HRESULT
|
|
203
|
+
* @author Phoenix
|
|
204
|
+
*/
|
|
205
|
+
HRESULT SetListValue(const char* name, const CATListValCATISpecObject_var& value,
|
|
206
|
+
CATBoolean checkExist = CATTrue);
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* @brief Set Spec Value
|
|
210
|
+
* @param name attribute name
|
|
211
|
+
* @param[in] value CATISpecObject_var
|
|
212
|
+
* @param[in] checkExist whether check exist
|
|
213
|
+
* @return HRESULT
|
|
214
|
+
* @author Phoenix
|
|
215
|
+
*/
|
|
216
|
+
HRESULT SetSpecValue(const char* name, CATISpecObject_var value,
|
|
217
|
+
CATBoolean checkExist = CATTrue);
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @brief Set Spec Value
|
|
221
|
+
* @param name attribute name
|
|
222
|
+
* @param[in] value CATISpecObject_var
|
|
223
|
+
* @param[in] checkExist whether check exist
|
|
224
|
+
* @return HRESULT
|
|
225
|
+
* @author Phoenix
|
|
226
|
+
*/
|
|
227
|
+
HRESULT SetSpecValue(const char* name, CATBoolean value, CATBoolean checkExist = CATTrue);
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* @brief Set Spec Value
|
|
231
|
+
* @param name attribute name
|
|
232
|
+
* @param[in] value int
|
|
233
|
+
* @param[in] checkExist whether check exist
|
|
234
|
+
* @return HRESULT
|
|
235
|
+
* @author Phoenix
|
|
236
|
+
*/
|
|
237
|
+
HRESULT SetSpecValue(const char* name, int value, CATBoolean checkExist = CATTrue);
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* @brief Set Spec Value
|
|
241
|
+
* @param name attribute name
|
|
242
|
+
* @param[in] value double
|
|
243
|
+
* @param[in] checkExist whether check exist
|
|
244
|
+
* @return HRESULT
|
|
245
|
+
* @author Phoenix
|
|
246
|
+
*/
|
|
247
|
+
HRESULT SetSpecValue(const char* name, double value, CATBoolean checkExist = CATTrue);
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* @brief Set Spec Value
|
|
251
|
+
* @param name attribute name
|
|
252
|
+
* @param[in] value CATUnicodeString
|
|
253
|
+
* @param[in] checkExist whether check exist
|
|
254
|
+
* @return HRESULT
|
|
255
|
+
* @author Phoenix
|
|
256
|
+
*/
|
|
257
|
+
HRESULT SetSpecValue(const char* name, const CATUnicodeString& value,
|
|
258
|
+
CATBoolean checkExist = CATTrue);
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* @brief Set Value
|
|
262
|
+
* @param name attribute name
|
|
263
|
+
* @param[in] value double
|
|
264
|
+
* @return HRESULT
|
|
265
|
+
* @author Phoenix
|
|
266
|
+
*/
|
|
267
|
+
HRESULT SetValue(const char* name, double value, CATBoolean checkExist = CATTrue);
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @brief Set Value
|
|
271
|
+
* @param name attribute name
|
|
272
|
+
* @param[in] value int
|
|
273
|
+
* @return HRESULT
|
|
274
|
+
* @author Phoenix
|
|
275
|
+
*/
|
|
276
|
+
HRESULT SetValue(const char* name, int value, CATBoolean checkExist = CATTrue);
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* @brief Set Value
|
|
280
|
+
* @param name attribute name
|
|
281
|
+
* @param[in] value CATBoolean
|
|
282
|
+
* @return HRESULT
|
|
283
|
+
* @author Phoenix
|
|
284
|
+
*/
|
|
285
|
+
HRESULT SetValue(const char* name, CATBoolean value, CATBoolean checkExist = CATTrue);
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* @brief Set Value
|
|
289
|
+
* @param name attribute name
|
|
290
|
+
* @param[in] value CATUnicodeString
|
|
291
|
+
* @return HRESULT
|
|
292
|
+
* @author Phoenix
|
|
293
|
+
*/
|
|
294
|
+
HRESULT SetValue(const char* name, const CATUnicodeString& value,
|
|
295
|
+
CATBoolean checkExist = CATTrue);
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* @brief Set Value
|
|
299
|
+
* @param name attribute name
|
|
300
|
+
* @param[in] value KtString
|
|
301
|
+
* @return HRESULT
|
|
302
|
+
* @author Phoenix
|
|
303
|
+
*/
|
|
304
|
+
HRESULT SetValue(const char* name, const KtString& value, CATBoolean checkExist = CATTrue);
|
|
305
|
+
|
|
306
|
+
private:
|
|
307
|
+
CATISpecAttrAccess* attrAccess_; ///< attribute access
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
#endif
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Shanghai Kuntai Software Technology Co., Ltd. 2025
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @author Phoenix Wing
|
|
5
|
+
* @checkout PNXAutoCode
|
|
6
|
+
* @file
|
|
7
|
+
* @version V1.0
|
|
8
|
+
* @brief
|
|
9
|
+
* @details
|
|
10
|
+
* @date 2025-1-19
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
#ifndef KTCAutoBuildGSM_H
|
|
14
|
+
#define KTCAutoBuildGSM_H
|
|
15
|
+
|
|
16
|
+
#include "CATGeoFactory.h"
|
|
17
|
+
#include "CATIGeometricalElement.h"
|
|
18
|
+
#include "CATIMfProcReport.h"
|
|
19
|
+
#include "CATISpecObject.h"
|
|
20
|
+
#include "CATIUpdateError.h"
|
|
21
|
+
#include "CATListOfCATUnicodeString.h"
|
|
22
|
+
#include "CATSoftwareConfiguration.h"
|
|
23
|
+
#include "CATUnicodeString.h"
|
|
24
|
+
|
|
25
|
+
// KTC
|
|
26
|
+
#include "KTCAutoBuildGSM.h"
|
|
27
|
+
#include "KTCAutoCodeItf.h"
|
|
28
|
+
|
|
29
|
+
/** @brief KTC AutoCode Param */
|
|
30
|
+
class ExportedByKTCAutoCodeItf KTCAutoBuildGSM {
|
|
31
|
+
public:
|
|
32
|
+
/** @brief Standard constructors and destructors */
|
|
33
|
+
KTCAutoBuildGSM();
|
|
34
|
+
virtual ~KTCAutoBuildGSM();
|
|
35
|
+
|
|
36
|
+
private:
|
|
37
|
+
/** @brief Copy constructor and equal operator */
|
|
38
|
+
KTCAutoBuildGSM(const KTCAutoBuildGSM&);
|
|
39
|
+
KTCAutoBuildGSM& operator=(const KTCAutoBuildGSM&);
|
|
40
|
+
|
|
41
|
+
public:
|
|
42
|
+
/** @brief query geomFactory from object */
|
|
43
|
+
HRESULT query_factory(CATISpecObject_var object);
|
|
44
|
+
|
|
45
|
+
/** @brief remove body from geomFactory */
|
|
46
|
+
HRESULT remove(CATBody*& body);
|
|
47
|
+
|
|
48
|
+
public:
|
|
49
|
+
CATIUpdateError* updateError;
|
|
50
|
+
CATIGeometricalElement* geometricalElement;
|
|
51
|
+
CATIMfProcReport* procReport;
|
|
52
|
+
CATGeoFactory* geomFactory;
|
|
53
|
+
CATSoftwareConfiguration* softConfig;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
#endif
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Shanghai Kuntai Software Technology Co., Ltd. 2025
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @author Phoenix Wing
|
|
5
|
+
* @checkout PNXAutoCode
|
|
6
|
+
* @file
|
|
7
|
+
* @version V1.0
|
|
8
|
+
* @brief
|
|
9
|
+
* @details
|
|
10
|
+
* @date 2025-12-17
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
#ifndef KTCAutoCatalogParam_H
|
|
14
|
+
#define KTCAutoCatalogParam_H
|
|
15
|
+
|
|
16
|
+
#include "CATISpecObject.h"
|
|
17
|
+
#include "CATListOfCATUnicodeString.h"
|
|
18
|
+
#include "CATUnicodeString.h"
|
|
19
|
+
|
|
20
|
+
// KTC
|
|
21
|
+
#include "KTCAutoCatalogParam.h"
|
|
22
|
+
#include "KTCAutoCodeItf.h"
|
|
23
|
+
|
|
24
|
+
// std
|
|
25
|
+
#include <vector>
|
|
26
|
+
|
|
27
|
+
/** @brief KTC AutoCode Param */
|
|
28
|
+
class ExportedByKTCAutoCodeItf KTCAutoCatalogParam {
|
|
29
|
+
public:
|
|
30
|
+
/** @brief Standard constructors and destructors */
|
|
31
|
+
KTCAutoCatalogParam();
|
|
32
|
+
virtual ~KTCAutoCatalogParam();
|
|
33
|
+
|
|
34
|
+
/** @brief Copy constructor and equal operator */
|
|
35
|
+
KTCAutoCatalogParam(const KTCAutoCatalogParam&);
|
|
36
|
+
KTCAutoCatalogParam& operator=(const KTCAutoCatalogParam&);
|
|
37
|
+
|
|
38
|
+
public:
|
|
39
|
+
static HRESULT add_Attributes(CATISpecObject* startUp,
|
|
40
|
+
std::vector<KTCAutoCatalogParam>& itemList);
|
|
41
|
+
void SetTKListValue(const CATUnicodeString& name, TCKind kind, CATAttrInOut in);
|
|
42
|
+
|
|
43
|
+
void SetValue(const CATUnicodeString& name, TCKind kind, CATAttrInOut in);
|
|
44
|
+
|
|
45
|
+
public:
|
|
46
|
+
CATUnicodeString name;
|
|
47
|
+
TCKind kind;
|
|
48
|
+
CATAttrInOut inOut;
|
|
49
|
+
int isList;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
#endif
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Shanghai Kuntai Software Technology Co., Ltd. 2025
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @author Phoenix Wing
|
|
5
|
+
* @checkout PNXAutoCode
|
|
6
|
+
* @file
|
|
7
|
+
* @version V1.0
|
|
8
|
+
* @brief
|
|
9
|
+
* @details
|
|
10
|
+
* @date 2025-12-17
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
#ifndef KTCAutoGSM_H
|
|
14
|
+
#define KTCAutoGSM_H
|
|
15
|
+
|
|
16
|
+
#include "CATIGSMTool.h"
|
|
17
|
+
#include "CATISpecObject.h"
|
|
18
|
+
#include "CATListOfCATUnicodeString.h"
|
|
19
|
+
#include "CATUnicodeString.h"
|
|
20
|
+
|
|
21
|
+
// KTC
|
|
22
|
+
#include "KTCAutoCodeItf.h"
|
|
23
|
+
#include "KTCAutoGSM.h"
|
|
24
|
+
|
|
25
|
+
class CATFrmEditor;
|
|
26
|
+
class CATIPrtPart;
|
|
27
|
+
|
|
28
|
+
/** @brief KTC AutoCode Param */
|
|
29
|
+
class ExportedByKTCAutoCodeItf KTCAutoGSM {
|
|
30
|
+
public:
|
|
31
|
+
/** @brief Standard constructors and destructors */
|
|
32
|
+
KTCAutoGSM();
|
|
33
|
+
virtual ~KTCAutoGSM();
|
|
34
|
+
|
|
35
|
+
private:
|
|
36
|
+
/** @brief Copy constructor and equal operator */
|
|
37
|
+
KTCAutoGSM(const KTCAutoGSM&);
|
|
38
|
+
KTCAutoGSM& operator=(const KTCAutoGSM&);
|
|
39
|
+
|
|
40
|
+
public:
|
|
41
|
+
/**
|
|
42
|
+
* @brief Looking For Any Type Of Body
|
|
43
|
+
* @param ipIPrtPart input CATIPrtPart* pointer
|
|
44
|
+
* @param oppiGsmtool output CATIGSMTool** pointer
|
|
45
|
+
* @return HRESULT
|
|
46
|
+
*/
|
|
47
|
+
static HRESULT CreateTool(CATIPrtPart* ipIPrtPart, CATIGSMTool** oppiGsmtool);
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @brief Checks if thefeature is inside an Ordered Geometrical Set
|
|
51
|
+
* @param feature CATISpecObject
|
|
52
|
+
* @return bool
|
|
53
|
+
*/
|
|
54
|
+
static bool IsInsideOrderedBody(CATISpecObject_var feature);
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @brief Looking For Any Type Of Body
|
|
58
|
+
* @param iCatFrmEditor input CATFrmEditor* pointer
|
|
59
|
+
* @param oppiGsmtool output CATIGSMTool** pointer
|
|
60
|
+
* @return HRESULT
|
|
61
|
+
*/
|
|
62
|
+
static HRESULT LookingForAnyTypeOfBody(CATFrmEditor* iCatFrmEditor, CATIGSMTool** oppiGsmtool);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @brief Looking For GeomSet
|
|
66
|
+
* @param iCatFrmEditor input CATFrmEditor* pointer
|
|
67
|
+
* @param oppiGsmtool output CATIGSMTool** pointer
|
|
68
|
+
* @return HRESULT
|
|
69
|
+
*/
|
|
70
|
+
static HRESULT LookingForGeomSet(CATFrmEditor* iCatFrmEditor, CATIGSMTool** oppiGsmtool);
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @brief Looking For GeomSet Or Ordered GeomSet
|
|
74
|
+
* @param iCatFrmEditor input CATFrmEditor* pointer
|
|
75
|
+
* @param oppiGsmtool output CATIGSMTool** pointer
|
|
76
|
+
* @return HRESULT
|
|
77
|
+
*/
|
|
78
|
+
static HRESULT LookingForGeomSetOrOrderedGeomSet(CATFrmEditor* iCatFrmEditor,
|
|
79
|
+
CATIGSMTool** oppiGsmtool);
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @brief checktout interface from GSMTool
|
|
83
|
+
* @param ipiGSMTool input GSMTool
|
|
84
|
+
* @param iIID input IID
|
|
85
|
+
* @param oPPV out interface pointer
|
|
86
|
+
* @return HRESULT
|
|
87
|
+
*/
|
|
88
|
+
static HRESULT QueryInterface(CATIGSMTool* ipiGSMTool, const IID& iIID, void** oPPV);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
#endif
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Shanghai Kuntai Software Technology Co., Ltd. 2025
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @author Phoenix Wing
|
|
5
|
+
* @checkout PNXAutoCode
|
|
6
|
+
* @file
|
|
7
|
+
* @version V1.0
|
|
8
|
+
* @brief
|
|
9
|
+
* @details
|
|
10
|
+
* @date 2025-12-17
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
#ifndef KTCAutoPartDoc_H
|
|
14
|
+
#define KTCAutoPartDoc_H
|
|
15
|
+
|
|
16
|
+
#include "CATIGSMTool.h"
|
|
17
|
+
#include "CATISpecObject.h"
|
|
18
|
+
#include "CATLISTV_CATISpecObject.h"
|
|
19
|
+
#include "CATListOfCATPathElement.h"
|
|
20
|
+
#include "CATListOfCATUnicodeString.h"
|
|
21
|
+
#include "CATUnicodeString.h"
|
|
22
|
+
|
|
23
|
+
// auto code
|
|
24
|
+
#include "KTCAutoCodeItf.h"
|
|
25
|
+
#include "KTCAutoPartDoc.h"
|
|
26
|
+
|
|
27
|
+
class CATFrmEditor;
|
|
28
|
+
|
|
29
|
+
/** @brief KTC AutoCode Param */
|
|
30
|
+
class ExportedByKTCAutoCodeItf KTCAutoPartDoc {
|
|
31
|
+
public:
|
|
32
|
+
/** @brief Standard constructors and destructors */
|
|
33
|
+
KTCAutoPartDoc();
|
|
34
|
+
virtual ~KTCAutoPartDoc();
|
|
35
|
+
|
|
36
|
+
public:
|
|
37
|
+
/**
|
|
38
|
+
* @brief checkout path element
|
|
39
|
+
* @param object CATISpecObject_var
|
|
40
|
+
* @param pathElement CATPathElement**
|
|
41
|
+
* @return HRESULT
|
|
42
|
+
*/
|
|
43
|
+
HRESULT checkout_pathelement(CATISpecObject_var object, CATPathElement** pathElement);
|
|
44
|
+
|
|
45
|
+
HRESULT checkout_pathelement(const CATListValCATISpecObject_var& list,
|
|
46
|
+
CATPathElement** pathElement);
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @brief checkout path element
|
|
50
|
+
* @param iList CATListValCATISpecObject_var
|
|
51
|
+
* @param oList CATListOfCATPathElement&
|
|
52
|
+
* @return HRESULT
|
|
53
|
+
*/
|
|
54
|
+
HRESULT checkout_pathelement(const CATListValCATISpecObject_var& iList,
|
|
55
|
+
CATLISTP(CATPathElement) & oList);
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @brief Get FrmEditor
|
|
59
|
+
* @return CATFrmEditor*, DONOT release outside
|
|
60
|
+
* <br><b>Lifecycle rules deviation</b>: No AddRef is performed
|
|
61
|
+
*/
|
|
62
|
+
inline CATFrmEditor* GetFrmEditor() const {
|
|
63
|
+
return catFrmEditor_;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @brief Get GSMTool
|
|
68
|
+
* @return CATIGSMTool*, DONOT release outside
|
|
69
|
+
*/
|
|
70
|
+
inline CATIGSMTool* GetGSMTool() const {
|
|
71
|
+
return gsmTool_;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @brief initial editor
|
|
76
|
+
* @param editor CATFrmEditor*
|
|
77
|
+
* @return HRESULT
|
|
78
|
+
*/
|
|
79
|
+
HRESULT initial_editor(CATFrmEditor* editor);
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @brief initial editor from GeomSet and catFrmEditor_
|
|
83
|
+
* @return HRESULT, set GSMTool in gsmTool_
|
|
84
|
+
* get from GetGSMTool()
|
|
85
|
+
*/
|
|
86
|
+
HRESULT initial_GSMTool_From_GeomSet();
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @brief checktout interface from GSMTool
|
|
90
|
+
* @param iIID input IID
|
|
91
|
+
* @param oPPV out interface pointer
|
|
92
|
+
* @return HRESULT
|
|
93
|
+
*/
|
|
94
|
+
HRESULT QueryInterface(const IID& iIID, void** oPPV);
|
|
95
|
+
|
|
96
|
+
private:
|
|
97
|
+
/** @brief Copy constructor and equal operator */
|
|
98
|
+
KTCAutoPartDoc(const KTCAutoPartDoc&);
|
|
99
|
+
KTCAutoPartDoc& operator=(const KTCAutoPartDoc&);
|
|
100
|
+
|
|
101
|
+
private:
|
|
102
|
+
CATFrmEditor* catFrmEditor_; // catia frame editor
|
|
103
|
+
CATIGSMTool* gsmTool_; // GSM Tool, do not release gsmTool_ outside
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
#endif
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal excerpt from PNXBomAnalysisCmd.cpp (PNX BOM Analysis CAA command).
|
|
3
|
+
* Source: PNXBomAnalysisWsp/PNXBomAnalysisFrm/PNXBomAnalysisUI.m/src/PNXBomAnalysisCmd.cpp
|
|
4
|
+
*
|
|
5
|
+
* case_id=pnx-bom-cmd-min-pending
|
|
6
|
+
* Status: fixture only — regression tests not wired yet.
|
|
7
|
+
*
|
|
8
|
+
* Intended later coverage:
|
|
9
|
+
* - Kevin CAA Wizard blocks inside member function bodies (.cpp)
|
|
10
|
+
* - Manual code between Wizard END and following statements
|
|
11
|
+
* - Optional: #pragma region VirtualFunction (see doc — 待研究)
|
|
12
|
+
*/
|
|
13
|
+
#include "PNXBomAnalysisCmd.h"
|
|
14
|
+
|
|
15
|
+
//-----------------------------------------------------------------------------
|
|
16
|
+
CATBoolean PNXBomAnalysisCmd::ActionSelectorListPda(void* data) {
|
|
17
|
+
int field = CATPtrToINT32(data);
|
|
18
|
+
|
|
19
|
+
// START KEVIN CAA WIZARD SECTION PNXBomAnalysis CMD ACTION PDA
|
|
20
|
+
|
|
21
|
+
// clang-format off
|
|
22
|
+
// Field count = 0
|
|
23
|
+
|
|
24
|
+
// clang-format on
|
|
25
|
+
// END KEVIN CAA WIZARD SECTION PNXBomAnalysis CMD ACTION PDA
|
|
26
|
+
|
|
27
|
+
if (fieldChange) fiaAgentUpdate();
|
|
28
|
+
|
|
29
|
+
return TRUE;
|
|
30
|
+
}
|
|
31
|
+
//-----------------------------------------------------------------------------
|
|
32
|
+
CATBoolean PNXBomAnalysisCmd::ActionSelectorListFia(void*) {
|
|
33
|
+
if (NULL == _pfiaElementSelect) return CATFalse;
|
|
34
|
+
|
|
35
|
+
// START KEVIN CAA WIZARD SECTION PNXBomAnalysis CMD ACTION FIA
|
|
36
|
+
|
|
37
|
+
// clang-format off
|
|
38
|
+
int count = 0;
|
|
39
|
+
|
|
40
|
+
// clang-format on
|
|
41
|
+
// END KEVIN CAA WIZARD SECTION PNXBomAnalysis CMD ACTION FIA
|
|
42
|
+
|
|
43
|
+
AfterValueChange();
|
|
44
|
+
return TRUE;
|
|
45
|
+
}
|
|
46
|
+
//-----------------------------------------------------------------------------
|
|
47
|
+
void PNXBomAnalysisCmd::fiaAgentClear() {
|
|
48
|
+
// START KEVIN CAA WIZARD SECTION PNXBomAnalysis CMD AGENT FIA CLEAR
|
|
49
|
+
|
|
50
|
+
// clang-format off
|
|
51
|
+
|
|
52
|
+
// clang-format on
|
|
53
|
+
// END KEVIN CAA WIZARD SECTION PNXBomAnalysis CMD AGENT FIA CLEAR
|
|
54
|
+
}
|
|
55
|
+
//-----------------------------------------------------------------------------
|
|
56
|
+
void PNXBomAnalysisCmd::fiaAgentUpdate() {
|
|
57
|
+
fiaAgentClear();
|
|
58
|
+
|
|
59
|
+
// START KEVIN CAA WIZARD SECTION PNXBomAnalysis CMD AGENT UPDATE STATE
|
|
60
|
+
|
|
61
|
+
// clang-format off
|
|
62
|
+
// Field count = 0
|
|
63
|
+
|
|
64
|
+
// clang-format on
|
|
65
|
+
// END KEVIN CAA WIZARD SECTION PNXBomAnalysis CMD AGENT UPDATE STATE
|
|
66
|
+
}
|
|
67
|
+
//-----------------------------------------------------------------------------
|
|
68
|
+
CATBoolean PNXBomAnalysisCmd::ActionValueChange(void*) {
|
|
69
|
+
daValueChange_->InitializeAcquisition();
|
|
70
|
+
AfterValueChange();
|
|
71
|
+
return TRUE;
|
|
72
|
+
}
|