IRaster.hpp
1 #ifndef DM_MATRIX_HPP_INCLUDED
2 #define DM_MATRIX_HPP_INCLUDED
3 
4 #include "DM/config.hpp"
5 #include "DM/Handle.hpp"
6 #include "DM/ObjectBase.hpp"
7 
8 DM_NAMESPACE_BEGIN
9 
10 template<class T>
11 class DM_API IRaster : public ObjectBase
12 {
13  typedef IRaster Self;
14 
15 public:
16  typedef T* pointer;
17  typedef T& reference;
18  typedef const T* const_pointer;
19  typedef const T& const_reference;
20  typedef T value_type;
21 
22  IRaster() {}
23  virtual ~IRaster() {};
24 
25  virtual Self& operator=(const Self& ref) = 0;
26  virtual Self& resize(const unsigned &nbCellsX, const unsigned &nbCellsY) = 0;
27 
28  virtual unsigned nbCellsX() const = 0;
29  virtual unsigned nbCellsY() const = 0;
30  virtual reference operator()(const unsigned &idxX, const unsigned &idxY) = 0;
31  virtual const_reference operator()(const unsigned &idxX, const unsigned &idxY) const = 0;
32 };
33 
38 
39 DM_NAMESPACE_END
40 
41 #endif // DM_MATRIX_HPP_INCLUDED