View concepts (details) ======================= .. contents:: Table of Contents :local: .. _concept-details-View: View ---- .. cpp:concept:: template View #. Refines the :cpp:concept:`template Image` concept. #. Is basicaly an alias. **Possible implementation** .. code:: cpp template > concept View = Image; .. _concept-details-WritableView: WritableView ------------ .. cpp:concept:: template WritableView #. Refines the :cpp:concept:`template View` concept. #. Refines the :cpp:concept:`template WritableImage` concept. **Possible implementation** .. code:: cpp template > concept WritableView = View && WritableImage; .. _concept-details-FilterView: FilterView ---------- .. cpp:concept:: template FilterView #. Refines the :cpp:concept:`template View` concept. #. ``Pred`` models the :cpp:concept:`template Predicate` concept. **Notation** .. cpp:type:: const_pixel_type = FView::const_pixel_type .. cpp:var:: Pred pred .. cpp:var:: const_pixel_type cpix **Valid Expressions** - :cpp:expr:`pred(cpix)` return-type models :cpp:concept:`template Boolean`. **Possible implementation** .. code:: cpp template > concept FilterView = View && Predicate; .. _concept-details-WritableFilterView: WritableFilterView ------------------ .. cpp:concept:: template WritableFilterView #. Refines the :cpp:concept:`template WritableView` concept. #. Refines the :cpp:concept:`template FilterView` concept. #. ``Pred`` models the :cpp:concept:`template Predicate` concept. **Notation** .. cpp:type:: pixel_type = WFView::pixel_type .. cpp:var:: Pred pred .. cpp:var:: pixel_type pix **Valid Expressions** - :cpp:expr:`pred(pix)` return-type models :cpp:concept:`template Boolean`. **Possible implementation** .. code:: cpp template > concept WritableFilterView = WritableView && FilterView && Predicate; .. _concept-details-TransformView: TransformView ------------- .. cpp:concept:: template TransformView #. Refines the :cpp:concept:`template View` concept. #. ``Func`` models the :cpp:concept:`template InvocableR` concept. **Notation** .. cpp:type:: const_pixel_type = PView::const_pixel_type .. cpp:var:: Func func .. cpp:var:: const_pixel_type cpix **Valid Expressions** - :cpp:expr:`func(cpix)` return-type models the :cpp:concept:`template TransformedPixel` concept with `ToPix = decltype(func(cpix))` and `FromPix = TView::const_pixel_type`. **Possible implementation** .. code:: cpp template > concept TransformView = View && Invocable && TransformedPixel< invoke_result_t, TView::const_pixel_type>; .. _concept-details-WritableTransformView: WritableTransformView --------------------- .. cpp:concept:: template WritableTransformView #. Refines the :cpp:concept:`template TransformView` concept. #. ``Func`` models the :cpp:concept:`template InvocableR` concept. #. ``FuncInverse`` models the :cpp:concept:`template InvocableR` concept where ``R`` models the :cpp:concept:`template Pixel` concept. **Notation** .. cpp:type:: pixel_type = WTView::pixel_type .. cpp:var:: Func func .. cpp:var:: FuncInverse func_inverse .. cpp:var:: pixel_type pix **Valid Expressions** - :cpp:expr:`func(pix)` return-type models the :cpp:concept:`template TransformedPixel` concept with `ToPix = decltype(func(pix))` and `FromPix = WTView::pixel_type`. - :cpp:expr:`func_inverse(func(pix))` return-type models :cpp:concept:`template Pixel` and is the same as :cpp:expr:`pixel_type`. **Possible implementation** .. code:: cpp template > concept WritableTransformView = View && TransformView && Invocable && TransformedPixel< invoke_result_t, WTView::pixel_type> && Invocable && Pixel< invoke_result_t> && Same< WTView::pixel_type invoke_result_t>; .. _concept-details-ProjectorView: ProjectorView ------------- .. cpp:concept:: template ProjectorView #. Refines the :cpp:concept:`template View` concept. #. ``Proj`` models the :cpp:concept:`template InvocableR` concept. **Notation** .. cpp:type:: const_pixel_type = PView::const_pixel_type .. cpp:var:: Proj proj .. cpp:var:: const_pixel_type cpix **Valid Expressions** - :cpp:expr:`proj(cpix)` return-type models the :cpp:concept:`template ProjectedPixel` concept with `ToPix = decltype(proj(cpix))` and `FromPix = PView::const_pixel_type`. **Possible implementation** .. code:: cpp template > concept ProjectorView = View && Invocable && ProjectedPixel< invoke_result_t, PView::const_pixel_type>; .. _concept-details-WritableProjectorView: WritableProjectorView --------------------- .. cpp:concept:: template WritableProjectorView #. Refines the :cpp:concept:`template WritableView` concept. #. Refines the :cpp:concept:`template ProjectorView` concept. #. ``Proj`` models the :cpp:concept:`template InvocableR` concept. **Notation** .. cpp:type:: pixel_type = WPView::pixel_type .. cpp:var:: Proj proj .. cpp:var:: pixel_type pix **Valid Expressions** - :cpp:expr:`proj(pix)` return-type models the :cpp:concept:`template ProjectedPixel` concept with `ToPix = decltype(proj(pix))` and `FromPix = WPView::pixel_type`. **Possible implementation** .. code:: cpp template > concept WritableProjectorView = WritableView && ProjectorView && Invocable && ProjectedPixel< invoke_result_t, WPView::pixel_type>; .. _concept-details-ZipView: ZipView ------- .. cpp:concept:: template ZipView #. Refines the :cpp:concept:`template View` concept. **Notation** .. cpp:type:: const_pixel_type = ZView::const_pixel_type .. cpp:var:: const_pixel_type cpix **Valid Expressions** - :cpp:expr:`cpix` models the :cpp:concept:`template ZippedPixel` concept with `ZPix = ZView::const_pixel_type` and `FromPixs... = FromViews::const_pixel_type...`. **Possible implementation** .. code:: cpp template < typename Z, typename... FromViews, ZView = remove_cvref> concept ZipView = View && View... && ZippedPixel; .. _concept-details-WritableZipView: WritableZipView --------------- .. cpp:concept:: template WritableZipView #. Refines the :cpp:concept:`template WritableView` concept. #. Refines the :cpp:concept:`template ZipView` concept. **Notation** .. cpp:type:: pixel_type = WZView::pixel_type .. cpp:var:: pixel_type pix **Valid Expressions** - :cpp:expr:`pix` models the :cpp:concept:`template ZippedPixel` concept with `ZPix = WZView::pixel_type` and `FromPixs... = FromViews::const_pixel_type...`. **Possible implementation** .. code:: cpp template < typename WZ, typename... FromViews, WZView = remove_cvref> concept WritableZipView = WritableView && ZipView && View... && ZippedPixel;