EventAnalysis  1.0.0
PersistenceServiceManager.h
Go to the documentation of this file.
1 /*
2  * PersistenceServiceManager.h
3  *
4  * Created on: 11 Aug 2017
5  * Author: Nicola Mori
6  */
7 
10 #ifndef PERSISTENCESERVICEMANAGER_H_
11 #define PERSISTENCESERVICEMANAGER_H_
12 
14 
15 namespace EA {
16 
18 
25 public:
34  bool AddPersistence(std::unique_ptr<PersistenceService> persistenceService);
35 
44  bool AddTemplatePersistence(std::unique_ptr<PersistenceService> persistenceService);
45 
51  PersistencePtr GetPersistence(const std::string &name);
52 
57  std::vector<PersistencePtr> GetPersistences();
58 
63  std::vector<PersistencePtr> GetTemplatePersistences();
64 
67 
69  bool Connect();
70 
72  bool Disconnect();
73 
75  bool BeginOfEvent();
76 
78  bool EndOfEvent();
79 
81  bool BeginOfPass();
82 
84  bool EndOfPass();
85 
87  bool BeginOfProcessing();
88 
90  bool EndOfProcessing();
91 
92 private:
93  typedef std::list<std::unique_ptr<PersistenceService>> PersistenceServices;
94  PersistenceServices _persServices;
95  PersistenceServices _templPersServices;
96 };
97 
98 } // namespace EA
99 
100 #endif /* PERSISTENCESERVICEMANAGER_H_ */
bool BeginOfProcessing()
Notifies begin of processing to all the persistence services.
Definition: PersistenceServiceManager.cpp:149
bool EndOfProcessing()
Notifies end of processing to all the persistence services.
Definition: PersistenceServiceManager.cpp:160
bool AddPersistence(std::unique_ptr< PersistenceService > persistenceService)
Add a persistence service to the manager.
bool EndOfPass()
Notifies end of pass to all the persistence services.
Definition: PersistenceServiceManager.cpp:138
A smart pointer not owning the wrapped object.
Definition: ObserverPtr.h:28
bool AddTemplatePersistence(std::unique_ptr< PersistenceService > persistenceService)
Add a template persistence service to the manager.
std::list< std::unique_ptr< PersistenceService > > PersistenceServices
Definition: PersistenceServiceManager.h:93
IncludeFileExc.h IncludeFileExc class declaration.
Definition: Algorithm.h:21
bool EndOfEvent()
Notifies end of event to all the persistence services.
Definition: PersistenceServiceManager.cpp:116
bool Connect()
Connects all the persistence services.
Definition: PersistenceServiceManager.cpp:82
std::vector< PersistencePtr > GetPersistences()
Get all the persistence services.
Definition: PersistenceServiceManager.cpp:47
Manager class for persistence services.
Definition: PersistenceServiceManager.h:24
PersistenceServices _persServices
Definition: PersistenceServiceManager.h:94
std::vector< PersistencePtr > GetTemplatePersistences()
Get all the templatepersistence services.
Definition: PersistenceServiceManager.cpp:56
bool Disconnect()
Disconnect all the persistence services.
Definition: PersistenceServiceManager.cpp:93
PersistencePtr GetPersistence(const std::string &name)
Get a given persistence service.
Definition: PersistenceServiceManager.cpp:35
bool SetDataStoreManager(observer_ptr< DataStoreManager > dsManager)
Sets the data store manager for all the persistence services.
Definition: PersistenceServiceManager.cpp:65
PersistenceServices _templPersServices
Definition: PersistenceServiceManager.h:95
bool BeginOfEvent()
Notifies begin of event to all the persistence services.
Definition: PersistenceServiceManager.cpp:105
bool BeginOfPass()
Notifies begin of pass to all the persistence services.
Definition: PersistenceServiceManager.cpp:127