Public Member Functions
TProductCache< ProductPtr > Class Template Reference

The type specific product cache. More...

#include <mia/core/productcache.hh>

Inheritance diagram for TProductCache< ProductPtr >:
CProductCache

Public Member Functions

void add (const std::string &name, ProductPtr product)
 
ProductPtr get (const std::string &name) const
 
 TProductCache (const std::string &descriptor)
 
- Public Member Functions inherited from CProductCache
void clear ()
 clear the cache More...
 
 CProductCache (const std::string &name)
 
void enable_write (bool enable)
 

Additional Inherited Members

- Protected Member Functions inherited from CProductCache
bool is_enabled () const
 

Detailed Description

template<typename ProductPtr>
class TProductCache< ProductPtr >

The type specific product cache.

Template Parameters
ProductPtrthe shared pointer of the product that is actually stored in this cache.

Definition at line 82 of file productcache.hh.

Constructor & Destructor Documentation

template<typename ProductPtr >
TProductCache< ProductPtr >::TProductCache ( const std::string &  descriptor)

Constructor

Definition at line 149 of file productcache.hh.

Member Function Documentation

template<typename ProductPtr >
void TProductCache< ProductPtr >::add ( const std::string &  name,
ProductPtr  product 
)

Add a product pointer to the cache if the cache is enabled

Parameters
nameinitializer string of the product
productthe shared pointer of the product to be added

Definition at line 165 of file productcache.hh.

template<typename ProductPtr >
ProductPtr TProductCache< ProductPtr >::get ( const std::string &  name) const

Get a profuct if it is cached,

Parameters
namethe initializer string
Returns
the shared product pointer, if available, or an empty shared pointer

Definition at line 155 of file productcache.hh.


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