libcamera
v0.0.0+100-debian/0_git20200629+e7aa92a-8-9-g77f5237c-dirty (2021-05-05T16:20:29+01:00)
Supporting cameras in Linux since 2019
|
Base class to manage private data through a d-pointer. More...
Classes | |
class | Private |
Base class for private data managed through a d-pointer. | |
Public Member Functions | |
Extensible (Private *d) | |
Construct an instance of an Extensible class. More... | |
Base class to manage private data through a d-pointer.
The Extensible class provides a base class to implement the d-pointer design pattern (also known as opaque pointer or pImpl idiom). It helps creating public classes that can be extended without breaking their ABI. Such classes store their private data in a separate private data object, referenced by a pointer in the public class (hence the name d-pointer).
Classes that follow this design pattern are referred herein as extensible classes. To be extensible, a class PublicClass shall:
Additionally, if the PublicClass is not final, it shall expose one or more constructors that takes a pointer to a Private data instance, to be used by derived classes.
The Private class is fully opaque to users of the libcamera public API. Internally, it can be kept private to the implementation of PublicClass, or be exposed to other classes. In the latter case, the members of the Private class need to be qualified with appropriate access specifiers. The PublicClass and Private classes always have full access to each other's protected and private members.
libcamera::Extensible::Extensible | ( | Extensible::Private * | d | ) |
Construct an instance of an Extensible class.
[in] | d | Pointer to the private data instance |