MangledNameBuilder
Builder for creating unique (but mangled) stage names.
The general form of the stage name is pipeline[<$index>](<$stageType>)::<$stageComponents>
, referring to the index
-th pipeline stage with type stageType
. Nested stages have additional $
components added to indicate nested pipelines.
Example 1:
- Compile -> pipeline[0](Compile)
- Compile -> pipeline[1](Compile)
- StdioTest -> pipeline[2](StdioTest)
- StdioTest -> pipeline[3](StdioTest)
- Score -> pipeline[4](Score)
In addition, if Compile
has a property exitCode
, it is accessed by appending ::exitCode
to the end of the expression.
Example 2:
- ParExec -> pipeline[0](ParExec)
- SeqExec -> pipeline[0](ParExec)[0](SeqExec)
- Compile -> pipeline[0](ParExec)[0](SeqExec)$pipeline[0](Compile)
- StdioTest -> pipeline[0](ParExec)[0](SeqExec)$pipeline[1](StdioTest)
- SeqExec -> pipeline[0](ParExec)[1](SeqExec)
- Compile -> pipeline[0](ParExec)[1](SeqExec)$pipeline[0](Compile)
- StdioTest -> pipeline[0](ParExec)[1](SeqExec)$pipeline[1](StdioTest)
The SeqExec
nested within the ParExec
does not require the pipeline
qualifier, because ParExec
does not create pipelines, but rather houses a single nested pipeline.
Note that the builder makes no attempt to verify the correctness of the mangled name.
This builder assumes the following context is available:
The index of the pipeline stage in the root-level pipeline.
The index of the pipeline stage in the nested pipeline, if available.
Throws
if:
Initial name is non-empty but blank
Initial name does not start with the keyword "pipeline"
Initial name does not end with either an index, a stage type, or an identifier name.
Properties
Functions
Appends an index to the mangled name.
Appends a key to the mangled name.
Appends a nested stage to the mangled name.
Appends the pipeline type to the mangled name.
Append a pipeline stage to the mangled name using its index in the pipeline.
Appends a stage component to the mangled name.
Appends stage components to the mangled name.
Appends a pipeline index to the mangled name.