Guiliani  Version 2.5 revision 7293 (documentation build 13)
CGUIImageCacheReplacementPolicy Class Referenceabstract

Abstract replacement policy for use with the Guiliani image cache. More...

#include <GUIImageCacheReplacementPolicy.h>

Inheritance diagram for CGUIImageCacheReplacementPolicy:

Public Member Functions

virtual ~CGUIImageCacheReplacementPolicy ()
 Destructor.
 
virtual eC_Bool Add (const ImageResource_t &eImageID, eC_UInt uiSize)=0
 
virtual eC_Bool Bump (const ImageResource_t &eImageID)
 
CGUIImageCacheReplacementManagerGetImageCacheReplacementManager (void)
 
virtual ReplacementPolicyType_t GetPolicyType () const =0
 
virtual ImageResource_t Remove ()=0
 

Static Public Member Functions

static CGUIImageCacheReplacementPolicyCreateReplacementPolicyForType (const ReplacementPolicyType_t &eType, CGUIImageCacheReplacementManager *pManager)
 

Protected Attributes

CGUIImageCacheReplacementManagerm_pCacheManager
 The replacement manager (bridge implementation)
 

Detailed Description

Abstract replacement policy for use with the Guiliani image cache.

Member Function Documentation

◆ Add()

virtual eC_Bool CGUIImageCacheReplacementPolicy::Add ( const ImageResource_t eImageID,
eC_UInt  uiSize 
)
pure virtual

Adds an image to the pool of replaceable images The image has to be added in the appropriate way for the implemented replacement policy

Parameters
eImageIDthe image's ID
uiSizethe image's size
Returns
True if the image was successfully added

Implemented in CGUIImageCacheReplacementDummy, CGUIImageCacheReplacementFifo, CGUIImageCacheReplacementGreedy, and CGUIImageCacheReplacementLru.

◆ Bump()

virtual eC_Bool CGUIImageCacheReplacementPolicy::Bump ( const ImageResource_t eImageID)
virtual

Marks an image as recently used, if supported by the replacement policy (Only valid for LRU replacement)

Parameters
eImageIDthe image's ID
Returns
True if any action was performed

Reimplemented in CGUIImageCacheReplacementLru.

◆ CreateReplacementPolicyForType()

static CGUIImageCacheReplacementPolicy * CGUIImageCacheReplacementPolicy::CreateReplacementPolicyForType ( const ReplacementPolicyType_t eType,
CGUIImageCacheReplacementManager pManager 
)
static

Creates a replacement policy object for a specific policy type

Parameters
eTypethe type of replacement policy
pManagerthe replacement manager object to be used with the new policy
Returns
the newly created replacement policy

◆ GetImageCacheReplacementManager()

CGUIImageCacheReplacementManager * CGUIImageCacheReplacementPolicy::GetImageCacheReplacementManager ( void  )

Get the image cache replacement manager of the policy

Returns
A pointer to the image cache manager

◆ GetPolicyType()

virtual ReplacementPolicyType_t CGUIImageCacheReplacementPolicy::GetPolicyType ( ) const
pure virtual

Returns the type of this replacement policy

Returns
the policy type

Implemented in CGUIImageCacheReplacementDummy, CGUIImageCacheReplacementFifo, CGUIImageCacheReplacementGreedy, and CGUIImageCacheReplacementLru.

◆ Remove()

virtual ImageResource_t CGUIImageCacheReplacementPolicy::Remove ( )
pure virtual

Removes an image from the pool of replaceable images The image to be removed is selected in accordance to the replacement policy

Returns
the removed image's ID

Implemented in CGUIImageCacheReplacementDummy, CGUIImageCacheReplacementFifo, CGUIImageCacheReplacementGreedy, and CGUIImageCacheReplacementLru.


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