[libcamera-devel] [PATCH 0/2] libcamera: Add type-safe enum-based flags
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sat Jul 25 01:08:39 CEST 2020
Hello,
This small series contains two patches that I've carried in my tree for
some time, and that I think could be useful. Please see patches for
details. The API is influenced by https://doc.qt.io/qt-5/qflags.html but
goes a step further by disallowing some invalid usage of the operators
that Qt silently allows for internal implementation reasons.
Laurent Pinchart (2):
libcamera: flags: Add type-safe enum-based flags
test: Add tests for the Flags class
include/libcamera/flags.h | 195 ++++++++++++++++++++++++++++++++
include/libcamera/meson.build | 1 +
src/libcamera/flags.cpp | 192 ++++++++++++++++++++++++++++++++
src/libcamera/meson.build | 1 +
test/flags.cpp | 204 ++++++++++++++++++++++++++++++++++
test/meson.build | 1 +
6 files changed, 594 insertions(+)
create mode 100644 include/libcamera/flags.h
create mode 100644 src/libcamera/flags.cpp
create mode 100644 test/flags.cpp
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list