Elements  6.2
A C++ base framework for the Euclid Software.
DataSourceUser.h
Go to the documentation of this file.
1 
27 #ifndef ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_DATASOURCEUSER_H_
28 #define ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_DATASOURCEUSER_H_
29 
30 #include <cstdlib> // for std::size_t
31 
32 #include "ElementsKernel/Export.h" // For ELEMENTS_API
33 
34 namespace Elements {
35 namespace Examples {
36 
47 
48 public:
55  virtual std::size_t countRecords() const = 0;
56 
68  virtual double getRecordValue(std::size_t index) const = 0;
69 
70  virtual ~DataSourceInterface() = default;
71 };
72 
79 
80 public:
90  double sumRecords(const DataSourceInterface& data_source);
91 };
92 
93 } // namespace Examples
94 } // namespace Elements
95 
96 #endif // ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_DATASOURCEUSER_H_
97 
Export.h
defines the macros to be used for explicit export of the symbols
Elements::Examples::DataSourceUser
This class has been created to demonstrate unit testing. It manipulates an object implementing DataSo...
Definition: DataSourceUser.h:78
Elements::Examples::DataSourceInterface::countRecords
virtual std::size_t countRecords() const =0
Count the number of records into the DataSource.
Elements::Examples::DataSourceInterface::getRecordValue
virtual double getRecordValue(std::size_t index) const =0
Fetch the value of the n-th record of the DataSource.
ELEMENTS_API
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
Definition: Export.h:74
Elements::Examples::DataSourceInterface::~DataSourceInterface
virtual ~DataSourceInterface()=default
Elements::Examples::DataSourceInterface
This class has been created to demonstrate unit testing. It is an Interface over a DataSource (a File...
Definition: DataSourceUser.h:46
std::size_t
Elements
Definition: callBackExample.h:35