Class AbstractEvaluatorTool<T>
Base class for tools which read samples of type T from a stream
of a named format.
public abstract class AbstractEvaluatorTool<T> : TypedCmdLineTool
Type Parameters
T
- Inheritance
-
AbstractEvaluatorTool<T>
- Derived
- Inherited Members
Fields
factory
The factory for the selected format, available once the action runs.
protected IObjectStreamFactory<T>? factory
Field Value
sampleStream
The samples read from the selected format, available once the action runs.
protected IObjectStream<T>? sampleStream
Field Value
Methods
CreateCommand(string)
Builds the command that parses this tool's arguments and runs it.
public override Command CreateCommand(string commandName)
Parameters
commandNamestringthe name the user typed, which for a typed tool includes the
.formatsuffix and so is not always Name
Returns
GetFormatNames()
The format names registered for this tool's sample type, in registration order.
protected override IEnumerable<string> GetFormatNames()
Returns
GetFormatParameters(string)
The parameters the named format accepts, or null when it is not registered.
protected override IEnumerable<IFormatParameter>? GetFormatParameters(string format)
Parameters
formatstring
Returns
GetStreamFactory(string)
Resolves the factory for the selected format, or fails the way upstream does.
protected IObjectStreamFactory<T> GetStreamFactory(string format)
Parameters
formatstring
Returns
GetToolOptions()
The options this tool accepts, beyond the selected format's own.
protected abstract IEnumerable<Option> GetToolOptions()
Returns
Run(ParseResult)
Runs the tool once its options and the format's have been parsed.
protected abstract void Run(ParseResult parseResult)
Parameters
parseResultParseResult