EventAnalysis
1.0.0
|
Manager class for data providers. More...
#include <DataProviderManager.h>
Public Member Functions | |
bool | AddProvider (std::unique_ptr< DataProvider > provider) |
Add a data provider to the manager. More... | |
ProviderPtr | GetProvider (const std::string &name) |
Get a given provider. More... | |
std::vector< ProviderPtr > | GetProviders () const |
Get a list of providers. More... | |
bool | Connect () |
Dispatches the call to Connect to all the data providers. More... | |
bool | Disconnect () |
Dispatches the call to Disconnect to all the data providers. More... | |
bool | SetCurrentEvent (unsigned int event, std::vector< std::pair< observer_ptr< DataProvider >, std::vector< std::string >>> ¬ValidGlobalObjects) |
Set the current event for all the registered providers. More... | |
bool | SetCurrentEvent (unsigned int event) |
Set the current event for all the registered providers. More... | |
bool | SetCurrentPass (unsigned int pass, unsigned int iter) |
Set the current pass and iteration for all the registered providers. More... | |
Private Types | |
typedef std::list< std::unique_ptr< DataProvider > > | ProvidersBook |
Private Attributes | |
ProvidersBook | _providers |
Manager class for data providers.
This class is a management interface for data providers. It owns the registered providers and can be used to fetch a provider and to set the current event and pass number to all the registered providers.
|
private |
bool EA::DataProviderManager::AddProvider | ( | std::unique_ptr< DataProvider > | provider | ) |
Add a data provider to the manager.
The given provider is added to the list of providers managed by the DataProviderManager no provider with the same name has already been added.
provider | The provider to be added. |
bool EA::DataProviderManager::Connect | ( | ) |
Dispatches the call to Connect to all the data providers.
bool EA::DataProviderManager::Disconnect | ( | ) |
Dispatches the call to Disconnect to all the data providers.
ProviderPtr EA::DataProviderManager::GetProvider | ( | const std::string & | name | ) |
Get a given provider.
name | The name of the requested provider. |
std::vector< ProviderPtr > EA::DataProviderManager::GetProviders | ( | ) | const |
Get a list of providers.
bool EA::DataProviderManager::SetCurrentEvent | ( | unsigned int | event, |
std::vector< std::pair< observer_ptr< DataProvider >, std::vector< std::string >>> & | notValidGlobalObjects | ||
) |
Set the current event for all the registered providers.
event | The event number to be set |
notValidGlobalObjects | A list of pair, each pair contains a data provider ptr and a list of global objects which are not valid, the latter will be removed from data stores. |
|
inline |
Set the current event for all the registered providers.
event | The event number to be set |
bool EA::DataProviderManager::SetCurrentPass | ( | unsigned int | pass, |
unsigned int | iter | ||
) |
Set the current pass and iteration for all the registered providers.
pass | The pass number to be set |
iter | The iteration number for current pass to be set |
|
private |