EventAnalysis  1.3.0
Public Member Functions | Private Types | Private Attributes | List of all members
EA::EventDataCacheManager Class Reference

Manager class for event data cache objects. More...

#include <EventDataCacheManager.h>

Public Member Functions

bool AddCache (std::unique_ptr< EventDataCache > cache)
 Adds a cache to the manager. More...
 
observer_ptr< EventDataCacheGetCache (const std::string &storeName)
 Retrieves the cache attached at the given event data store. More...
 
bool SetCurrentEvent (unsigned int event)
 Sets the current event for all the caches. More...
 
bool CacheValues ()
 Caches all the booked objects for all the caches. More...
 
bool Unbook ()
 Unbooks all the booked objects for all the caches. More...
 
bool Clean ()
 Cleans all the caches. More...
 

Private Types

using Caches = std::list< std::unique_ptr< EventDataCache > >
 

Private Attributes

Caches _caches
 

Detailed Description

Manager class for event data cache objects.

This class dispatches common commands to all the registered cache objects.

Member Typedef Documentation

◆ Caches

using EA::EventDataCacheManager::Caches = std::list<std::unique_ptr<EventDataCache> >
private

Member Function Documentation

◆ AddCache()

bool EA::EventDataCacheManager::AddCache ( std::unique_ptr< EventDataCache cache)

Adds a cache to the manager.

Parameters
cacheThe cache object to be added
Returns
true if the cache has been correctly added.

◆ CacheValues()

bool EA::EventDataCacheManager::CacheValues ( )

Caches all the booked objects for all the caches.

Returns
true if all the caches have correctly cached the booked objects.

◆ Clean()

bool EA::EventDataCacheManager::Clean ( )

Cleans all the caches.

Returns
true if all the caches have been correctly cleaned.

◆ GetCache()

observer_ptr< EventDataCache > EA::EventDataCacheManager::GetCache ( const std::string &  storeName)

Retrieves the cache attached at the given event data store.

Parameters
storeNameThe name of the event data store.
Returns
a pointer to the cache of the given store (nullptr if the store does not exist or if there is no cache attached to it).

◆ SetCurrentEvent()

bool EA::EventDataCacheManager::SetCurrentEvent ( unsigned int  event)

Sets the current event for all the caches.

Parameters
eventThe current event
Returns
true if the current event has been set for alla the caches.

◆ Unbook()

bool EA::EventDataCacheManager::Unbook ( )

Unbooks all the booked objects for all the caches.

Returns
if all the caches have correctly unbooked all the booked objects.

Member Data Documentation

◆ _caches

Caches EA::EventDataCacheManager::_caches
private

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