|
Krita Source Code Documentation
|
Go to the source code of this file.
Namespaces | |
| namespace | detail |
Typedefs | |
| template<typename... Data> | |
| using | KisOptionTuple |
| using KisOptionTuple |
KisOptionTuple is a class that merges multiple option data structs into one by inheriting from all of them.
KisOptionTuple automatically generates read, write and operator== methods for the resulting class.
You may later access the merged types via kislager::lenses::to_base<BaseData> lens.
Restrictions:
1) The merged structs must have different types 2) The arguments passed to the constructor are passed to constructor of the first base class of in the list.
Prefixed data structures
If all the passed data types support 'prefixed' read and write (that is, define 'static constexpr bool T::supports_prefix = true'), then the tuple switches into a "prefixed" mode:
1) KisOptionTuple's first constructor argument starts accepting a prefix string
2) This prefix string is passed to all data objects' constructors
3) The rest of the constructor's arguments are passed to the first data object only
Restrictions:
1) Either all or none data types must support prefixed mode (and define 'supports_prefix). Otherwise KisOptionTuple will fail to compile.
Definition at line 174 of file KisOptionTuple.h.