Loading [MathJax]/extensions/TeX/AMSsymbols.js
DGtal 1.4.2
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory > Class Template Reference

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

ImageFactorymyImageFactory
 Alias on the image factory.
 

Private Member Functions

 ImageCacheWritePolicyWB (const ImageCacheWritePolicyWB &other)
 
ImageCacheWritePolicyWBoperator= (const ImageCacheWritePolicyWB &other)
 

Detailed Description

template<typename TImageContainer, typename TImageFactory>
class DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >

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.

Template Parameters
TImageContaineran image container type (model of CImage).
TImageFactoryan image factory.

The policy is done with 2 functions:

  • writeInPage : for setting a value on an image at a given position given by a point
  • flushPage : for flushing the image on disk according to the cache policy

Definition at line 362 of file ImageCachePolicies.h.

Member Typedef Documentation

◆ Domain

template<typename TImageContainer , typename TImageFactory >
TImageContainer::Domain DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::Domain

Definition at line 373 of file ImageCachePolicies.h.

◆ ImageContainer

template<typename TImageContainer , typename TImageFactory >
TImageContainer DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::ImageContainer

Definition at line 372 of file ImageCachePolicies.h.

◆ ImageFactory

template<typename TImageContainer , typename TImageFactory >
TImageFactory DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::ImageFactory

Definition at line 370 of file ImageCachePolicies.h.

◆ Point

template<typename TImageContainer , typename TImageFactory >
TImageContainer::Point DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::Point

Definition at line 374 of file ImageCachePolicies.h.

◆ Value

template<typename TImageContainer , typename TImageFactory >
TImageContainer::Value DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::Value

Definition at line 375 of file ImageCachePolicies.h.

Constructor & Destructor Documentation

◆ ImageCacheWritePolicyWB() [1/2]

template<typename TImageContainer , typename TImageFactory >
DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::ImageCacheWritePolicyWB ( Alias< ImageFactory > anImageFactory)
inline

Definition at line 377 of file ImageCachePolicies.h.

377 :
378 myImageFactory(&anImageFactory)
379 {
380 }
ImageFactory * myImageFactory
Alias on the image factory.

◆ ~ImageCacheWritePolicyWB()

template<typename TImageContainer , typename TImageFactory >
DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::~ImageCacheWritePolicyWB ( )
inline

Destructor. Does nothing

Definition at line 386 of file ImageCachePolicies.h.

386{}

◆ ImageCacheWritePolicyWB() [2/2]

template<typename TImageContainer , typename TImageFactory >
DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::ImageCacheWritePolicyWB ( const ImageCacheWritePolicyWB< TImageContainer, TImageFactory > & other)
private

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT() [1/2]

template<typename TImageContainer , typename TImageFactory >
DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::BOOST_CONCEPT_ASSERT ( (concepts::CImage< TImageContainer >) )

Checking concepts.

◆ BOOST_CONCEPT_ASSERT() [2/2]

template<typename TImageContainer , typename TImageFactory >
DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::BOOST_CONCEPT_ASSERT ( (concepts::CImageFactory< TImageFactory >) )

◆ flushPage()

template<typename TImageContainer , typename TImageFactory >
void DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::flushPage ( ImageContainer * anImageContainer)

Flush the image on disk according to the cache policy.

Parameters
anImageContainerthe image.

◆ operator=()

template<typename TImageContainer , typename TImageFactory >
ImageCacheWritePolicyWB & DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::operator= ( const ImageCacheWritePolicyWB< TImageContainer, TImageFactory > & other)
private

◆ writeInPage()

template<typename TImageContainer , typename TImageFactory >
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.

Parameters
anImageContainerthe image.
aPointthe point.
aValuethe value.

Field Documentation

◆ myImageFactory

template<typename TImageContainer , typename TImageFactory >
ImageFactory* DGtal::ImageCacheWritePolicyWB< TImageContainer, TImageFactory >::myImageFactory
protected

Alias on the image factory.

Definition at line 416 of file ImageCachePolicies.h.


The documentation for this class was generated from the following file: