DGtal 1.3.0
|
Aim: implements a 'LAST' read policy cache. More...
#include <DGtal/images/ImageCachePolicies.h>
Public Types | |
typedef TImageFactory | ImageFactory |
typedef TImageContainer | ImageContainer |
typedef TImageContainer::Domain | Domain |
typedef TImageContainer::Point | Point |
typedef TImageContainer::Value | Value |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CImage< TImageContainer >)) | |
Checking concepts. More... | |
BOOST_CONCEPT_ASSERT ((concepts::CImageFactory< TImageFactory >)) | |
ImageCacheReadPolicyLAST (Alias< ImageFactory > anImageFactory) | |
~ImageCacheReadPolicyLAST () | |
ImageContainer * | getPage (const Point &aPoint) |
ImageContainer * | getPage (const Domain &aDomain) |
ImageContainer * | getPageToDetach () |
void | updateCache (const Domain &aDomain) |
void | clearCache () |
Protected Attributes | |
ImageContainer * | myCacheImagesPtr |
Alias on the images cache. More... | |
ImageFactory * | myImageFactory |
Alias on the image factory. More... | |
Private Member Functions | |
ImageCacheReadPolicyLAST (const ImageCacheReadPolicyLAST &other) | |
ImageCacheReadPolicyLAST & | operator= (const ImageCacheReadPolicyLAST &other) |
Aim: implements a 'LAST' read policy cache.
Description of template class 'ImageCacheReadPolicyLAST'
The cache keeps only one page in memory, the last one. When the page needs to be replaced, the new page replaces the old one.
TImageContainer | an image container type (model of CImage). |
TImageFactory | an image factory. |
The policy is done with 5 functions:
Definition at line 77 of file ImageCachePolicies.h.
typedef TImageContainer::Domain DGtal::ImageCacheReadPolicyLAST< TImageContainer, TImageFactory >::Domain |
Definition at line 88 of file ImageCachePolicies.h.
typedef TImageContainer DGtal::ImageCacheReadPolicyLAST< TImageContainer, TImageFactory >::ImageContainer |
Definition at line 87 of file ImageCachePolicies.h.
typedef TImageFactory DGtal::ImageCacheReadPolicyLAST< TImageContainer, TImageFactory >::ImageFactory |
Definition at line 85 of file ImageCachePolicies.h.
typedef TImageContainer::Point DGtal::ImageCacheReadPolicyLAST< TImageContainer, TImageFactory >::Point |
Definition at line 89 of file ImageCachePolicies.h.
typedef TImageContainer::Value DGtal::ImageCacheReadPolicyLAST< TImageContainer, TImageFactory >::Value |
Definition at line 90 of file ImageCachePolicies.h.
|
inline |
Definition at line 92 of file ImageCachePolicies.h.
|
inline |
|
private |
DGtal::ImageCacheReadPolicyLAST< TImageContainer, TImageFactory >::BOOST_CONCEPT_ASSERT | ( | (concepts::CImage< TImageContainer >) | ) |
Checking concepts.
DGtal::ImageCacheReadPolicyLAST< TImageContainer, TImageFactory >::BOOST_CONCEPT_ASSERT | ( | (concepts::CImageFactory< TImageFactory >) | ) |
void DGtal::ImageCacheReadPolicyLAST< TImageContainer, TImageFactory >::clearCache | ( | ) |
Clear the cache.
ImageContainer * DGtal::ImageCacheReadPolicyLAST< TImageContainer, TImageFactory >::getPage | ( | const Domain & | aDomain | ) |
Get the alias on the image that matchs the domain aDomain or NULL if no image in the cache matchs the domain aDomain.
aDomain | the domain. |
ImageContainer * DGtal::ImageCacheReadPolicyLAST< TImageContainer, TImageFactory >::getPage | ( | const Point & | aPoint | ) |
Get the alias on the image that contains the point aPoint or NULL if no image in the cache contains the point aPoint.
aPoint | the point. |
ImageContainer * DGtal::ImageCacheReadPolicyLAST< TImageContainer, TImageFactory >::getPageToDetach | ( | ) |
Get the alias on the image that we have to detach or NULL if no image have to be detached.
|
private |
void DGtal::ImageCacheReadPolicyLAST< TImageContainer, TImageFactory >::updateCache | ( | const Domain & | aDomain | ) |
Update the cache according to the cache policy.
aDomain | the domain. |
|
protected |
Alias on the images cache.
Definition at line 154 of file ImageCachePolicies.h.
|
protected |
Alias on the image factory.
Definition at line 157 of file ImageCachePolicies.h.