This is the concrete factory for the LFU cache policy. More...
#include <LFUCachePolicyFactory.h>
Public Types | |
typedef FactoryDictionary < AbstractFactory < AbstractCachePolicy, std::string, TKEYCOMPARE > , std::string, TKEYCOMPARE > | dictionary_type |
typedef AbstractFactory | factory_type |
Public Member Functions | |
const std::string & | getKey () const |
It returns the factory key associated to the concreate factory. More... | |
const std::string & | getType () const |
Returns the type (name) of this factory. More... | |
~LFUCachePolicyFactory () | |
Virtual destructor. More... | |
Static Public Member Functions | |
static void | finalize () |
It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the abstract factory ... More... | |
static const factory_type * | find (const std::string &factoryKey) |
static dictionary_type & | getDictionary () |
It returns a reference to the internal dictionary of concrete factories. More... | |
static void | initialize () |
It initializes the factory: the singleton instance will be registered in the abstract factory ... More... | |
static AbstractCachePolicy * | make () |
It creates and returns default cache policy. More... | |
static AbstractCachePolicy * | make (const std::string &cpType) |
It creates a cache policy with the proper type. More... | |
Protected Member Functions | |
te::graph::AbstractCachePolicy * | build () |
Builds a new cache policy object. More... | |
LFUCachePolicyFactory () | |
Default constructor. More... | |
Protected Attributes | |
std::string | m_factoryKey |
The key that identifies the concrete factory: it will be used for unregistering the factory during destruction. More... | |
Static Private Attributes | |
static LFUCachePolicyFactory * | sm_factory |
Static attribute used to register this factory. More... | |
This is the concrete factory for the LFU cache policy.
Definition at line 44 of file LFUCachePolicyFactory.h.
|
inherited |
Definition at line 73 of file AbstractFactory.h.
|
inherited |
Definition at line 77 of file AbstractFactory.h.
|
inline |
Virtual destructor.
Definition at line 49 of file LFUCachePolicyFactory.h.
|
protected |
Default constructor.
Definition at line 53 of file LFUCachePolicyFactory.cpp.
|
protectedvirtual |
Builds a new cache policy object.
Implements te::common::AbstractFactory< AbstractCachePolicy, std::string >.
Definition at line 58 of file LFUCachePolicyFactory.cpp.
|
static |
It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the abstract factory ...
Definition at line 47 of file LFUCachePolicyFactory.cpp.
Referenced by te::graph::Module::finalize().
|
staticinherited |
|
staticinherited |
It returns a reference to the internal dictionary of concrete factories.
The dictionary is a singleton.
|
inherited |
It returns the factory key associated to the concreate factory.
|
virtual |
Returns the type (name) of this factory.
Implements te::graph::AbstractCachePolicyFactory.
Definition at line 36 of file LFUCachePolicyFactory.cpp.
References te::graph::Globals::sm_factoryCachePolicyTypeLFU.
|
static |
It initializes the factory: the singleton instance will be registered in the abstract factory ...
Definition at line 41 of file LFUCachePolicyFactory.cpp.
Referenced by te::graph::Module::initialize().
|
staticinherited |
It creates and returns default cache policy.
Definition at line 36 of file AbstractCachePolicyFactory.cpp.
References te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::make(), and TE_DEFAULT_CACHE_POLICY_TYPE.
Referenced by te::graph::AbstractGraphFactory::getCachePolicy(), and te::graph::GraphCache::GraphCache().
|
staticinherited |
It creates a cache policy with the proper type.
cpType | The name of the specific cache policy. |
Definition at line 41 of file AbstractCachePolicyFactory.cpp.
References te::common::Convert2UCase(), and te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::make().
|
protectedinherited |
The key that identifies the concrete factory: it will be used for unregistering the factory during destruction.
Definition at line 136 of file AbstractFactory.h.
|
staticprivate |
Static attribute used to register this factory.
Definition at line 69 of file LFUCachePolicyFactory.h.