libcamera  v0.4.0
Supporting cameras in Linux since 2019
Public Member Functions | List of all members
libcamera::ipa::AlgorithmFactory< _Algorithm > Class Template Reference

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

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

Public Member Functions

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

Detailed Description

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

Registration of Algorithm classes and creation of instances.

Template Parameters
_AlgorithmThe 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]nameName 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 >
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: