| IOLink 1.11.0

Loading...
Searching...
No Matches
MultiImageViewProvider.h
1#pragma once
2
3#include <iolink/view/MultiImageView.h>
4
5 namespace iolink
6{
7
11 class MultiImageViewProvider
12{
13 public:
17 inline static bool isMultiImage(std::shared_ptr<View> view) noexcept
18 {
19 return (dynamic_cast<const MultiImageView*>(view.get()) != nullptr);
20 }
21
27 inline static std::shared_ptr<MultiImageView> toMultiImage(std::shared_ptr<View> view) noexcept
28 {
29 return std::dynamic_pointer_cast<MultiImageView>(view);
30 }
31};
32
33} // end namespace iolink
iolink::MultiImageView
Interface representing a multi-image view, i.e.
Definition MultiImageView.h:50
iolink::MultiImageViewProvider
Utility class to check and convert a View into a MultiImagevView.
Definition MultiImageViewProvider.h:12
iolink::MultiImageViewProvider::toMultiImage
static std::shared_ptr< MultiImageView > toMultiImage(std::shared_ptr< View > view) noexcept
Extracts the MultiImageView interface from a given generic view.
Definition MultiImageViewProvider.h:27
iolink::MultiImageViewProvider::isMultiImage
static bool isMultiImage(std::shared_ptr< View > view) noexcept
Checks if given View is a MultiImageView.
Definition MultiImageViewProvider.h:17
iolink
All IOLink symbols are enclosed in this namespace.
Definition ArrayX.h:8