]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - Tools/Source/PcdTools/org/tianocore/pcd/entity/UsageInstance.java
Fix track EDKT213: PCD value size should be specificed when generate const variable...
[mirror_edk2.git] / Tools / Source / PcdTools / org / tianocore / pcd / entity / UsageInstance.java
... / ...
CommitLineData
1/** @file\r
2 UsageInstance class.\r
3\r
4 This class indicate an usage instance for a PCD token. This instance maybe a module\r
5 or platform setting. When a module produce or cosume a PCD token, then this module\r
6 is an usage instance for this PCD token.\r
7\r
8Copyright (c) 2006, Intel Corporation\r
9All rights reserved. This program and the accompanying materials\r
10are licensed and made available under the terms and conditions of the BSD License\r
11which accompanies this distribution. The full text of the license may be found at\r
12http://opensource.org/licenses/bsd-license.php\r
13\r
14THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
15WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
16\r
17**/\r
18package org.tianocore.pcd.entity;\r
19\r
20import org.tianocore.pcd.entity.CommonDefinition;\r
21import org.tianocore.pcd.entity.UsageIdentification;\r
22\r
23/**\r
24 This class indicate an usage instance for a PCD token. This instance maybe a module\r
25 or platform setting. When a module produce or cosume a PCD token, then this module\r
26 is an usage instance for this PCD token.\r
27**/\r
28public class UsageInstance {\r
29 ///\r
30 /// This parent that this usage instance belongs to.\r
31 ///\r
32 public Token parentToken;\r
33\r
34 ///\r
35 /// ModuleIdentification for Usage Instance\r
36 ///\r
37 public UsageIdentification usageId;\r
38\r
39 ///\r
40 /// Arch also is a key for a UsageInstance\r
41 ///\r
42 public String arch;\r
43\r
44 ///\r
45 /// The PCD type defined for module\r
46 ///\r
47 public Token.PCD_TYPE modulePcdType;\r
48\r
49 ///\r
50 /// The value of the PCD in this usage instance.\r
51 ///\r
52 public String datum;\r
53\r
54 ///\r
55 /// The maxDatumSize could be different for same PCD in different module\r
56 /// But this case is allow for FeatureFlag, FixedAtBuild, PatchableInModule\r
57 /// type.\r
58 ///\r
59 public int maxDatumSize;\r
60\r
61 ///\r
62 /// Autogen string for header file.\r
63 ///\r
64 public String hAutogenStr;\r
65\r
66 ///\r
67 /// Auotgen string for C code file.\r
68 ///\r
69 public String cAutogenStr;\r
70\r
71 /**\r
72 Constructure function for UsageInstance\r
73\r
74 @param parentToken The token instance for this usgaInstance\r
75 @param usageId The identification for usage instance\r
76 @param modulePcdType The PCD type for this usage instance\r
77 @param value The value of this PCD in this usage instance\r
78 @param maxDatumSize The max datum size of this PCD in this usage\r
79 instance.\r
80 **/\r
81 public UsageInstance(Token parentToken,\r
82 UsageIdentification usageId,\r
83 Token.PCD_TYPE modulePcdType,\r
84 String value,\r
85 int maxDatumSize) {\r
86 this.parentToken = parentToken;\r
87 this.usageId = usageId;\r
88 this.modulePcdType = modulePcdType;\r
89 this.datum = value;\r
90 this.maxDatumSize = maxDatumSize;\r
91 }\r
92\r
93 /**\r
94 Get the primary key for usage instance array for every token.\r
95\r
96 @param usageId The identification of UsageInstance\r
97\r
98 @retval String The primary key for this usage instance\r
99 **/\r
100 public static String getPrimaryKey(UsageIdentification usageId) {\r
101 return usageId.toString();\r
102 }\r
103\r
104 /**\r
105 Get primary key string for this usage instance\r
106\r
107 @return String primary key string\r
108 **/\r
109 public String getPrimaryKey() {\r
110 return UsageInstance.getPrimaryKey(usageId);\r
111 }\r
112\r
113 /**\r
114 Judget whether current module is PEI driver\r
115\r
116 @return boolean whether current module is PEI driver\r
117 **/\r
118 public boolean isPeiPhaseComponent() {\r
119 int moduleType = CommonDefinition.getModuleType(usageId.moduleType);\r
120\r
121 if ((moduleType == CommonDefinition.ModuleTypePeiCore) ||\r
122 (moduleType == CommonDefinition.ModuleTypePeim)) {\r
123 return true;\r
124 }\r
125 return false;\r
126 }\r
127\r
128 /**\r
129 Judge whether current module is DXE driver.\r
130\r
131 @return boolean whether current module is DXE driver\r
132 **/\r
133 public boolean isDxePhaseComponent() {\r
134 int moduleType = CommonDefinition.getModuleType(usageId.moduleType);\r
135\r
136 if ((moduleType == CommonDefinition.ModuleTypeDxeDriver) ||\r
137 (moduleType == CommonDefinition.ModuleTypeDxeRuntimeDriver) ||\r
138 (moduleType == CommonDefinition.ModuleTypeDxeSalDriver) ||\r
139 (moduleType == CommonDefinition.ModuleTypeDxeSmmDriver) ||\r
140 (moduleType == CommonDefinition.ModuleTypeUefiDriver) ||\r
141 (moduleType == CommonDefinition.ModuleTypeUefiApplication)\r
142 ) {\r
143 return true;\r
144 }\r
145 return false;\r
146 }\r
147\r
148 /**\r
149 Generate autogen string for header file and C code file.\r
150\r
151 @param isBuildUsedLibrary whether the autogen is for library.\r
152 **/\r
153 public void generateAutoGen(boolean isBuildUsedLibrary) {\r
154 String guidStringCName = null;\r
155 boolean isByteArray = false;\r
156 String printDatum = null;\r
157 String tokenNumberString = null;\r
158\r
159 hAutogenStr = "";\r
160 cAutogenStr = "";\r
161\r
162 if (this.modulePcdType == Token.PCD_TYPE.DYNAMIC_EX) {\r
163 //\r
164 // For DYNAMIC_EX type PCD, use original token number in SPD or FPD to generate autogen\r
165 //\r
166 tokenNumberString = Long.toString(parentToken.dynamicExTokenNumber, 16);\r
167 } else {\r
168 //\r
169 // For Others type PCD, use autogenerated token number to generate autogen\r
170 //\r
171 tokenNumberString = Long.toString(parentToken.tokenNumber, 16);\r
172 }\r
173\r
174 hAutogenStr += String.format("#define _PCD_TOKEN_%s 0x%s\r\n", parentToken.cName, tokenNumberString);\r
175\r
176 //\r
177 // Judge the value of this PCD is byte array type\r
178 //\r
179 if (!isBuildUsedLibrary && !parentToken.isDynamicPCD) {\r
180 if (datum.trim().charAt(0) == '{') {\r
181 isByteArray = true;\r
182 }\r
183 }\r
184\r
185 //\r
186 // "ULL" should be added to value's tail for UINT64 value\r
187 //\r
188 if (parentToken.datumType == Token.DATUM_TYPE.UINT64) {\r
189 printDatum = this.datum + "ULL";\r
190 } else {\r
191 printDatum = this.datum;\r
192 }\r
193\r
194 switch (modulePcdType) {\r
195 case FEATURE_FLAG:\r
196 //\r
197 // Example autogen string for following generation:\r
198 // "extern const BOOLEAN _gPcd_FixedAtBuild_PcdSampleToken";\r
199 // \r
200 hAutogenStr += String.format("extern const BOOLEAN _gPcd_FixedAtBuild_%s;\r\n",\r
201 parentToken.cName);\r
202 //\r
203 // Example autogen string for following generation:\r
204 // "#define _PCD_GET_MODE_8_PcdSampleToken _gPcd_FixedAtBuild_PcdSampleToken";\r
205 // \r
206 hAutogenStr += String.format("#define _PCD_GET_MODE_%s_%s _gPcd_FixedAtBuild_%s\r\n",\r
207 Token.GetAutogenDefinedatumTypeString(parentToken.datumType),\r
208 parentToken.cName,\r
209 parentToken.cName);\r
210 //\r
211 // Example autogen string for following generation:\r
212 // "//#define _PCD_SET_MODE_8_PcdSampleToken ASSERT(FALSE) If is not allowed to set value...";\r
213 // \r
214 hAutogenStr += String.format("//#define _PCD_SET_MODE_%s_%s ASSERT(FALSE) If is not allowed to set value for a FEATURE_FLAG PCD\r\n",\r
215 Token.GetAutogenDefinedatumTypeString(parentToken.datumType),\r
216 parentToken.cName);\r
217\r
218 if (!isBuildUsedLibrary) {\r
219 //\r
220 // Example autogen string for following generation:\r
221 // "#define _PCD_VALUE_PcdSampleToken 0x1000"\r
222 // \r
223 hAutogenStr += String.format("#define _PCD_VALUE_%s %s\r\n",\r
224 parentToken.cName,\r
225 printDatum);\r
226 //\r
227 // Example autogen string for following generation:\r
228 // "GLOBAL_REMOVE_IF_UNREFERENCED const BOOLEAN _gPcd_FixedAtBuild_PcdSampleToken = _PCD_VALUE_PcdSampleToken;"\r
229 // \r
230 cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED const BOOLEAN _gPcd_FixedAtBuild_%s = _PCD_VALUE_%s;\r\n",\r
231 parentToken.cName,\r
232 parentToken.cName);\r
233 }\r
234 break;\r
235 case FIXED_AT_BUILD:\r
236 if (isByteArray) {\r
237 //\r
238 // Example autogen string for following generation:\r
239 // "extern const BOOLEAN _gPcd_FixedAtBuild_PcdSampleToken";\r
240 // \r
241 hAutogenStr += String.format("extern const UINT8 _gPcd_FixedAtBuild_%s[];\r\n",\r
242 parentToken.cName);\r
243 //\r
244 // Example autogen string for following generation:\r
245 // "#define _PCD_GET_MODE_8_PcdSampleToken (VOID*)_gPcd_FixedAtBuild_PcdSampleToken";\r
246 // \r
247 hAutogenStr += String.format("#define _PCD_GET_MODE_%s_%s (VOID*)_gPcd_FixedAtBuild_%s\r\n",\r
248 Token.GetAutogenDefinedatumTypeString(parentToken.datumType),\r
249 parentToken.cName,\r
250 parentToken.cName);\r
251 } else {\r
252 //\r
253 // Example autogen string for following generation:\r
254 // "extern const UINT8 _gPcd_FixedAtBuild_PcdSampleToken";\r
255 // \r
256 hAutogenStr += String.format("extern const %s _gPcd_FixedAtBuild_%s;\r\n",\r
257 Token.getAutogendatumTypeString(parentToken.datumType),\r
258 parentToken.cName);\r
259 //\r
260 // Example autogen string for following generation:\r
261 // "#define _PCD_GET_MODE_8_PcdSampleToken _gPcd_FixedAtBuild_PcdSampleToken";\r
262 // \r
263 hAutogenStr += String.format("#define _PCD_GET_MODE_%s_%s _gPcd_FixedAtBuild_%s\r\n",\r
264 Token.GetAutogenDefinedatumTypeString(parentToken.datumType),\r
265 parentToken.cName,\r
266 parentToken.cName);\r
267 }\r
268\r
269 //\r
270 // Example autogen string for following generation:\r
271 // "//#define _PCD_SET_MODE_8_PcdSampleToken ASSERT(FALSE) If is not allowed to set value...";\r
272 // \r
273 hAutogenStr += String.format("//#define _PCD_SET_MODE_%s_%s ASSERT(FALSE) // It is not allowed to set value for a FIXED_AT_BUILD PCD\r\n",\r
274 Token.GetAutogenDefinedatumTypeString(parentToken.datumType),\r
275 parentToken.cName);\r
276 if (!isBuildUsedLibrary) {\r
277 if (parentToken.datumType == Token.DATUM_TYPE.POINTER) {\r
278 if (isByteArray) {\r
279 //\r
280 // Example autogen string for following generation:\r
281 // "#define _PCD_VALUE_PcdSampleToken (VOID*)_gPcd_FixedAtBuild_PcdSampleToken"\r
282 // \r
283 hAutogenStr += String.format("#define _PCD_VALUE_%s (VOID*)_gPcd_FixedAtBuild_%s\r\n",\r
284 parentToken.cName,\r
285 parentToken.cName);\r
286 //\r
287 // Example autogen string for following generation:\r
288 // "GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gPcd_FixedAtBuild_PcdSampleToken[] = 'dfdf';"\r
289 // \r
290 cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gPcd_FixedAtBuild_%s[] = %s;\r\n",\r
291 parentToken.cName,\r
292 printDatum);\r
293 } else {\r
294 //\r
295 // Example autogen string for following generation:\r
296 // "#define _PCD_VALUE_PcdSampleToken 0x222"\r
297 // \r
298 hAutogenStr += String.format("#define _PCD_VALUE_%s %s\r\n",\r
299 parentToken.cName,\r
300 printDatum);\r
301 //\r
302 // Example autogen string for following generation:\r
303 // "GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gPcd_FixedAtBuild_PcdSampleToken[] = _PCD_VALUE_PcdSampleToken;"\r
304 // \r
305 cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED const %s _gPcd_FixedAtBuild_%s = _PCD_VALUE_%s;\r\n",\r
306 Token.getAutogendatumTypeString(parentToken.datumType),\r
307 parentToken.cName,\r
308 parentToken.cName);\r
309 }\r
310 } else {\r
311 //\r
312 // Example autogen string for following generation:\r
313 // "#define _PCD_VALUE_PcdSampleToken 0x222"\r
314 // \r
315 hAutogenStr += String.format("#define _PCD_VALUE_%s %s\r\n",\r
316 parentToken.cName,\r
317 printDatum);\r
318 //\r
319 // Example autogen string for following generation:\r
320 // "GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gPcd_FixedAtBuild_PcdSampleToken[] = _PCD_VALUE_PcdSampleToken;"\r
321 // \r
322 cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED const %s _gPcd_FixedAtBuild_%s = _PCD_VALUE_%s;\r\n",\r
323 Token.getAutogendatumTypeString(parentToken.datumType),\r
324 parentToken.cName,\r
325 parentToken.cName);\r
326 }\r
327 }\r
328 break;\r
329 case PATCHABLE_IN_MODULE:\r
330 if (parentToken.datumType == Token.DATUM_TYPE.POINTER) {\r
331 //\r
332 // Example autogen string for following generation:\r
333 // "extern UINT8 _gPcd_BinaryPatch_PcdSampleToken[];"\r
334 // \r
335 hAutogenStr += String.format("extern UINT8 _gPcd_BinaryPatch_%s[];\r\n",\r
336 parentToken.cName);\r
337 //\r
338 // Example autogen string for following generation:\r
339 // "#define _PCD_GET_MODE_8_PcdSampleToken (VOID*)_gPcd_BinaryPatch_PcdSampleToken"\r
340 // \r
341 hAutogenStr += String.format("#define _PCD_GET_MODE_%s_%s (VOID*)_gPcd_BinaryPatch_%s\r\n",\r
342 Token.GetAutogenDefinedatumTypeString(parentToken.datumType),\r
343 parentToken.cName,\r
344 parentToken.cName);\r
345 //\r
346 // Example autogen string for following generation:\r
347 // "#define _PCD_SET_MODE_8_PcdSampleToken(SizeOfBuffer, Buffer) CopyMem (_gPcd_BinaryPatch_PcdSampleToken, (Buffer), (SizeOfBuffer))"\r
348 // \r
349 hAutogenStr += String.format("#define _PCD_PATCHABLE_%s_SIZE %d\r\n",\r
350 parentToken.cName,\r
351 parentToken.datumSize);\r
352 hAutogenStr += String.format("#define _PCD_SET_MODE_%s_%s(SizeOfBuffer, Buffer) "+\r
353 "LibPatchPcdSetPtr (_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, "+\r
354 "(SizeOfBuffer), (Buffer))\r\n",\r
355 Token.GetAutogenDefinedatumTypeString(parentToken.datumType),\r
356 parentToken.cName,\r
357 parentToken.cName,\r
358 parentToken.cName);\r
359\r
360 } else {\r
361 //\r
362 // Example autogen string for following generation:\r
363 // "extern UINT8 _gPcd_BinaryPatch_PcdSampleToken;"\r
364 // \r
365 hAutogenStr += String.format("extern %s _gPcd_BinaryPatch_%s;\r\n",\r
366 Token.getAutogendatumTypeString(parentToken.datumType),\r
367 parentToken.cName);\r
368 //\r
369 // Example autogen string for following generation:\r
370 // "#define _PCD_GET_MODE_8_PcdSampleToken _gPcd_BinaryPatch_PcdSampleToken"\r
371 // \r
372 hAutogenStr += String.format("#define _PCD_GET_MODE_%s_%s _gPcd_BinaryPatch_%s\r\n",\r
373 Token.GetAutogenDefinedatumTypeString(parentToken.datumType),\r
374 parentToken.cName,\r
375 parentToken.cName);\r
376 //\r
377 // Example autogen string for following generation:\r
378 // "#define _PCD_SET_MODE_8_PcdSampleToken(Value) (_gPcd_BinaryPatch_PcdSampleToken = (Value))"\r
379 // \r
380 hAutogenStr += String.format("#define _PCD_SET_MODE_%s_%s(Value) (_gPcd_BinaryPatch_%s = (Value))\r\n",\r
381 Token.GetAutogenDefinedatumTypeString(parentToken.datumType),\r
382 parentToken.cName,\r
383 parentToken.cName);\r
384 }\r
385\r
386 if (!isBuildUsedLibrary) {\r
387 if (parentToken.datumType == Token.DATUM_TYPE.POINTER) {\r
388 printDatum = parentToken.getByteArrayForPointerDatum(printDatum);\r
389 }\r
390 //\r
391 // Example autogen string for following generation:\r
392 // "#define _PCD_VALUE_PcdSampleToken 0x111"\r
393 // \r
394 hAutogenStr += String.format("#define _PCD_VALUE_%s %s\r\n",\r
395 parentToken.cName,\r
396 printDatum);\r
397 if (parentToken.datumType == Token.DATUM_TYPE.POINTER) {\r
398 //\r
399 // Example autogen string for following generation:\r
400 // "GLOBAL_REMOVE_IF_UNREFERENCED UINT8 _gPcd_BinaryPatch_PcdSampleToken[] = _PCD_VALUE_PcdSampleToken;"\r
401 // \r
402 cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED UINT8 _gPcd_BinaryPatch_%s[%d] = _PCD_VALUE_%s;\r\n",\r
403 parentToken.cName,\r
404 parentToken.datumSize,\r
405 parentToken.cName);\r
406 } else {\r
407 //\r
408 // Example autogen string for following generation:\r
409 // "GLOBAL_REMOVE_IF_UNREFERENCED UINT8 _gPcd_BinaryPatch_PcdSampleToken[] = _PCD_VALUE_PcdSampleToken;"\r
410 // \r
411 cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED %s _gPcd_BinaryPatch_%s = _PCD_VALUE_%s;\r\n",\r
412 Token.getAutogendatumTypeString(parentToken.datumType),\r
413 parentToken.cName,\r
414 parentToken.cName);\r
415 }\r
416 }\r
417\r
418 break;\r
419 case DYNAMIC:\r
420 //\r
421 // Example autogen string for following generation:\r
422 // "#define _PCD_GET_MODE_8_PcdSampleToken LibPcdGet%s(_PCD_TOKEN_PcdSampleToken)"\r
423 // \r
424 hAutogenStr += String.format("#define _PCD_GET_MODE_%s_%s LibPcdGet%s(_PCD_TOKEN_%s)\r\n",\r
425 Token.GetAutogenDefinedatumTypeString(parentToken.datumType),\r
426 parentToken.cName,\r
427 Token.getAutogenLibrarydatumTypeString(parentToken.datumType),\r
428 parentToken.cName);\r
429 if (parentToken.datumType == Token.DATUM_TYPE.POINTER) {\r
430 //\r
431 // Example autogen string for following generation:\r
432 // "#define _PCD_SET_MODE_8_PcdSampleToken(SizeOfBuffer, Buffer) LibPcdSet%s(_PCD_TOKEN_PcdSampleToken, (SizeOfBuffer), (Buffer))"\r
433 // \r
434 hAutogenStr += String.format("#define _PCD_SET_MODE_%s_%s(SizeOfBuffer, Buffer) LibPcdSet%s(_PCD_TOKEN_%s, (SizeOfBuffer), (Buffer))\r\n",\r
435 Token.GetAutogenDefinedatumTypeString(parentToken.datumType),\r
436 parentToken.cName,\r
437 Token.getAutogenLibrarydatumTypeString(parentToken.datumType),\r
438 parentToken.cName);\r
439 } else {\r
440 //\r
441 // Example autogen string for following generation:\r
442 // "#define _PCD_SET_MODE_8_PcdSampleToken(Value) LibPcdSet%s(_PCD_TOKEN_PcdSampleToken, (Value))"\r
443 // \r
444 hAutogenStr += String.format("#define _PCD_SET_MODE_%s_%s(Value) LibPcdSet%s(_PCD_TOKEN_%s, (Value))\r\n",\r
445 Token.GetAutogenDefinedatumTypeString(parentToken.datumType),\r
446 parentToken.cName,\r
447 Token.getAutogenLibrarydatumTypeString(parentToken.datumType),\r
448 parentToken.cName);\r
449 }\r
450 break;\r
451 case DYNAMIC_EX:\r
452 guidStringCName = "_gPcd_TokenSpaceGuid_" +\r
453 parentToken.tokenSpaceName.toString().replaceAll("-", "_");\r
454\r
455 //\r
456 // Example autogen string for following generation:\r
457 // "#define _PCD_GET_MODE_8_PcdSampleToken LibPcdGetEx%s(&_gPcd_TokenSpaceGuid_00_00_00, _PCD_TOKEN_PcdSampleToken)"\r
458 // \r
459 hAutogenStr += String.format("#define _PCD_GET_MODE_%s_%s LibPcdGetEx%s(&%s, _PCD_TOKEN_%s)\r\n",\r
460 Token.GetAutogenDefinedatumTypeString(parentToken.datumType),\r
461 parentToken.cName,\r
462 Token.getAutogenLibrarydatumTypeString(parentToken.datumType),\r
463 guidStringCName,\r
464 parentToken.cName);\r
465\r
466 if (parentToken.datumType == Token.DATUM_TYPE.POINTER) {\r
467 //\r
468 // Example autogen string for following generation:\r
469 // "#define _PCD_SET_MODE_8_PcdSampleToken(SizeOfBuffer, Buffer) LibPcdSetEx%s(&_gPcd_TokenSpaceGuid_00_00_00, _PCD_TOKEN_PcdSampleToken, (SizeOfBuffer), (Buffer))"\r
470 // \r
471 hAutogenStr += String.format("#define _PCD_SET_MODE_%s_%s(SizeOfBuffer, Buffer) LibPcdSetEx%s(&%s, _PCD_TOKEN_%s, (SizeOfBuffer), (Buffer))\r\n",\r
472 Token.GetAutogenDefinedatumTypeString(parentToken.datumType),\r
473 parentToken.cName,\r
474 Token.getAutogenLibrarydatumTypeString(parentToken.datumType),\r
475 guidStringCName,\r
476 parentToken.cName);\r
477 } else {\r
478 //\r
479 // Example autogen string for following generation:\r
480 // "#define _PCD_SET_MODE_8_PcdSampleToken(Value) LibPcdSetEx%s(&_gPcd_TokenSpaceGuid_00_00_00, _PCD_TOKEN_PcdSampleToken, (Value))"\r
481 //\r
482 hAutogenStr += String.format("#define _PCD_SET_MODE_%s_%s(Value) LibPcdSetEx%s(&%s, _PCD_TOKEN_%s, (Value))\r\n",\r
483 Token.GetAutogenDefinedatumTypeString(parentToken.datumType),\r
484 parentToken.cName,\r
485 Token.getAutogenLibrarydatumTypeString(parentToken.datumType),\r
486 guidStringCName,\r
487 parentToken.cName);\r
488\r
489 }\r
490 break;\r
491 }\r
492 }\r
493\r
494 /**\r
495 Get the autogen string for header file.\r
496\r
497 @return The string of header file.\r
498 **/\r
499 public String getHAutogenStr() {\r
500 return hAutogenStr;\r
501 }\r
502\r
503 /**\r
504 Get the autogen string for C code file.\r
505\r
506 @return The string of C Code file.\r
507 **/\r
508 public String getCAutogenStr() {\r
509 return cAutogenStr;\r
510 }\r
511}\r
512\r