26 #ifndef GUM_LEARNING_IDB_INITILIALIZER_H 27 #define GUM_LEARNING_IDB_INITILIALIZER_H 113 template <
template <
typename >
class ALLOC >
166 const std::vector< std::string, ALLOC< std::string > >&
variableNames();
171 template <
template <
template <
typename >
class >
class DATABASE >
173 const bool retry_insertion =
false);
193 virtual std::vector< std::string, ALLOC< std::string > >
198 virtual const std::vector< std::string, ALLOC< std::string > >&
209 #ifndef DOXYGEN_SHOULD_SKIP_THIS 213 std::vector< std::string, ALLOC< std::string > > __var_names;
221 bool __last_insertion_failed{
false};
225 template <
template <
template <
typename >
class >
class DATABASE >
226 void __fillDatabaseFromStrings(DATABASE< ALLOC >& database,
227 const bool retry_insertion);
230 template <
template <
template <
typename >
class >
class DATABASE >
231 void __fillDatabaseFromDBCells(DATABASE< ALLOC >& database,
232 const bool retry_insertion);
const std::vector< std::string, ALLOC< std::string > > & variableNames()
returns the names of the variables in the input dataset
virtual std::vector< std::string, ALLOC< std::string > > _variableNames()=0
ask the child class for the names of the variables
virtual const DBRow< DBCell, ALLOC > & _currentDBCellRow()
asks the child class for the content of the current row using dbcells
allocator_type getAllocator() const
returns the allocator used
gum is the global namespace for all aGrUM entities
The class representing a record stored in a tabular database.
IDBInitializer< ALLOC > & operator=(const IDBInitializer< ALLOC > &from)
copy operator
The class representing the original values of the cells of databases.
void fillDatabase(DATABASE< ALLOC > &database, const bool retry_insertion=false)
fills the rows of the database table
InputType
the enumeration indicating the type of the data the IDBInitializer expects as input data ...
virtual bool _nextRow()=0
indicates whether there is a next row to read (and point on it)
The class for storing a record in a database.
ALLOC< std::string > allocator_type
type for the allocators passed in arguments of methods
virtual const std::vector< std::string, ALLOC< std::string > > & _currentStringRow()
asks the child class for the content of the current row using strings
IDBInitializer(const InputType type, const allocator_type &alloc)
default constructor
std::size_t throwingColumn() const
This method indicates which column filling raised an exception, if any, during the execution of fillD...
The base class for initializing DatabaseTables and RawDatabaseTables from files or sql databases...
virtual ~IDBInitializer()
destructor
The base class for initializing DatabaseTable and RawDatabaseTable instances from CSV files or SQL da...
virtual IDBInitializer< ALLOC > * clone() const =0
virtual copy constructor