|
IOLink
IOL_v1.6.1_release
|
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);
All IOLink symbols are enclosed in this namespace.
Definition: ArrayX.h:7
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
Interface representing a generic array-like accessor.
Definition: RandomAccess.h:45
static bool isRandomAccess(std::shared_ptr< DataAccess > randomAccess) noexcept
Checks if DataAccess supports RandomAccess interface.
Definition: RandomAccessProvider.h:20
Utility class to check and convert a DataAccess into a RandomAccess.
Definition: RandomAccessProvider.h:14