Blender  V2.93
Public Member Functions | List of all members
blender::ed::spreadsheet::DataSource Class Reference

#include <spreadsheet_data_source.hh>

Inherited by blender::ed::spreadsheet::GeometryDataSource, and blender::ed::spreadsheet::InstancesDataSource.

Public Member Functions

virtual ~DataSource ()
 
virtual void foreach_default_column_ids (FunctionRef< void(const SpreadsheetColumnID &)> fn) const
 
virtual std::unique_ptr< ColumnValuesget_column_values (const SpreadsheetColumnID &column_id) const
 
virtual int tot_rows () const
 

Detailed Description

This class is subclassed to implement different data sources for the spreadsheet. A data source provides the information that should be displayed. It is not concerned with how data is laid out in the spreadsheet editor exactly.

Definition at line 31 of file spreadsheet_data_source.hh.

Constructor & Destructor Documentation

◆ ~DataSource()

blender::ed::spreadsheet::DataSource::~DataSource ( )
virtualdefault

Member Function Documentation

◆ foreach_default_column_ids()

virtual void blender::ed::spreadsheet::DataSource::foreach_default_column_ids ( FunctionRef< void(const SpreadsheetColumnID &)>  fn) const
inlinevirtual

Calls the callback with all the column ids that should be displayed as long as the user does not manually add or remove columns. The column id can be stack allocated. Therefore, the callback should not keep a reference to it (and copy it instead).

Reimplemented in blender::ed::spreadsheet::InstancesDataSource, and blender::ed::spreadsheet::GeometryDataSource.

Definition at line 40 of file spreadsheet_data_source.hh.

References UNUSED_VARS.

Referenced by update_visible_columns().

◆ get_column_values()

virtual std::unique_ptr<ColumnValues> blender::ed::spreadsheet::DataSource::get_column_values ( const SpreadsheetColumnID column_id) const
inlinevirtual

Returns the column values the given column id. If no data exists for this id, null is returned.

Reimplemented in blender::ed::spreadsheet::InstancesDataSource, and blender::ed::spreadsheet::GeometryDataSource.

Definition at line 49 of file spreadsheet_data_source.hh.

References UNUSED_VARS.

Referenced by update_visible_columns().

◆ tot_rows()

virtual int blender::ed::spreadsheet::DataSource::tot_rows ( ) const
inlinevirtual

Returns the number of rows in columns returned by get_column_values.

Reimplemented in blender::ed::spreadsheet::InstancesDataSource, and blender::ed::spreadsheet::GeometryDataSource.

Definition at line 59 of file spreadsheet_data_source.hh.


The documentation for this class was generated from the following files: