| 548 | //----------------------------------------------------------------------------- |
| 549 | |
| 550 | static void exportScope(const EngineExportScope* scope, SimXMLDocument* xml, bool addNode) |
| 551 | { |
| 552 | if (addNode) |
| 553 | { |
| 554 | if (isExportFiltered(scope)) |
| 555 | return; |
| 556 | |
| 557 | xml->pushNewElement("EngineExportScope"); |
| 558 | |
| 559 | xml->setAttribute("name", scope->getExportName()); |
| 560 | xml->setAttribute("docs", getDocString(scope)); |
| 561 | } |
| 562 | |
| 563 | // Dump all contained exports. |
| 564 | |
| 565 | xml->pushNewElement("exports"); |
| 566 | |
| 567 | for (const EngineExport* exportInfo = scope->getExports(); exportInfo != NULL; exportInfo = exportInfo->getNextExport()) |
| 568 | { |
| 569 | switch (exportInfo->getExportKind()) |
| 570 | { |
| 571 | case EngineExportKindScope: |
| 572 | exportScope(static_cast< const EngineExportScope* >(exportInfo), xml, true); |
| 573 | break; |
| 574 | |
| 575 | case EngineExportKindFunction: |
| 576 | exportFunction(static_cast< const EngineFunctionInfo* >(exportInfo), xml); |
| 577 | break; |
| 578 | |
| 579 | case EngineExportKindType: |
| 580 | exportType(static_cast< const EngineTypeInfo* >(exportInfo), xml); |
| 581 | break; |
| 582 | |
| 583 | default: |
| 584 | AssertFatal(true, "Unknown EngineExportKind: " + exportInfo->getExportKind()); |
| 585 | break; |
| 586 | } |
| 587 | } |
| 588 | |
| 589 | xml->popElement(); |
| 590 | |
| 591 | if (addNode) |
| 592 | xml->popElement(); |
| 593 | } |
| 594 | |
| 595 | //----------------------------------------------------------------------------- |
| 596 |
no test coverage detected