DGtal  1.1.0
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)
34 
35 #define CImageCacheWritePolicy_RECURSES
36 
37 #if !defined CImageCacheWritePolicy_h
38 
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::concepts::CImageCacheWritePolicy::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CImageCacheWritePolicy)
Definition: CImageCacheWritePolicy.h:98
DGtal::concepts::CImageCacheWritePolicy::myIC
ImageContainer * myIC
Definition: CImageCacheWritePolicy.h:114
DGtal::concepts::CImageCacheWritePolicy::myPoint
T::Point myPoint
Definition: CImageCacheWritePolicy.h:115
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition: ClosedIntegerHalfPlane.h:49
DGtal::concepts::CImageCacheWritePolicy::myT
T myT
Definition: CImageCacheWritePolicy.h:113
DGtal::concepts::CImageCacheWritePolicy::checkConstConstraints
void checkConstConstraints() const
Definition: CImageCacheWritePolicy.h:107
DGtal::concepts::CImageCacheWritePolicy::ImageContainer
T::ImageContainer ImageContainer
Definition: CImageCacheWritePolicy.h:96
DGtal::concepts::CImageCacheWritePolicy
Aim: Defines the concept describing a cache write policy.
Definition: CImageCacheWritePolicy.h:92
Point
MyPointD Point
Definition: testClone2.cpp:383
Value
double Value
Definition: testSimpleRandomAccessRangeFromPoint.cpp:38
DGtal::concepts::CImageCacheWritePolicy::myValue
T::Value myValue
Definition: CImageCacheWritePolicy.h:116