DGtal
1.1.0
src
DGtal
images
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)
34
35
#define CImageCacheReadPolicy_RECURSES
36
37
#if !defined CImageCacheReadPolicy_h
38
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>
93
struct
CImageCacheReadPolicy
94
{
95
// ----------------------- Concept checks ------------------------------
96
public
:
97
98
typedef
typename
T::ImageContainer
ImageContainer
;
99
100
BOOST_CONCEPT_USAGE
(
CImageCacheReadPolicy
)
101
{
102
ConceptUtils::sameType
(
myIC
,
myT
.getPage(
myDomain
) );
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.
109
checkConstConstraints
();
110
}
111
112
void
checkConstConstraints
()
const
113
{
114
}
115
116
// ------------------------- Private Datas --------------------------------
117
private
:
118
T
myT
;
// do not require T to be default constructible.
119
ImageContainer
*
myIC
;
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)
DGtal::concepts::CImageCacheReadPolicy
Aim: Defines the concept describing a cache read policy.
Definition:
CImageCacheReadPolicy.h:94
DGtal::concepts::CImageCacheReadPolicy::myT
T myT
Definition:
CImageCacheReadPolicy.h:118
DGtal::concepts::CImageCacheReadPolicy::myDomain
T::Domain myDomain
Definition:
CImageCacheReadPolicy.h:121
DGtal::concepts::CImageCacheReadPolicy::ImageContainer
T::ImageContainer ImageContainer
Definition:
CImageCacheReadPolicy.h:98
DGtal::concepts::CImageCacheReadPolicy::myPoint
T::Point myPoint
Definition:
CImageCacheReadPolicy.h:120
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition:
ClosedIntegerHalfPlane.h:49
Domain
HyperRectDomain< Space > Domain
Definition:
testSimpleRandomAccessRangeFromPoint.cpp:44
DGtal::concepts::CImageCacheReadPolicy::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CImageCacheReadPolicy)
Definition:
CImageCacheReadPolicy.h:100
DGtal::concepts::CImageCacheReadPolicy::checkConstConstraints
void checkConstConstraints() const
Definition:
CImageCacheReadPolicy.h:112
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition:
ConceptUtils.h:117
DGtal::concepts::CImageCacheReadPolicy::myIC
ImageContainer * myIC
Definition:
CImageCacheReadPolicy.h:119
Point
MyPointD Point
Definition:
testClone2.cpp:383
Generated on Fri Oct 9 2020 08:57:47 for DGtal by
1.8.20