21 #ifndef ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_TEMPLATEDDATASOURCEUSER_IMPL_
22 #error "This file should not be included directly! Use ElementsExamples/TemplatedDataSourceUser.h instead"
33 std::size_t records_number = data_source.countRecords();
34 for (
std::size_t index = 0; index < records_number; ++index) {
35 sum += data_source.getRecordValue(index);
44 #endif // ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_TEMPLATEDDATASOURCEUSER_IMPL_
double sumRecords(const T &data_source)
Compute the sum of the values of the records stored into the provided DataSource. ...