47#ifndef GUM_LEARNING_DB_HANDLER_H
48#define GUM_LEARNING_DB_HANDLER_H
139 template <
typename T_DATA >
155 template <
typename TX_DATA >
170 virtual std::size_t
size()
const = 0;
231 virtual void setRange(std::size_t begin, std::size_t end) = 0;
238 virtual std::pair< std::size_t, std::size_t >
range()
const = 0;
249#ifndef DOXYGEN_SHOULD_SKIP_THIS
253 static constexpr int cache_size_{128};
256 char align_[cache_size_];
The class representing a record stored in a tabular database.
The base class for all database handlers.
const value_type * const_pointer
Types for STL compliance.
value_type & reference
Types for STL compliance.
virtual std::pair< std::size_t, std::size_t > range() const =0
returns the current range of rows of the handler
virtual const_reference rowSafe() const =0
returns the current row of the database (safe version)
DBRow< T_DATA > value_type
Types for STL compliance.
virtual reference row()=0
returns the current row pointed to by the handler (unsafe version)
virtual reference rowSafe()=0
returns the current row of the database (safe version)
value_type * pointer
Types for STL compliance.
virtual std::size_t DBSize() const =0
the number of rows in the whole database
virtual std::size_t numRow() const =0
number of row the handler points to (from the beginning of the area)
std::ptrdiff_t difference_type
Types for STL compliance.
virtual const DBVector< std::string > & variableNames() const =0
returns the names of the variables corresponding to the rows
const value_type & const_reference
Types for STL compliance.
virtual bool hasRows() const =0
indicates wether there are still rows to parse in the database
virtual void nextRow()=0
go to the next row in the database
std::random_access_iterator_tag iterator_category
Types for STL compliance.
virtual void setRange(std::size_t begin, std::size_t end)=0
sets the range of rows in the database that the handler will parse
virtual std::size_t size() const =0
returns the number of rows managed by the handler
virtual std::size_t nbVariables() const =0
returns the number of variables (columns) of the database
virtual void reset()=0
puts the handler to the beginning of the database area it handles
std::size_t size_type
Types for STL compliance.
virtual const_reference row() const =0
returns the current row pointed to by the handler (unsafe version)
std::vector< TX_DATA > DBVector
the type for the allocated vectors in IDatabases
The class for storing a record in a database.
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities