IRunControlFactory Class | Extending Qt Creator Manual

Extending Qt Creator Manual | IRunControlFactory

Extending Qt Creator Manual 4.3.0

# IRunControlFactory Class

(ProjectExplorer::IRunControlFactory)

The IRunControlFactory class creates RunControl objects matching a run configuration. More...

Header: | #include <IRunControlFactory>

- List of all members, including inherited members

## Public Functions

| IRunControlFactory(QObject *parent = nullptr)
virtual bool | canRun(RunConfiguration *runConfiguration, Core::Id mode) const = 0
virtual RunControl * | create(RunConfiguration *runConfiguration, Core::Id mode, QString *errorMessage) = 0
virtual IRunConfigurationAspect * | createRunConfigurationAspect(RunConfiguration *rc)

## Detailed Description

The IRunControlFactory class creates RunControl objects matching a run configuration.

## Member Function Documentation

### IRunControlFactory::IRunControlFactory(QObject *parent = nullptr)

Default constructs an instance of IRunControlFactory.

### `[pure virtual]` bool IRunControlFactory::canRun(RunConfiguration *runConfiguration, Core::Id mode) const

### `[pure virtual]` RunControl *IRunControlFactory::create(RunConfiguration *runConfiguration, Core::Id mode, QString *errorMessage)

### `[virtual]` IRunConfigurationAspect *IRunControlFactory::createRunConfigurationAspect(RunConfiguration *rc)

Returns an IRunConfigurationAspect to carry options for RunControls this factory can create.

If no extra options are required, it is allowed to return null like the default implementation does. This function is intended to be called from the RunConfiguration constructor, so passing a RunConfiguration pointer makes no sense because that object is under construction at the time.