43#ifndef DOXYGEN_SHOULD_SKIP_THIS
56 _generators_(std::move(from._generators_)), _nb_generators_(from._nb_generators_),
57 _output_row_(from._output_row_),
58 _setInputRow_performed_(std::move(from._setInputRow_performed_)) {
59 GUM_CONS_MOV(DBRowGeneratorSet);
63 INLINE DBRowGenerator& DBRowGeneratorSet::operator[](
const std::size_t i) {
64 return *(_generators_[i]);
68 INLINE
const DBRowGenerator& DBRowGeneratorSet::operator[](
const std::size_t i)
const {
69 return *(_generators_[i]);
73 INLINE std::size_t DBRowGeneratorSet::nbGenerators() const noexcept {
return _nb_generators_; }
76 INLINE std::size_t DBRowGeneratorSet::size() const noexcept {
return _nb_generators_; }
79 INLINE
bool DBRowGeneratorSet::hasRows() {
return _output_row_ !=
nullptr; }
82 INLINE
bool DBRowGeneratorSet::setInputRow(
const DBRow< DBTranslatedValue >& input_row) {
85 for (
auto& performed: _setInputRow_performed_)
89 return _produceNextRow_(&input_row, std::size_t(0));
93 INLINE
const DBRow< DBTranslatedValue >& DBRowGeneratorSet::generate() {
95 const auto row = _output_row_;
98 _produceNextRow_(_output_row_, _nb_generators_ - 1);
104 INLINE
void DBRowGeneratorSet::reset() {
105 for (
auto gen: _generators_)
107 for (
auto& performed: _setInputRow_performed_)
109 _output_row_ =
nullptr;
114 INLINE
void DBRowGeneratorSet::setColumnsOfInterest(
115 const std::vector< std::size_t >& cols_of_interest) {
117 if (_output_row_ !=
nullptr)
119 "you cannot change the columns of interest while a "
120 "generation is still being processed");
121 for (
auto gen: _generators_)
122 gen->setColumnsOfInterest(cols_of_interest);
128 DBRowGeneratorSet::setColumnsOfInterest(std::vector< std::size_t >&& cols_of_interest) {
129 if (_output_row_ !=
nullptr)
131 "you cannot change the columns of interest while a "
132 "generation is still being processed");
133 for (
auto gen: _generators_)
134 gen->setColumnsOfInterest(cols_of_interest);
138 INLINE
const std::vector< std::size_t >& DBRowGeneratorSet::columnsOfInterest()
const {
139 if (_nb_generators_ == std::size_t(0)) {
141 "there are no generators yet in the generator set, so "
142 "there are no columns of interest");
144 return _generators_[0]->columnsOfInterest();
class for packing sets of generators
Exception : operation not allowed.
Exception : a looked-for element could not be found.
The class used to pack sets of generators.
DBRowGeneratorSet()
default constructor
#define GUM_ERROR(type, msg)
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities