| IOLink 1.11.0

Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
iolink::ImageViewProvider Class Reference

Utility class to check and convert a View into an ImagevView. More...

`#include <iolink/view/ImageViewProvider.h>`

## Static Public Member Functions
static bool | isImage (std::shared_ptr< View > view) noexcept
| Checks if a given View is an ImageView.
static std::shared_ptr< ImageView > | toImage (std::shared_ptr< View > view) noexcept
| Extracts the ImageView interface from a given generic view.
static std::shared_ptr< ImageView > | toReadOnly (std::shared_ptr< ImageView > image)
| Remove all capacities except READ to an ImageView.
static std::shared_ptr< ImageView > | toWriteOnly (std::shared_ptr< ImageView > image)
| Remove all capacities except WRITE to an ImageView.

## Detailed Description

Utility class to check and convert a View into an ImagevView.

## Member Function Documentation

## ◆ toImage()

static std::shared_ptr< ImageView > iolink::ImageViewProvider::toImage | ( | std::shared_ptr< View > | view | ) |
| inline static noexcept

Extracts the ImageView interface from a given generic view.

If the given view is not an ImageView, this method will return null.

## ◆ toReadOnly()

static std::shared_ptr< ImageView > iolink::ImageViewProvider::toReadOnly | ( | std::shared_ptr< ImageView > | image | ) |
| static

Remove all capacities except READ to an ImageView.

If given ImageView only has READ capacity, it is returned directly.

Parameters

  image | ImageView for which we want to only have READ capacity

Returns
  an ImageView with only READ capacity

## ◆ toWriteOnly()

static std::shared_ptr< ImageView > iolink::ImageViewProvider::toWriteOnly | ( | std::shared_ptr< ImageView > | image | ) |
| static

Remove all capacities except WRITE to an ImageView.

If given ImageView only has WRITE capacity, it is returned directly.

Parameters

  image | ImageView for which we want to only have WRITE capacity

Returns
  an ImageView with only WRITE capacity

The documentation for this class was generated from the following file:

- iolink/public/include/iolink/view/ImageViewProvider.h