Aim: implements a 'WB (Write-back or Write-behind)' write 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. | |
BOOST_CONCEPT_ASSERT ((concepts::CImageFactory< TImageFactory >)) | |
ImageCacheWritePolicyWB (Alias< ImageFactory > anImageFactory) | |
~ImageCacheWritePolicyWB () | |
void | writeInPage (ImageContainer *anImageContainer, const Point &aPoint, const Value &aValue) |
void | flushPage (ImageContainer *anImageContainer) |
Protected Attributes | |
ImageFactory * | myImageFactory |
Alias on the image factory. | |
Private Member Functions | |
ImageCacheWritePolicyWB (const ImageCacheWritePolicyWB &other) | |
ImageCacheWritePolicyWB & | operator= (const ImageCacheWritePolicyWB &other) |
Aim: implements a 'WB (Write-back or Write-behind)' write policy cache.
Description of template class 'ImageCacheWritePolicyWB'
Initially, writing is done only to the cache. The write to the disk is postponed until the cache blocks containing the data are about to be modified/replaced by new content.
TImageContainer | an image container type (model of CImage). |
TImageFactory | an image factory. |
The policy is done with 2 functions:
Definition at line 362 of file ImageCachePolicies.h.
TImageContainer::Domain DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::Domain |
Definition at line 373 of file ImageCachePolicies.h.
TImageContainer DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::ImageContainer |
Definition at line 372 of file ImageCachePolicies.h.
TImageFactory DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::ImageFactory |
Definition at line 370 of file ImageCachePolicies.h.
TImageContainer::Point DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::Point |
Definition at line 374 of file ImageCachePolicies.h.
TImageContainer::Value DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::Value |
Definition at line 375 of file ImageCachePolicies.h.
|
inline |
Definition at line 377 of file ImageCachePolicies.h.
|
inline |
|
private |
DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::BOOST_CONCEPT_ASSERT | ( | (concepts::CImage< TImageContainer >) | ) |
Checking concepts.
DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::BOOST_CONCEPT_ASSERT | ( | (concepts::CImageFactory< TImageFactory >) | ) |
void DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::flushPage | ( | ImageContainer * | anImageContainer | ) |
Flush the image on disk according to the cache policy.
anImageContainer | the image. |
|
private |
void DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::writeInPage | ( | ImageContainer * | anImageContainer, |
const Point & | aPoint, | ||
const Value & | aValue ) |
Set a value on an image at a given position given by aPoint.
anImageContainer | the image. |
aPoint | the point. |
aValue | the value. |
|
protected |
Alias on the image factory.
Definition at line 416 of file ImageCachePolicies.h.