IProcessor2.hpp
1 #ifndef DM_IPROCESSOR2_HPP_INCLUDED
2 #define DM_IPROCESSOR2_HPP_INCLUDED
3 
4 #ifdef _MSC_VER
5  #pragma once
6 #endif
7 
8 #include "DM/config.hpp"
9 #include "DM/Handle.hpp"
10 #include "DM/ICUObject.hpp"
11 #include "DM/IDatamanager.hpp"
12 #include "DM/AutoLink.hpp" //enable autolink
13 #include "DM/IWindow.hpp"
14 
15 DM_NAMESPACE_BEGIN
16 
17 class DM_API IProcessor2 : public ObjectBase
18 {
19 public:
20  // Iterator typedefs ============================================================================
21  typedef ConstIterator<ICUObject> const_iterator_cu; ///< ICUObject iterator
22 
23  struct Direction {
24  enum Type {
25  optimised,
26  top2bottom, //process in rows from top to bottom
27  left2right //process in columns from left to right
28  };
29  };
30 
31  static IProcessor2* New(IDatamanager &manager, const IWindow &limit, double cuSizeX, double cuSizeY, double overlap = 0., Direction::Type dir = Direction::optimised, unsigned readAheadCount = 3);
32 
33 
34 protected:
35  virtual ~IProcessor2() {}
36 
37 public:
38  virtual int64_t sizeCU() const=0;
39 
40  virtual const_iterator_cu beginCU() const = 0;
41  virtual const_iterator_cu endCU() const = 0;
42 
43  virtual void test() = 0;
44 };
45 
46 typedef Handle< IProcessor2 > Processor2Handle;
47 
48 
49 DM_NAMESPACE_END
50 
51 #endif //DM_IPROCESSOR2_HPP_INCLUDED