gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
CacheBlkVisitorWrapper Class Reference

Wrap a method and present it as a cache block visitor. More...

#include <cache.hh>

Inheritance diagram for CacheBlkVisitorWrapper:
CacheBlkVisitor

Public Types

typedef bool(Cache::* VisitorPtr )(CacheBlk &blk)
 

Public Member Functions

 CacheBlkVisitorWrapper (Cache &_cache, VisitorPtr _visitor)
 
bool operator() (CacheBlk &blk) override
 
- Public Member Functions inherited from CacheBlkVisitor
 CacheBlkVisitor ()
 
virtual ~CacheBlkVisitor ()
 

Private Attributes

Cachecache
 
VisitorPtr visitor
 

Detailed Description

Wrap a method and present it as a cache block visitor.

For example the forEachBlk method in the tag arrays expects a callable object/function as their parameter. This class wraps a method in an object and presents callable object that adheres to the cache block visitor protocol.

Definition at line 579 of file cache.hh.

Member Typedef Documentation

typedef bool(Cache::* CacheBlkVisitorWrapper::VisitorPtr)(CacheBlk &blk)

Definition at line 582 of file cache.hh.

Constructor & Destructor Documentation

CacheBlkVisitorWrapper::CacheBlkVisitorWrapper ( Cache _cache,
VisitorPtr  _visitor 
)
inline

Definition at line 584 of file cache.hh.

Member Function Documentation

bool CacheBlkVisitorWrapper::operator() ( CacheBlk blk)
inlineoverridevirtual

Implements CacheBlkVisitor.

Definition at line 587 of file cache.hh.

References cache, and visitor.

Member Data Documentation

Cache& CacheBlkVisitorWrapper::cache
private

Definition at line 592 of file cache.hh.

Referenced by operator()().

VisitorPtr CacheBlkVisitorWrapper::visitor
private

Definition at line 593 of file cache.hh.

Referenced by operator()().


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

Generated on Fri Jun 9 2017 13:04:04 for gem5 by doxygen 1.8.6