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;
52 while (it != v.
end()) {
68 boost::apply_visitor(visitor, cell.
m_cell);
73 : m_values(
std::move(values)), m_column_info{column_info} {
82 auto& value_type =
m_values[i].type();
83 auto& column_type = column_info->getDescription(i).type;
85 auto& column_name = column_info->getDescription(i).name;
86 throw Elements::Exception() <<
"Incompatible cell type for " << column_name <<
": expected "
87 << demangle(column_type.name()) <<
", got " << demangle(value_type.name());
90 static const regex::regex vertical_whitespace{
".*[\\n\\v\\f\\r].*"};
98 if (regex_match(value, vertical_whitespace)) {
100 <<
"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
Row(std::vector< cell_type > values, std::shared_ptr< ColumnInfo > column_info)
Constructs a Row with the given cell values and column info descriptor.
std::vector< cell_type >::const_iterator const_iterator
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.
const cell_type & operator[](const size_t index) const
Returns the value of the column with the given index (zero based)
void operator()(const std::vector< T > &v) const
StreamCellVisitor(std::ostream &s)
void operator()(const T &val) const
const Row::cell_type & m_cell