BinaryFormatEngineHandler Class | Qt Installer Framework Manual

- Qt Installer Framework Manual
- BinaryFormatEngineHandler

# BinaryFormatEngineHandler Class

class QInstaller::BinaryFormatEngineHandler

The BinaryFormatEngineHandler class provides a way to register resource collections and resource files. More...

Header: | #include <BinaryFormatEngineHandler>

- List of all members, including inherited members

## Public Functions

void | clear()
void | registerResource(const QString &fileName, const QString &resourcePath)
void | registerResources(const QList<QInstaller::ResourceCollection> &collections)

## Reimplemented Public Functions

virtual QAbstractFileEngine * | create(const QString &fileName) const override

## Static Public Members

QInstaller::BinaryFormatEngineHandler * | instance()

## Detailed Description

## Member Function Documentation

### void BinaryFormatEngineHandler::clear()

Clears the contents of the binary format engine.

### `[override virtual]` QAbstractFileEngine *BinaryFormatEngineHandler::create(const QString &fileName) const

Creates a file engine for the file specified by fileName. To be able to create a file engine, the file name needs to be prefixed with `installer://`.

Returns 0 if the engine cannot handle fileName.

### `[static]` QInstaller::BinaryFormatEngineHandler *BinaryFormatEngineHandler::instance()

Returns the active instance of the engine.

### void BinaryFormatEngineHandler::registerResource(const QString &fileName, const QString &resourcePath)

Registers the resource specified by resourcePath in a resource collection specified by fileName. The file name fileName must be in the form of `installer://`, followed by the collection name and resource name separated by a forward slash.

A valid file name looks like this: installer://collectionName/resourceName

### void BinaryFormatEngineHandler::registerResources(const QList<QInstaller::ResourceCollection> &collections)

Registers the given resource collections collections in the engine.