3#include <iolink/IOLinkAPI.h>
4#include <iolink/storage/RandomAccess.h>
20 inline static bool isRandomAccess(std::shared_ptr<DataAccess> randomAccess)
noexcept
22 return (
dynamic_cast<const RandomAccess*
>(randomAccess.get()) !=
nullptr);
30 inline static std::shared_ptr<RandomAccess>
toRandom(std::shared_ptr<DataAccess> accessor)
noexcept
32 return std::dynamic_pointer_cast<RandomAccess>(accessor);
Interface representing a generic array-like accessor.
Definition: RandomAccess.h:46
Utility class to check and convert a DataAccess into a RandomAccess.
Definition: RandomAccessProvider.h:15
static std::shared_ptr< RandomAccess > toRandom(std::shared_ptr< DataAccess > accessor) noexcept
Return the RandomAccess interface if the accessor supports it.
Definition: RandomAccessProvider.h:30
static bool isRandomAccess(std::shared_ptr< DataAccess > randomAccess) noexcept
Checks if DataAccess supports RandomAccess interface.
Definition: RandomAccessProvider.h:20
All IOLink symbols are enclosed in this namespace.
Definition: ArrayX.h:8