[F] Fix compilation error
This commit is contained in:
40
lib/fort.hpp
40
lib/fort.hpp
@@ -1023,7 +1023,11 @@ public:
|
||||
};
|
||||
|
||||
/**
|
||||
* Table column.
|
||||
* Range of cells.
|
||||
*
|
||||
* @note: at the moment function of propery owener will work only on the
|
||||
* top left cell.
|
||||
* @todo: Implement their work on the whole range.
|
||||
*/
|
||||
class cell_range: public property_owner_t
|
||||
{
|
||||
@@ -1031,17 +1035,26 @@ public:
|
||||
using property_owner_t::ps_row_idx_;
|
||||
using property_owner_t::ps_table_;
|
||||
public:
|
||||
table_column(std::size_t col_idx, table &tbl)
|
||||
: property_owner_t(FT_ANY_ROW, col_idx, &tbl) {}
|
||||
cell_range(size_t top_left_row, size_t top_left_col,
|
||||
size_t bottom_right_row, size_t bottom_right_col,
|
||||
table &tbl)
|
||||
: property_owner_t(top_left_row, top_left_col, &tbl),
|
||||
bottom_right_row_(bottom_right_row),
|
||||
bottom_right_col_(bottom_right_col)
|
||||
{}
|
||||
|
||||
void erase()
|
||||
{
|
||||
if (FT_IS_ERROR(ft_erase_range(ps_table_->table_,
|
||||
0, ps_coll_idx_,
|
||||
(UINT_MAX - 2), ps_coll_idx_))) {
|
||||
ps_row_idx_, ps_coll_idx_,
|
||||
bottom_right_row_, bottom_right_col_))) {
|
||||
throw std::runtime_error("Failed to erase column");
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
std::size_t bottom_right_row_;
|
||||
std::size_t bottom_right_col_;
|
||||
};
|
||||
|
||||
|
||||
@@ -1164,6 +1177,23 @@ public:
|
||||
return table_column(col_idx, *this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get range of cells.
|
||||
*
|
||||
* @param col_idx
|
||||
* Column index.
|
||||
* @return
|
||||
* table_column object.
|
||||
*/
|
||||
class cell_range
|
||||
range(std::size_t top_left_row, std::size_t top_left_col,
|
||||
std::size_t bottom_right_row, std::size_t bottom_right_col)
|
||||
{
|
||||
return cell_range(top_left_row, top_left_col,
|
||||
bottom_right_row, bottom_right_col,
|
||||
*this);
|
||||
}
|
||||
|
||||
static class default_properties
|
||||
default_props()
|
||||
{
|
||||
|
Reference in New Issue
Block a user