31 #ifndef DOXYGEN_SHOULD_SKIP_THIS 38 template <
template <
typename >
class ALLOC >
46 template <
template <
typename >
class ALLOC >
52 DBRowGenerator< ALLOC >(
59 template <
template <
typename >
class ALLOC >
61 const DBRowGenerator4CompleteRows< ALLOC >& from,
65 __input_row(from.__input_row) {
71 template <
template <
typename >
class ALLOC >
73 const DBRowGenerator4CompleteRows< ALLOC >& from) :
78 template <
template <
typename >
class ALLOC >
80 DBRowGenerator4CompleteRows< ALLOC >&& from,
84 __input_row(from.__input_row) {
90 template <
template <
typename >
class ALLOC >
92 DBRowGenerator4CompleteRows< ALLOC >&& from) :
98 template <
template <
typename >
class ALLOC >
99 DBRowGenerator4CompleteRows< ALLOC >*
103 ALLOC< DBRowGenerator4CompleteRows< ALLOC > > allocator(alloc);
104 DBRowGenerator4CompleteRows< ALLOC >* generator = allocator.allocate(1);
106 allocator.construct(generator, *
this, alloc);
108 allocator.deallocate(generator, 1);
116 template <
template <
typename >
class ALLOC >
117 DBRowGenerator4CompleteRows< ALLOC >*
124 template <
template <
typename >
class ALLOC >
131 template <
template <
typename >
class ALLOC >
132 DBRowGenerator4CompleteRows< ALLOC >&
134 const DBRowGenerator4CompleteRows< ALLOC >& from) {
136 __input_row = from.__input_row;
142 template <
template <
typename >
class ALLOC >
143 DBRowGenerator4CompleteRows< ALLOC >&
145 DBRowGenerator4CompleteRows< ALLOC >&& from) {
147 __input_row = from.__input_row;
153 template <
template <
typename >
class ALLOC >
154 INLINE
const DBRow< DBTranslatedValue, ALLOC >&
162 template <
template <
typename >
class ALLOC >
164 const DBRow< DBTranslatedValue, ALLOC >& row) {
166 const auto& xrow = row.row();
170 if (xrow[col].discr_val == std::numeric_limits< std::size_t >::max()) {
171 __input_row =
nullptr;
172 return std::size_t(0);
177 if (xrow[col].cont_val == std::numeric_limits< float >::max()) {
178 __input_row =
nullptr;
179 return std::size_t(0);
186 <<
" is not supported yet");
191 return std::size_t(1);
std::vector< std::size_t, ALLOC< std::size_t > > _columns_of_interest
the set of columns of interest
DBRowGeneratorGoal
the type of things that a DBRowGenerator is designed for
DBRowGenerator< ALLOC > & operator=(const DBRowGenerator< ALLOC > &)
copy constructor
void decreaseRemainingRows()
decrease the number of remaining output rows
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
virtual std::size_t _computeRows(const DBRow< DBTranslatedValue, ALLOC > &row) final
computes the rows it will provide as output
DBRowGenerator4CompleteRows< ALLOC > & operator=(const DBRowGenerator4CompleteRows< ALLOC > &from)
copy operator
ALLOC< DBTranslatedValue > allocator_type
type for the allocators passed in arguments of methods
DBTranslatedValueType
The nature of the elements handled by translators (discrete, continuous).
allocator_type getAllocator() const
returns the allocator used
allocator_type getAllocator() const
returns the allocator used
~DBRowGenerator4CompleteRows()
destructor
DBRowGenerator(const std::vector< DBTranslatedValueType, ALLOC< DBTranslatedValueType > > column_types, const DBRowGeneratorGoal goal, const allocator_type &alloc=allocator_type())
default constructor
DBRowGenerator4CompleteRows(const std::vector< DBTranslatedValueType, ALLOC< DBTranslatedValueType > > column_types, const allocator_type &alloc=allocator_type())
default constructor
std::vector< DBTranslatedValueType, ALLOC< DBTranslatedValueType > > _column_types
the types of the columns in the DatabaseTable
virtual const DBRow< DBTranslatedValue, ALLOC > & generate() final
generates one ouput DBRow for each DBRow passed to method setInputRow
virtual DBRowGenerator4CompleteRows< ALLOC > * clone() const override final
virtual copy constructor
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
#define GUM_ERROR(type, msg)