Class FZagalaSpecZagalaSpecExporter#

Inheritance Relationships#

Base Type#

Class Documentation#

class FZagalaSpecZagalaSpecExporter : public IZagalaSpecBDDExporter#

Exports a Feature to ZagalaSpec-native (.zagalaspec) text.

Format overview:

@Identifier
Feature: <FullTagName>
  <Description>

  Shared Context Extensions:
    Given <shared extension step>

  @ScenarioTag
  Scenario: <FullTagName>
    Context Extensions:
      Given <per-scenario extension step>
      # DataTable: rows from UDataTable assigned at runtime
    Expectations:
      Given <expectation step>
      When  <expectation step>
      Then  <expectation step>

  @ScenarioTag
  Scenario: <FullTagName>
    Given <expectation step>
    When  <expectation step>
    Then  <expectation step>
    # If no Context Extensions, the Expectations section is omitted and the steps are listed directly under the Scenario.

Non-Text expectations and extensions are represented by their class display name. Tags use underscore-joined GameplayTag names (dots replaced with underscores).

Note

ExportToFile() is provided by IZagalaSpecBDDExporter.

Public Functions

virtual FString ExportFromIR(const FZagalaSpecFeatureIR &ImportedFeature, EZagalaSpecExportFormat Format) const override#

Export an FZagalaSpecFeatureIR IR struct to a format-specific text string.

All concrete exporters implement this as the primary conversion path. The base Export() default routes through this method via the .zagalaspec intermediate.

Parameters:
  • ImportedFeature – Feature IR to export.

  • Format – Target export format.

Returns:

The exported text.

virtual FString GenerateTextFeatureFromIR(const FZagalaSpecFeatureIR &ImportedFeature, EZagalaSpecExportFormat &Format) const override#

Generate the complete format-specific text of a feature IR.

Parameters:
  • ImportedFeature – Feature IR to convert.

  • Format – Target export format.

Returns:

The generated feature text.

virtual FString GenerateTextScenariosFromIR(const FZagalaSpecFeatureIR &ImportedFeature) const override#

Generate the format-specific text of every scenario in a feature IR.

Parameters:

ImportedFeature – Feature IR whose scenarios are converted.

Returns:

The concatenated scenario text.

virtual FString GenerateTextStepFromIR(const FZagalaSpecStepIR &Step) const override#

Generate the format-specific text of a single step IR.

Parameters:

Step – Step IR to convert.

Returns:

The generated step text.