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
|
Utilities to help constructing class interfaces. More...
#include <memory>
Go to the source code of this file.
Classes | |
class | libcamera::Extensible |
Base class to manage private data through a d-pointer. More... | |
Namespaces | |
libcamera | |
Top-level libcamera namespace. | |
Macros | |
#define | LIBCAMERA_DISABLE_COPY(klass) |
Disable copy construction and assignment of the klass. More... | |
#define | LIBCAMERA_DISABLE_MOVE(klass) |
Disable move construction and assignment of the klass. More... | |
#define | LIBCAMERA_DISABLE_COPY_AND_MOVE(klass) |
Disable copy and move construction and assignment of the klass. More... | |
#define | LIBCAMERA_DECLARE_PRIVATE() |
Declare private data for a public class. More... | |
#define | LIBCAMERA_DECLARE_PUBLIC(klass) |
Declare public data for a private class. More... | |
#define | LIBCAMERA_D_PTR() |
Retrieve the private data pointer. More... | |
#define | LIBCAMERA_O_PTR() |
Retrieve the public instance corresponding to the private data. More... | |
Utilities to help constructing class interfaces.
The extensible class can be inherited to create public classes with stable ABIs.
#define LIBCAMERA_D_PTR | ( | ) |
Retrieve the private data pointer.
This macro can be used in any member function of a class that inherits, directly or indirectly, from the Extensible class, to create a local variable named 'd' that points to the class' private data instance.
#define LIBCAMERA_DECLARE_PRIVATE | ( | ) |
Declare private data for a public class.
The LIBCAMERA_DECLARE_PRIVATE() macro plumbs the infrastructure necessary to make a class manage its private data through a d-pointer. It shall be used at the very top of the class definition.
#define LIBCAMERA_DECLARE_PUBLIC | ( | klass | ) |
Declare public data for a private class.
klass | The public class name |
The LIBCAMERA_DECLARE_PUBLIC() macro is the counterpart of LIBCAMERA_DECLARE_PRIVATE() to be used in the private data class. It shall be used at the very top of the private class definition, with the public class name passed as the klass parameter.
#define LIBCAMERA_DISABLE_COPY | ( | klass | ) |
Disable copy construction and assignment of the klass.
klass | The name of the class |
Example usage:
#define LIBCAMERA_DISABLE_COPY_AND_MOVE | ( | klass | ) |
Disable copy and move construction and assignment of the klass.
klass | The name of the class |
Example usage:
#define LIBCAMERA_DISABLE_MOVE | ( | klass | ) |
Disable move construction and assignment of the klass.
klass | The name of the class |
Example usage:
#define LIBCAMERA_O_PTR | ( | ) |
Retrieve the public instance corresponding to the private data.
This macro is the counterpart of LIBCAMERA_D_PTR() for private data classes. It can be used in any member function of the private data class to create a local variable named 'o' that points to the public class instance corresponding to the private data.