Extending Qt Creator Manual | IOutputParser

Extending Qt Creator Manual 4.5.2

# IOutputParser Class

(ProjectExplorer::IOutputParser)

The IOutputParser class provides an interface for an output parser that emits issues (tasks). More...

Header: | #include <IOutputParser>

- List of all members, including inherited members

## Public Functions

| IOutputParser() = default
| ~IOutputParser() override
virtual void | appendOutputParser(IOutputParser *parser)
IOutputParser * | childParser() const
void | flush()
virtual bool | hasFatalErrors() const
void | setChildParser(IOutputParser *parser)
virtual void | setWorkingDirectory(const QString &workingDirectory)
virtual void | stdError(const QString &line)
virtual void | stdOutput(const QString &line)
IOutputParser * | takeOutputParserChain()

## Public Slots

virtual void | outputAdded(const QString &string, ProjectExplorer::BuildStep::OutputFormat format)
virtual void | taskAdded(const ProjectExplorer::Task &task, int linkedOutputLines = 0, int skipLines = 0)

## Signals

void | addOutput(const QString &string, ProjectExplorer::BuildStep::OutputFormat format)
void | addTask(const ProjectExplorer::Task &task, int linkedOutputLines = 0, int skipLines = 0)

## Static Public Members

QString | rightTrimmed(const QString &in)

## Detailed Description

The IOutputParser class provides an interface for an output parser that emits issues (tasks).

See also ProjectExplorer::Task.

## Member Function Documentation

### `[default]` IOutputParser::IOutputParser()

Default constructs an instance of IOutputParser.

### IOutputParser::~IOutputParser()

Destroys the instance of IOutputParser.

### `[signal]` void IOutputParser::addOutput(const QString &string, ProjectExplorer::BuildStep::OutputFormat format)

Should be emitted whenever some additional information should be added to the output.

Note: This is additional information. There is no need to add each line.

### `[signal]` void IOutputParser::addTask(const ProjectExplorer::Task &task, int linkedOutputLines = 0, int skipLines = 0)

### `[virtual]` void IOutputParser::appendOutputParser(IOutputParser *parser)

Appends a subparser to this parser, of which IOutputParser will take ownership.

### IOutputParser *IOutputParser::childParser() const

Returns the head of this parser's output parser children. IOutputParser keeps ownership.

See also setChildParser().

### void IOutputParser::flush()

### `[virtual]` bool IOutputParser::hasFatalErrors() const

This is mainly a Symbian specific quirk.

### `[virtual slot]` void IOutputParser::outputAdded(const QString &string, ProjectExplorer::BuildStep::OutputFormat format)

This function can be overwritten to change the string.

### `[static]` QString IOutputParser::rightTrimmed(const QString &in)

### void IOutputParser::setChildParser(IOutputParser *parser)

See also childParser().

### `[virtual]` void IOutputParser::setWorkingDirectory(const QString &workingDirectory)

### `[virtual]` void IOutputParser::stdError(const QString &line)

Called once for each line if standard error to parse.

### `[virtual]` void IOutputParser::stdOutput(const QString &line)

Called once for each line if standard output to parse.

### IOutputParser *IOutputParser::takeOutputParserChain()

Removes the appended outputparser chain from this parser, transferring ownership of the parser chain to the caller.

### `[virtual slot]` void IOutputParser::taskAdded(const ProjectExplorer::Task &task, int linkedOutputLines = 0, int skipLines = 0)