10 #ifndef DATAPROVIDER_H_ 11 #define DATAPROVIDER_H_ 89 std::string &actualName) {
93 return GetObject(name, category, wrapper);
135 virtual bool SetCurrentEvent(
unsigned int event, std::vector<std::string> ¬ValidGlobalObjects) {
170 virtual bool SetCurrentPass(
unsigned int pass,
unsigned int iteration) {
return true; }
221 std::string &actualName) {
225 return GetObject(name, category, wrapper, actualName);
276 bool SetEvent(
unsigned int event, std::vector<std::string> ¬ValidGlobalObjects);
288 bool SetPass(
unsigned int pass,
unsigned int iteration);
298 #define RegisterDataProvider(className) \ 299 RegisterClass(EA::DataProvider, className, const std::string &, const std::string &) 300 #define RegisterNSDataProvider(namespace, className) \ 301 RegisterClassAs(EA::DataProvider, className, #namespace "::" #className, const std::string &, const std::string &)
std::string _dataSource
Definition: DataProvider.h:291
bool SetDisabled(bool disabled=true)
Disables/enables the data provider.
Definition: DataProvider.cpp:14
const std::string & GetDataSource()
Getter for data source string.
Definition: DataProvider.h:177
bool SetPass(unsigned int pass, unsigned int iteration)
Set the current processing pass.
Definition: DataProvider.cpp:47
Interface for retrieving informations about an object.
Definition: Info.h:18
RetrievalResult
Definition: RetrievalResult.h:16
IncludeFileExc.h IncludeFileExc class declaration.
Definition: Algorithm.h:21
virtual bool SetCurrentEvent(unsigned int event)
Set the current event.
Definition: DataProvider.h:156
virtual bool SetCurrentPass(unsigned int pass, unsigned int iteration)
Set the current processing pass.
Definition: DataProvider.h:170
RetrievalResult RetrieveObject(const std::string &name, ObjectCategory category, ObjectWrapper &wrapper, std::string &actualName)
Retrieve the requested data object for current event.
Definition: DataProvider.h:220
DataProvider(const std::string &name, const std::string &dataSource)
Constructor.
Definition: DataProvider.h:41
virtual bool Connect()
Opens the connection to the data source.
Definition: DataProvider.h:53
virtual RetrievalResult GetObject(const std::string &name, ObjectCategory category, ObjectWrapper &wrapper, std::string &actualName)
Get the requested data object for current event.
Definition: DataProvider.h:88
ObjectCategory
Category of objects.
Definition: ObjectCategory.h:17
Generic wrapper class.
Definition: ObjectWrapper.h:28
bool ConnectSource()
Opens the connection to the data source.
Definition: DataProvider.cpp:23
Interface for a class which produced data objects.
Definition: ObjectProducer.h:29
virtual bool SetCurrentEvent(unsigned int event, std::vector< std::string > ¬ValidGlobalObjects)
Set the current event.
Definition: DataProvider.h:135
bool DisconnectSource()
Closes the connection to the data source.
Definition: DataProvider.cpp:31
bool _disabled
The data connection.
Definition: DataProvider.h:292
virtual bool IsEventAvailable(unsigned int event)
Checks if the data provider can provide the given event.
Definition: DataProvider.h:238
bool IsDisabled()
Check if the data provider is disabled.
Definition: DataProvider.h:186
virtual bool Disconnect()
Closes the connection to the data source.
Definition: DataProvider.h:61
Object found but class does not match with requested.
bool SetEvent(unsigned int event, std::vector< std::string > ¬ValidGlobalObjects)
Set the current event.
Definition: DataProvider.cpp:39
Interface for a configurable class.
Definition: Configurable.h:25
virtual ~DataProvider()=default
Destructor.
virtual RetrievalResult GetObject(const std::string &name, ObjectCategory category, ObjectWrapper &wrapper)
Get the requested data object for current event.
Definition: DataProvider.h:114
A base class for data providers.
Definition: DataProvider.h:29