This class is used to set the main functions of a cache policy. More...
#include <AbstractCachePolicy.h>
Public Member Functions | |
| AbstractCachePolicy () | |
| Default constructor. | |
| virtual | ~AbstractCachePolicy () |
| Virtual destructor. | |
Access Methods | |
Method used to access the cache policy | |
| virtual void | added (int value)=0 |
| Function used to add a new index to be controlled. | |
| virtual void | update (int value)=0 |
| Function used to inform that an index must be updated. | |
| virtual void | toRemove (int &value)=0 |
| Function used to check what index has to be removed from the cache. | |
| virtual void | accessed (int value)=0 |
| Function used to inform that an index was accessed. | |
This class is used to set the main functions of a cache policy.
This is a generic interface to control the access frequency to any type of objects. Only the index of each object is controlled by this class.
Definition at line 54 of file AbstractCachePolicy.h.
| te::graph::AbstractCachePolicy::AbstractCachePolicy | ( | ) |
Default constructor.
|
virtual |
Virtual destructor.
|
pure virtual |
Function used to inform that an index was accessed.
| value | Object index attribute |
Implemented in te::graph::FIFOCachePolicy, and te::graph::LFUCachePolicy.
|
pure virtual |
Function used to add a new index to be controlled.
| value | Object index attribute |
Implemented in te::graph::FIFOCachePolicy, and te::graph::LFUCachePolicy.
|
pure virtual |
Function used to check what index has to be removed from the cache.
| value | Object index attribute |
Implemented in te::graph::FIFOCachePolicy, and te::graph::LFUCachePolicy.
|
pure virtual |
Function used to inform that an index must be updated.
| value | Object index attribute |
Implemented in te::graph::FIFOCachePolicy, and te::graph::LFUCachePolicy.