Registration of CameraSensorHelperFactory classes and creation of instances.
More...
Registration of CameraSensorHelperFactory classes and creation of instances.
To facilitate discovery and instantiation of CameraSensorHelper classes, the CameraSensorHelperFactory class maintains a registry of camera sensor helper sub-classes. Each CameraSensorHelper subclass shall register itself using the REGISTER_CAMERA_SENSOR_HELPER() macro, which will create a corresponding instance of a CameraSensorHelperFactory subclass and register it with the static list of factories.
◆ CameraSensorHelperFactory()
libcamera::ipa::CameraSensorHelperFactory::CameraSensorHelperFactory |
( |
const std::string |
name | ) |
|
Construct a camera sensor helper factory.
- Parameters
-
[in] | name | Name of the camera sensor helper class |
Creating an instance of the factory registers it with the global list of factories, accessible through the factories() function.
The factory name is used for debug purpose and shall be unique.
◆ create()
std::unique_ptr< CameraSensorHelper > libcamera::ipa::CameraSensorHelperFactory::create |
( |
const std::string & |
name | ) |
|
|
static |
Create an instance of the CameraSensorHelper corresponding to a named factory.
- Parameters
-
[in] | name | Name of the factory |
- Returns
- A unique pointer to a new instance of the CameraSensorHelper subclass corresponding to the named factory or a null pointer if no such factory exists
◆ createInstance()
libcamera::ipa::CameraSensorHelperFactory::createInstance |
( |
| ) |
|
|
protectedpure virtual |
Create an instance of the CameraSensorHelper corresponding to the factory.
This virtual function is implemented by the REGISTER_CAMERA_SENSOR_HELPER() macro. It creates a camera sensor helper instance associated with the camera sensor model.
- Returns
- A pointer to a newly constructed instance of the CameraSensorHelper subclass corresponding to the factory
◆ factories()
Retrieve the list of all camera sensor helper factories.
- Returns
- The list of camera sensor helper factories
◆ registerType()
Add a camera sensor helper class to the registry.
- Parameters
-
[in] | factory | Factory to use to construct the camera sensor helper |
The caller is responsible to guarantee the uniqueness of the camera sensor helper name.
The documentation for this class was generated from the following files: