libcamera: libcamera::ipa::AlgorithmFactory< _Algorithm > Class Template Reference

libcamera v0.7.0 Supporting cameras in Linux since 2019

Loading...
Searching...
No Matches
libcamera::ipa::AlgorithmFactory< _Algorithm > Class Template Reference

Registration of Algorithm classes and creation of instances. More...

Inheritance diagram for libcamera::ipa::AlgorithmFactory< _Algorithm >:
[legend]
Collaboration diagram for libcamera::ipa::AlgorithmFactory< _Algorithm >:
[legend]

## Public Member Functions
| AlgorithmFactory (const char *name)
| Construct an algorithm factory.
std::unique_ptr< Algorithm< typename _Algorithm::Module > > | create () const override
| Create an instance of the Algorithm corresponding to the factory.

## Detailed Description

template<typename _Algorithm>
class libcamera::ipa::AlgorithmFactory< _Algorithm >

Registration of Algorithm classes and creation of instances.

Template Parameters

  _Algorithm | The algorithm class type for this factory

To facilitate instantiation of Algorithm classes, the AlgorithmFactory class implements auto-registration of algorithms with the IPA Module class. Each Algorithm subclass shall register itself using the REGISTER_IPA_ALGORITHM() macro, which will create a corresponding instance of an AlgorithmFactory and register it with the IPA Module.

## Constructor & Destructor Documentation

## ◆ AlgorithmFactory()

template<typename _Algorithm>

libcamera::ipa::AlgorithmFactory< _Algorithm >::AlgorithmFactory | ( | const char * | name | ) |
| inline

Construct an algorithm factory.

Parameters

  [in] | name | Name of the algorithm class

Creating an instance of the factory automatically registers is with the IPA Module class, enabling creation of algorithm instances through Module::createAlgorithm().

The factory name identifies the algorithm and shall be unique.

## Member Function Documentation

## ◆ create()

template<typename _Algorithm>

std::unique_ptr< Algorithm< typename _Algorithm::Module > > libcamera::ipa::AlgorithmFactory< _Algorithm >::create | ( |  | ) | const
| inlineoverride

Create an instance of the Algorithm corresponding to the factory.

Returns
  A pointer to a newly constructed instance of the Algorithm subclass corresponding to the factory

The documentation for this class was generated from the following files:

- src/ipa/libipa/algorithm.h
- src/ipa/libipa/algorithm.cpp