ScriptAPIDump.cpp 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. //
  2. // Copyright (c) 2008-2014 the Urho3D project.
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to deal
  6. // in the Software without restriction, including without limitation the rights
  7. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. // copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. // THE SOFTWARE.
  21. //
  22. #include "Precompiled.h"
  23. #include "Context.h"
  24. #include "File.h"
  25. #include "FileSystem.h"
  26. #include "Log.h"
  27. #include "Script.h"
  28. #include <AngelScript/angelscript.h>
  29. #include "DebugNew.h"
  30. namespace Urho3D
  31. {
  32. /// %Object property info for scripting API dump.
  33. struct PropertyInfo
  34. {
  35. /// Construct.
  36. PropertyInfo() :
  37. read_(false),
  38. write_(false),
  39. indexed_(false)
  40. {
  41. }
  42. /// Property name.
  43. String name_;
  44. /// Property data type.
  45. String type_;
  46. /// Reading supported flag.
  47. bool read_;
  48. /// Writing supported flag.
  49. bool write_;
  50. /// Indexed flag.
  51. bool indexed_;
  52. };
  53. void ExtractPropertyInfo(const String& functionName, const String& declaration, Vector<PropertyInfo>& propertyInfos)
  54. {
  55. String propertyName = functionName.Substring(4);
  56. PropertyInfo* info = 0;
  57. for (unsigned k = 0; k < propertyInfos.Size(); ++k)
  58. {
  59. if (propertyInfos[k].name_ == propertyName)
  60. {
  61. info = &propertyInfos[k];
  62. break;
  63. }
  64. }
  65. if (!info)
  66. {
  67. propertyInfos.Resize(propertyInfos.Size() + 1);
  68. info = &propertyInfos.Back();
  69. info->name_ = propertyName;
  70. }
  71. if (functionName.Contains("get_"))
  72. {
  73. info->read_ = true;
  74. // Extract type from the return value
  75. Vector<String> parts = declaration.Split(' ');
  76. if (parts.Size())
  77. {
  78. if (parts[0] != "const")
  79. info->type_ = parts[0];
  80. else if (parts.Size() > 1)
  81. info->type_ = parts[1];
  82. }
  83. // If get method has parameters, it is indexed
  84. if (!declaration.Contains("()"))
  85. {
  86. info->indexed_ = true;
  87. info->type_ += "[]";
  88. }
  89. // Sanitate the reference operator away
  90. info->type_.Replace("&", "");
  91. }
  92. if (functionName.Contains("set_"))
  93. {
  94. info->write_ = true;
  95. if (info->type_.Empty())
  96. {
  97. // Extract type from parameters
  98. unsigned begin = declaration.Find(',');
  99. if (begin == String::NPOS)
  100. begin = declaration.Find('(');
  101. else
  102. info->indexed_ = true;
  103. if (begin != String::NPOS)
  104. {
  105. ++begin;
  106. unsigned end = declaration.Find(')');
  107. if (end != String::NPOS)
  108. {
  109. info->type_ = declaration.Substring(begin, end - begin);
  110. // Sanitate const & reference operator away
  111. info->type_.Replace("const ", "");
  112. info->type_.Replace("&in", "");
  113. info->type_.Replace("&", "");
  114. }
  115. }
  116. }
  117. }
  118. }
  119. bool ComparePropertyStrings(const String& lhs, const String& rhs)
  120. {
  121. int spaceLhs = lhs.Find(' ');
  122. int spaceRhs = rhs.Find(' ');
  123. if (spaceLhs != String::NPOS && spaceRhs != String::NPOS)
  124. return String::Compare(lhs.CString() + spaceLhs, rhs.CString() + spaceRhs, true) < 0;
  125. else
  126. return String::Compare(lhs.CString(), rhs.CString(), true) < 0;
  127. }
  128. bool ComparePropertyInfos(const PropertyInfo& lhs, const PropertyInfo& rhs)
  129. {
  130. return String::Compare(lhs.name_.CString(), rhs.name_.CString(), true) < 0;
  131. }
  132. void Script::OutputAPIRow(DumpMode mode, const String& row, bool removeReference, String separator)
  133. {
  134. String out(row);
  135. ///\todo We need C++11 <regex> in String class to handle REGEX whole-word replacement correctly. Can't do that since we still support VS2008.
  136. // Commenting out to temporary fix property name like 'doubleClickInterval' from being wrongly replaced.
  137. // Fortunately, there is no occurence of type 'double' in the API at the moment.
  138. //out.Replace("double", "float"); // s/\bdouble\b/float/g
  139. out.Replace("&in", "&");
  140. out.Replace("&out", "&");
  141. if (removeReference)
  142. out.Replace("&", "");
  143. if (mode == DOXYGEN)
  144. Log::WriteRaw("- " + out + "\n");
  145. else if (mode == C_HEADER)
  146. {
  147. out.Replace("@", "");
  148. out.Replace("?&", "void*");
  149. // s/(\w+)\[\]/Array<\1>/g
  150. unsigned posBegin = String::NPOS;
  151. while (1) // Loop to cater for array of array of T
  152. {
  153. unsigned posEnd = out.Find("[]");
  154. if (posEnd == String::NPOS)
  155. break;
  156. if (posBegin > posEnd)
  157. posBegin = posEnd - 1;
  158. while (posBegin < posEnd && isalnum(out[posBegin]))
  159. --posBegin;
  160. ++posBegin;
  161. out.Replace(posBegin, posEnd - posBegin + 2, "Array<" + out.Substring(posBegin, posEnd - posBegin) + ">");
  162. }
  163. Log::WriteRaw(out + separator + "\n");
  164. }
  165. }
  166. void Script::DumpAPI(DumpMode mode, const String& sourceTree)
  167. {
  168. // Does not use LOGRAW macro here to ensure the messages are always dumped regardless of URHO3D_LOGGING compiler directive
  169. // and of Log subsystem availability
  170. // Dump event descriptions and attribute definitions in Doxygen mode. For events, this means going through the header files,
  171. // as the information is not available otherwise.
  172. /// \todo Dump events + attributes before the actual script API because the remarks (readonly / writeonly) seem to throw off
  173. // Doxygen parsing and the following page definition(s) may not be properly recognized
  174. if (mode == DOXYGEN)
  175. {
  176. Log::WriteRaw("namespace Urho3D\n{\n\n/**\n");
  177. FileSystem* fileSystem = GetSubsystem<FileSystem>();
  178. Vector<String> headerFiles;
  179. String path = AddTrailingSlash(sourceTree);
  180. if (!path.Empty())
  181. path.Append("Source/Urho3D/");
  182. fileSystem->ScanDir(headerFiles, path, "*.h", SCAN_FILES, true);
  183. if (!headerFiles.Empty())
  184. {
  185. Log::WriteRaw("\n\\page EventList Event list\n");
  186. Sort(headerFiles.Begin(), headerFiles.End());
  187. for (unsigned i = 0; i < headerFiles.Size(); ++i)
  188. {
  189. if (headerFiles[i].EndsWith("Events.h"))
  190. {
  191. SharedPtr<File> file(new File(context_, path + headerFiles[i], FILE_READ));
  192. if (!file->IsOpen())
  193. continue;
  194. unsigned start = headerFiles[i].Find('/') + 1;
  195. unsigned end = headerFiles[i].Find("Events.h");
  196. Log::WriteRaw("\n## %" + headerFiles[i].Substring(start, end - start) + " events\n");
  197. while (!file->IsEof())
  198. {
  199. String line = file->ReadLine();
  200. if (line.StartsWith("EVENT"))
  201. {
  202. Vector<String> parts = line.Split(',');
  203. if (parts.Size() == 2)
  204. Log::WriteRaw("\n### " + parts[1].Substring(0, parts[1].Length() - 1).Trimmed() + "\n");
  205. }
  206. if (line.Contains("PARAM"))
  207. {
  208. Vector<String> parts = line.Split(',');
  209. if (parts.Size() == 2)
  210. {
  211. String paramName = parts[1].Substring(0, parts[1].Find(')')).Trimmed();
  212. String paramType = parts[1].Substring(parts[1].Find("// ") + 3);
  213. if (!paramName.Empty() && !paramType.Empty())
  214. Log::WriteRaw("- %" + paramName + " : " + paramType + "\n");
  215. }
  216. }
  217. }
  218. }
  219. }
  220. Log::WriteRaw("\n");
  221. }
  222. Log::WriteRaw("\n\\page AttributeList Attribute list\n");
  223. const HashMap<StringHash, Vector<AttributeInfo> >& attributes = context_->GetAllAttributes();
  224. Vector<String> objectTypes;
  225. for (HashMap<StringHash, Vector<AttributeInfo> >::ConstIterator i = attributes.Begin(); i != attributes.End();
  226. ++i)
  227. objectTypes.Push(context_->GetTypeName(i->first_));
  228. Sort(objectTypes.Begin(), objectTypes.End());
  229. for (unsigned i = 0; i < objectTypes.Size(); ++i)
  230. {
  231. const Vector<AttributeInfo>& attrs = attributes.Find(objectTypes[i])->second_;
  232. unsigned usableAttrs = 0;
  233. for (unsigned j = 0; j < attrs.Size(); ++j)
  234. {
  235. // Attributes that are not shown in the editor are typically internal and not usable for eg. attribute
  236. // animation
  237. if (attrs[j].mode_ & AM_NOEDIT)
  238. continue;
  239. ++usableAttrs;
  240. }
  241. if (!usableAttrs)
  242. continue;
  243. Log::WriteRaw("\n### " + objectTypes[i] + "\n");
  244. for (unsigned j = 0; j < attrs.Size(); ++j)
  245. {
  246. if (attrs[j].mode_ & AM_NOEDIT)
  247. continue;
  248. // Prepend each word in the attribute name with % to prevent unintended links
  249. Vector<String> nameParts = attrs[j].name_.Split(' ');
  250. for (unsigned k = 0; k < nameParts.Size(); ++k)
  251. {
  252. if (nameParts[k].Length() > 1 && IsAlpha(nameParts[k][0]))
  253. nameParts[k] = "%" + nameParts[k];
  254. }
  255. String name;
  256. name.Join(nameParts, " ");
  257. String type = Variant::GetTypeName(attrs[j].type_);
  258. // Variant typenames are all uppercase. Convert primitive types to the proper lowercase form for the documentation
  259. if (type == "Int" || type == "Bool" || type == "Float")
  260. type[0] = ToLower(type[0]);
  261. Log::WriteRaw("- " + name + " : " + type + "\n");
  262. }
  263. }
  264. Log::WriteRaw("\n");
  265. }
  266. if (mode == DOXYGEN)
  267. Log::WriteRaw("\n\\page ScriptAPI Scripting API\n\n");
  268. else if (mode == C_HEADER)
  269. Log::WriteRaw("// Script API header intended to be 'force included' in IDE for AngelScript content assist / code completion\n\n"
  270. "#define int8 signed char\n"
  271. "#define int16 signed short\n"
  272. "#define int64 long\n"
  273. "#define uint8 unsigned char\n"
  274. "#define uint16 unsigned short\n"
  275. "#define uint64 unsigned long\n"
  276. "#define null 0\n");
  277. unsigned types = scriptEngine_->GetObjectTypeCount();
  278. Vector<Pair<String, unsigned> > sortedTypes;
  279. for (unsigned i = 0; i < types; ++i)
  280. {
  281. asIObjectType* type = scriptEngine_->GetObjectTypeByIndex(i);
  282. if (type)
  283. {
  284. String typeName(type->GetName());
  285. sortedTypes.Push(MakePair(typeName, i));
  286. }
  287. }
  288. Sort(sortedTypes.Begin(), sortedTypes.End());
  289. if (mode == DOXYGEN)
  290. {
  291. Log::WriteRaw("\\section ScriptAPI_TableOfContents Table of contents\n"
  292. "\\ref ScriptAPI_ClassList \"Class list\"<br>\n"
  293. "\\ref ScriptAPI_Classes \"Classes\"<br>\n"
  294. "\\ref ScriptAPI_Enums \"Enumerations\"<br>\n"
  295. "\\ref ScriptAPI_GlobalFunctions \"Global functions\"<br>\n"
  296. "\\ref ScriptAPI_GlobalProperties \"Global properties\"<br>\n"
  297. "\\ref ScriptAPI_GlobalConstants \"Global constants\"<br>\n\n");
  298. Log::WriteRaw("\\section ScriptAPI_ClassList Class list\n\n");
  299. for (unsigned i = 0; i < sortedTypes.Size(); ++i)
  300. {
  301. asIObjectType* type = scriptEngine_->GetObjectTypeByIndex(sortedTypes[i].second_);
  302. if (type)
  303. {
  304. String typeName(type->GetName());
  305. Log::WriteRaw("<a href=\"#Class_" + typeName + "\"><b>" + typeName + "</b></a>\n");
  306. }
  307. }
  308. Log::WriteRaw("\n\\section ScriptAPI_Classes Classes\n");
  309. }
  310. else if (mode == C_HEADER)
  311. Log::WriteRaw("\n// Classes\n");
  312. for (unsigned i = 0; i < sortedTypes.Size(); ++i)
  313. {
  314. asIObjectType* type = scriptEngine_->GetObjectTypeByIndex(sortedTypes[i].second_);
  315. if (type)
  316. {
  317. String typeName(type->GetName());
  318. Vector<String> methodDeclarations;
  319. Vector<PropertyInfo> propertyInfos;
  320. if (mode == DOXYGEN)
  321. {
  322. Log::WriteRaw("<a name=\"Class_" + typeName + "\"></a>\n");
  323. Log::WriteRaw("\n### " + typeName + "\n");
  324. }
  325. else if (mode == C_HEADER)
  326. {
  327. ///\todo Find a cleaner way to do this instead of hardcoding
  328. if (typeName == "Array")
  329. Log::WriteRaw("\ntemplate <class T> class " + typeName + "\n{\n");
  330. else
  331. Log::WriteRaw("\nclass " + typeName + "\n{\n");
  332. }
  333. unsigned methods = type->GetMethodCount();
  334. for (unsigned j = 0; j < methods; ++j)
  335. {
  336. asIScriptFunction* method = type->GetMethodByIndex(j);
  337. String methodName(method->GetName());
  338. String declaration(method->GetDeclaration());
  339. if (methodName.Contains("get_") || methodName.Contains("set_"))
  340. ExtractPropertyInfo(methodName, declaration, propertyInfos);
  341. else
  342. {
  343. // Sanitate the method name. \todo For now, skip the operators
  344. if (!declaration.Contains("::op"))
  345. {
  346. String prefix(typeName + "::");
  347. declaration.Replace(prefix, "");
  348. ///\todo Is there a better way to mark deprecated API bindings for AngelScript?
  349. unsigned posBegin = declaration.FindLast("const String&in = \"deprecated:");
  350. if (posBegin != String::NPOS)
  351. {
  352. // Assume this 'mark' is added as the last parameter
  353. unsigned posEnd = declaration.Find(')', posBegin);
  354. if (posBegin != String::NPOS)
  355. {
  356. declaration.Replace(posBegin, posEnd - posBegin, "");
  357. posBegin = declaration.Find(", ", posBegin - 2);
  358. if (posBegin != String::NPOS)
  359. declaration.Replace(posBegin, 2, "");
  360. if (mode == DOXYGEN)
  361. declaration += " // deprecated";
  362. else if (mode == C_HEADER)
  363. declaration = "/* deprecated */\n" + declaration;
  364. }
  365. }
  366. methodDeclarations.Push(declaration);
  367. }
  368. }
  369. }
  370. // Assume that the same property is never both an accessor property, and a direct one
  371. unsigned properties = type->GetPropertyCount();
  372. for (unsigned j = 0; j < properties; ++j)
  373. {
  374. const char* propertyName;
  375. const char* propertyDeclaration;
  376. int typeId;
  377. type->GetProperty(j, &propertyName, &typeId);
  378. propertyDeclaration = scriptEngine_->GetTypeDeclaration(typeId);
  379. PropertyInfo newInfo;
  380. newInfo.name_ = String(propertyName);
  381. newInfo.type_ = String(propertyDeclaration);
  382. newInfo.read_ = newInfo.write_ = true;
  383. propertyInfos.Push(newInfo);
  384. }
  385. Sort(methodDeclarations.Begin(), methodDeclarations.End(), ComparePropertyStrings);
  386. Sort(propertyInfos.Begin(), propertyInfos.End(), ComparePropertyInfos);
  387. if (!methodDeclarations.Empty())
  388. {
  389. if (mode == DOXYGEN)
  390. Log::WriteRaw("\nMethods:\n\n");
  391. else if (mode == C_HEADER)
  392. Log::WriteRaw("// Methods:\n");
  393. for (unsigned j = 0; j < methodDeclarations.Size(); ++j)
  394. OutputAPIRow(mode, methodDeclarations[j]);
  395. }
  396. if (!propertyInfos.Empty())
  397. {
  398. if (mode == DOXYGEN)
  399. Log::WriteRaw("\nProperties:\n\n");
  400. else if (mode == C_HEADER)
  401. Log::WriteRaw("\n// Properties:\n");
  402. for (unsigned j = 0; j < propertyInfos.Size(); ++j)
  403. {
  404. String remark;
  405. String cppdoc;
  406. if (!propertyInfos[j].write_)
  407. remark = "readonly";
  408. else if (!propertyInfos[j].read_)
  409. remark = "writeonly";
  410. if (!remark.Empty())
  411. {
  412. if (mode == DOXYGEN)
  413. {
  414. remark = " // " + remark;
  415. }
  416. else if (mode == C_HEADER)
  417. {
  418. cppdoc = "/* " + remark + " */\n";
  419. remark.Clear();
  420. }
  421. }
  422. OutputAPIRow(mode, cppdoc + propertyInfos[j].type_ + " " + propertyInfos[j].name_ + remark);
  423. }
  424. }
  425. if (mode == DOXYGEN)
  426. Log::WriteRaw("\n");
  427. else if (mode == C_HEADER)
  428. Log::WriteRaw("};\n");
  429. }
  430. }
  431. Vector<PropertyInfo> globalPropertyInfos;
  432. Vector<String> globalFunctions;
  433. unsigned functions = scriptEngine_->GetGlobalFunctionCount();
  434. for (unsigned i = 0; i < functions; ++i)
  435. {
  436. asIScriptFunction* function = scriptEngine_->GetGlobalFunctionByIndex(i);
  437. String functionName(function->GetName());
  438. String declaration(function->GetDeclaration());
  439. if (functionName.Contains("set_") || functionName.Contains("get_"))
  440. ExtractPropertyInfo(functionName, declaration, globalPropertyInfos);
  441. else
  442. globalFunctions.Push(declaration);
  443. }
  444. Sort(globalFunctions.Begin(), globalFunctions.End(), ComparePropertyStrings);
  445. Sort(globalPropertyInfos.Begin(), globalPropertyInfos.End(), ComparePropertyInfos);
  446. if (mode == DOXYGEN)
  447. Log::WriteRaw("\\section ScriptAPI_Enums Enumerations\n");
  448. else if (mode == C_HEADER)
  449. Log::WriteRaw("\n// Enumerations\n");
  450. unsigned enums = scriptEngine_->GetEnumCount();
  451. Vector<Pair<String, unsigned> > sortedEnums;
  452. for (unsigned i = 0; i < enums; ++i)
  453. {
  454. int typeId;
  455. sortedEnums.Push(MakePair(String(scriptEngine_->GetEnumByIndex(i, &typeId)), i));
  456. }
  457. Sort(sortedEnums.Begin(), sortedEnums.End());
  458. for (unsigned i = 0; i < sortedEnums.Size(); ++i)
  459. {
  460. int typeId = 0;
  461. if (mode == DOXYGEN)
  462. Log::WriteRaw("\n### " + String(scriptEngine_->GetEnumByIndex(sortedEnums[i].second_, &typeId)) + "\n\n");
  463. else if (mode == C_HEADER)
  464. Log::WriteRaw("\nenum " + String(scriptEngine_->GetEnumByIndex(sortedEnums[i].second_, &typeId)) + "\n{\n");
  465. for (unsigned j = 0; j < (unsigned)scriptEngine_->GetEnumValueCount(typeId); ++j)
  466. {
  467. int value = 0;
  468. const char* name = scriptEngine_->GetEnumValueByIndex(typeId, j, &value);
  469. OutputAPIRow(mode, String(name), false, ",");
  470. }
  471. if (mode == DOXYGEN)
  472. Log::WriteRaw("\n");
  473. else if (mode == C_HEADER)
  474. Log::WriteRaw("};\n");
  475. }
  476. if (mode == DOXYGEN)
  477. Log::WriteRaw("\\section ScriptAPI_GlobalFunctions Global functions\n");
  478. else if (mode == C_HEADER)
  479. Log::WriteRaw("\n// Global functions\n");
  480. for (unsigned i = 0; i < globalFunctions.Size(); ++i)
  481. OutputAPIRow(mode, globalFunctions[i]);
  482. if (mode == DOXYGEN)
  483. Log::WriteRaw("\\section ScriptAPI_GlobalProperties Global properties\n");
  484. else if (mode == C_HEADER)
  485. Log::WriteRaw("\n// Global properties\n");
  486. for (unsigned i = 0; i < globalPropertyInfos.Size(); ++i)
  487. OutputAPIRow(mode, globalPropertyInfos[i].type_ + " " + globalPropertyInfos[i].name_, true);
  488. if (mode == DOXYGEN)
  489. Log::WriteRaw("\\section ScriptAPI_GlobalConstants Global constants\n");
  490. else if (mode == C_HEADER)
  491. Log::WriteRaw("\n// Global constants\n");
  492. Vector<String> globalConstants;
  493. unsigned properties = scriptEngine_->GetGlobalPropertyCount();
  494. for (unsigned i = 0; i < properties; ++i)
  495. {
  496. const char* propertyName;
  497. const char* propertyDeclaration;
  498. int typeId;
  499. scriptEngine_->GetGlobalPropertyByIndex(i, &propertyName, 0, &typeId);
  500. propertyDeclaration = scriptEngine_->GetTypeDeclaration(typeId);
  501. String type(propertyDeclaration);
  502. globalConstants.Push(type + " " + String(propertyName));
  503. }
  504. Sort(globalConstants.Begin(), globalConstants.End(), ComparePropertyStrings);
  505. for (unsigned i = 0; i < globalConstants.Size(); ++i)
  506. OutputAPIRow(mode, globalConstants[i], true);
  507. if (mode == DOXYGEN)
  508. Log::WriteRaw("*/\n\n}\n");
  509. }
  510. }