DGtal  1.4.2
CImageCacheReadPolicy.h
1 
17 #pragma once
18 
31 #if defined(CImageCacheReadPolicy_RECURSES)
32 #error Recursive header files inclusion detected in CImageCacheReadPolicy.h
33 #else // defined(CImageCacheReadPolicy_RECURSES)
35 #define CImageCacheReadPolicy_RECURSES
36 
37 #if !defined CImageCacheReadPolicy_h
39 #define CImageCacheReadPolicy_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
46 
47 namespace DGtal
48 {
49  namespace concepts
50  {
52 // class CImageCacheReadPolicy
92 template <typename T>
94 {
95  // ----------------------- Concept checks ------------------------------
96 public:
97 
98  typedef typename T::ImageContainer ImageContainer;
99 
101  {
103  ConceptUtils::sameType( myIC, myT.getPage(myPoint) );
104  ConceptUtils::sameType( myIC, myT.getPageToDetach() );
105  myT.updateCache(myDomain);
106  myT.clearCache();
107 
108  // check const methods.
110  }
111 
113  {
114  }
115 
116  // ------------------------- Private Datas --------------------------------
117 private:
118  T myT; // do not require T to be default constructible.
120  typename T::Point myPoint;
121  typename T::Domain myDomain;
122 
123  // ------------------------- Internals ------------------------------------
124 private:
125 
126 }; // end of concept CImageCacheReadPolicy
127  }
128 } // namespace DGtal
129 
130 // //
132 
133 #endif // !defined CImageCacheReadPolicy_h
134 
135 #undef CImageCacheReadPolicy_RECURSES
136 #endif // else defined(CImageCacheReadPolicy_RECURSES)
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Defines the concept describing a cache read policy.
MyPointD Point
Definition: testClone2.cpp:383
HyperRectDomain< Space > Domain