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