29#include <boost/algorithm/string/join.hpp>
31#if BOOST_VERSION < 105600
32#include <boost/units/detail/utility.hpp>
33using boost::units::detail::demangle;
35using boost::core::demangle;
47 while (it != v.
end()) {
66 : m_values(
std::move(values)), m_column_info{column_info} {
75 auto& value_type =
m_values[i].type();
76 auto& column_type = column_info->getDescription(i).type;
77 auto& column_name = column_info->getDescription(i).name;
79 throw Elements::Exception() <<
"Incompatible cell type for " << column_name <<
": expected "
80 << demangle(column_type.name()) <<
", got " << demangle(value_type.name());
83 static const regex::regex vertical_whitespace{
".*[\\n\\v\\f\\r].*"};
90 if (regex_match(value, vertical_whitespace)) {
92 <<
"vertical whitespace characters";
const_iterator end() const
Returns a const iterator to the past-the-end cell of the row.
std::vector< cell_type > m_values
std::shared_ptr< ColumnInfo > getColumnInfo() const
Returns a ColumnInfo object describing the columns of the Row.
const_iterator begin() const
Returns a const iterator to the first cell of the row.
size_t size() const
Returns the number of cells in the row.
std::shared_ptr< ColumnInfo > m_column_info
boost::variant< bool, int32_t, int64_t, float, double, std::string, std::vector< bool >, std::vector< int32_t >, std::vector< int64_t >, std::vector< float >, std::vector< double >, NdArray::NdArray< int32_t >, NdArray::NdArray< int64_t >, NdArray::NdArray< float >, NdArray::NdArray< double > > cell_type
The possible cell types.
std::vector< cell_type >::const_iterator const_iterator
const cell_type & operator[](const size_t index) const
Returns the value of the column with the given index (zero based)
template std::ostream & operator<<<bool >(std::ostream &s, const std::vector< bool > &v)
template std::ostream & operator<<<float >(std::ostream &s, const std::vector< float > &v)
template std::ostream & operator<<<double >(std::ostream &s, const std::vector< double > &v)
std::ostream & operator<<(std::ostream &s, const std::vector< T > &v)