IOLink  IOL_v1.6.1_release
ParallelAccessExtension.h
1 #pragma once
2 #include <string>
3 
4 #include <iolink/FlagSet.h>
5 #include <iolink/view/Extension.h>
6 
7 namespace iolink
8 {
9 
14 {
25  THREAD_SAFE = 0x1,
26 
34  PARALLEL_TILE_READ = 0x2,
35 
43  PARALLEL_TILE_WRITE = 0x4,
44 
52  PARALLEL_READ = 0x8,
53 
61  PARALLEL_WRITE = 0x10
62 };
63 
64 extern template class IOLINK_API_IMPORT FlagSet<ParallelAccessCapability>;
65 
70 
71 // Define bitwise operators for ParallelAccessCapability
72 IOLINK_DEFINE_ENUM_BITWISE_OPERATORS(ParallelAccessCapability)
73 
74 
86 class IOLINK_API ParallelAccessExtension : public Extension
87 {
88 public:
92  static constexpr size_t EXTENSION_ID = 0x2;
93 
97  virtual ParallelAccessCapabilitySet capabilities() const = 0;
98 
102  inline bool support(ParallelAccessCapabilitySet flags) { return this->capabilities().has(flags); }
103 
107  std::string toString() const;
108 };
109 
110 } // end namespace iolink