IOLink  IOL_v1.6.1_release
RegionCopier.h
1 #pragma once
2 
3 #include <iolink/IOLinkAPI.h>
4 #include <iolink/Indexer.h>
5 #include <iolink/Region.h>
6 #include <iolink/Vector.h>
7 #include <iolink/storage/RandomAccess.h>
8 #include <memory>
9 
10 namespace iolink
11 {
12 
13 class InternalRegionCopier;
14 
36 class IOLINK_API RegionCopier final
37 {
38 public:
49  RegionCopier(const Indexer& srcIndexer,
50  const Indexer& dstIndexer,
51  const VectorXu64& srcOrigin,
52  const VectorXu64& dstOrigin,
53  const VectorXu64& regionSize,
54  DataType dataType);
55 
65  RegionCopier(const Indexer& srcindexer, const RegionXu64& srcRegion, DataType dataType);
66 
76  RegionCopier(const RegionXu64& dstRegion, const Indexer& dstIndexer, DataType dataType);
77 
82  RegionCopier(const RegionCopier& other);
83 
88  RegionCopier& operator=(const RegionCopier& other);
89 
93  ~RegionCopier();
94 
101  void copy(const uint8_t* src, uint8_t* dst);
102 
109  void copy(std::shared_ptr<RandomAccess> src, uint8_t* dst);
110 
117  void copy(const uint8_t* src, std::shared_ptr<RandomAccess> dst);
118 
119 private:
120  InternalRegionCopier* m_impl;
121 };
122 
123 } // end namespace iolink