Blender  V3.3
spreadsheet_data_source.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
5 #include "BLI_function_ref.hh"
6 
7 #include "spreadsheet_column.hh"
9 
10 namespace blender::ed::spreadsheet {
11 
17 class DataSource {
18  public:
19  virtual ~DataSource();
20 
30  FunctionRef<void(const SpreadsheetColumnID &, bool is_extra)> /*fn*/) const
31  {
32  }
33 
38  virtual std::unique_ptr<ColumnValues> get_column_values(
39  const SpreadsheetColumnID & /*column_id*/) const
40  {
41  return {};
42  }
43 
48  virtual bool has_selection_filter() const
49  {
50  return false;
51  }
52 
56  virtual int tot_rows() const
57  {
58  return 0;
59  }
60 };
61 
62 } // namespace blender::ed::spreadsheet
virtual void foreach_default_column_ids(FunctionRef< void(const SpreadsheetColumnID &, bool is_extra)>) const
virtual std::unique_ptr< ColumnValues > get_column_values(const SpreadsheetColumnID &) const