IOLink IOL_v1.8.0_release
Loading...
Searching...
No Matches
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< ImageViewtoImage (std::shared_ptr< View > view) noexcept
 Extracts the ImageView interface from a given generic view.
 
static std::shared_ptr< ImageViewtoReadOnly (std::shared_ptr< ImageView > image)
 Remove all capacities except READ to an ImageView.
 
static std::shared_ptr< ImageViewtoWriteOnly (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)
inlinestaticnoexcept

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
imageImageView 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
imageImageView 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: