DGtal  1.4.beta
CImageCacheWritePolicy.h
1 
17 #pragma once
18 
31 #if defined(CImageCacheWritePolicy_RECURSES)
32 #error Recursive header files inclusion detected in CImageCacheWritePolicy.h
33 #else // defined(CImageCacheWritePolicy_RECURSES)
35 #define CImageCacheWritePolicy_RECURSES
36 
37 #if !defined CImageCacheWritePolicy_h
39 #define CImageCacheWritePolicy_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
46 
47 namespace DGtal
48 {
49  namespace concepts
50  {
52 // class CImageCacheWritePolicy
90 template <typename T>
92 {
93  // ----------------------- Concept checks ------------------------------
94 public:
95 
96  typedef typename T::ImageContainer ImageContainer;
97 
99  {
100  myT.writeInPage(myIC, myPoint, myValue);
101  myT.flushPage(myIC);
102 
103  // check const methods.
105  }
106 
108  {
109  }
110 
111  // ------------------------- Private Datas --------------------------------
112 private:
113  T myT; // do not require T to be default constructible.
115  typename T::Point myPoint;
116  typename T::Value myValue;
117 
118  // ------------------------- Internals ------------------------------------
119 private:
120 
121 }; // end of concept CImageCacheWritePolicy
122  }
123 } // namespace DGtal
124 
125 // //
127 
128 #endif // !defined CImageCacheWritePolicy_h
129 
130 #undef CImageCacheWritePolicy_RECURSES
131 #endif // else defined(CImageCacheWritePolicy_RECURSES)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Defines the concept describing a cache write policy.
MyPointD Point
Definition: testClone2.cpp:383