UpdateOperationFactory Class | Qt Installer Framework Manual

Qt Installer Framework Manual | UpdateOperationFactory

# UpdateOperationFactory Class

(KDUpdater::UpdateOperationFactory)

The UpdateOperationFactory class is used to create update operations based on their name. More...

Header: | #include <UpdateOperationFactory>
Inherits: | KDGenericFactory<UpdateOperation>

- List of all members, including inherited members

## Public Functions

void | registerUpdateOperation(const QString &name)

- 4 public functions inherited from KDGenericFactory

## Static Public Members

UpdateOperationFactory & | instance()

## Protected Functions

| UpdateOperationFactory()

## Detailed Description

The UpdateOperationFactory class is used to create update operations based on their name.

This class acts as a factory for `KDUpdater::UpdateOperation`. You can register one or more update operations with this factory and query operations based on their name.

This class follows the singleton design pattern. Only one instance of this class can be created and its reference can be fetched from the instance() method.

The following operations are registered by default:

- Copy operation
- Move operation
- Delete operation
- Mkdir operation
- Rmdir operation
- AppendFile operation
- PrependFile operation

## Member Function Documentation

### `[protected]` UpdateOperationFactory::UpdateOperationFactory()

Constructor

### `[static]` UpdateOperationFactory &UpdateOperationFactory::instance()

Returns the UpdateOperationFactory instance. The instance is created if needed.

### void UpdateOperationFactory::registerUpdateOperation(const QString &name)

Registers a new update operation with the factory based on name. When create() is called with that name, the update operation is constructed using its default constructor.