Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_spreadsheet/spreadsheet_data_source.cc
- This file was copied from source/blender/editors/space_spreadsheet/spreadsheet_from_geometry.hh.
| /* | /* | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License | * modify it under the terms of the GNU General Public License | ||||
| * as published by the Free Software Foundation; either version 2 | * as published by the Free Software Foundation; either version 2 | ||||
| * of the License, or (at your option) any later version. | * of the License, or (at your option) any later version. | ||||
| * | * | ||||
| * This program is distributed in the hope that it will be useful, | * This program is distributed in the hope that it will be useful, | ||||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
| * GNU General Public License for more details. | * GNU General Public License for more details. | ||||
| * | * | ||||
| * You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
| * along with this program; if not, write to the Free Software Foundation, | * along with this program; if not, write to the Free Software Foundation, | ||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
| */ | */ | ||||
| #pragma once | #include "spreadsheet_data_source.hh" | ||||
| #include "BKE_geometry_set.hh" | |||||
| #include "BLI_resource_scope.hh" | |||||
| #include "spreadsheet_column_layout.hh" | |||||
| struct bContext; | |||||
| namespace blender::ed::spreadsheet { | namespace blender::ed::spreadsheet { | ||||
| void spreadsheet_columns_from_geometry(const bContext *C, | void DataSource::foreach_default_column_ids( | ||||
| Object *object_eval, | FunctionRef<void(const SpreadsheetColumnID &)> UNUSED(fn)) const | ||||
| SpreadsheetColumnLayout &column_layout, | { | ||||
| ResourceScope &scope); | } | ||||
| std::unique_ptr<ColumnValues> DataSource::get_column_values( | |||||
| const SpreadsheetColumnID &UNUSED(column_id)) const | |||||
| { | |||||
| return {}; | |||||
| } | |||||
| int DataSource::tot_rows() const | |||||
| { | |||||
| return 0; | |||||
| } | |||||
HooglyBoogly: It usually seems cleaner to define these default "blank" functions right in the header. Is that… | |||||
JacquesLuckeAuthorUnsubmitted Done Inline ActionsI tried to get into the habit of putting less stuff into headers when it is not necessary, but for these functions it seems fine if it improves readability. JacquesLucke: I tried to get into the habit of putting less stuff into headers when it is not necessary, but… | |||||
| } // namespace blender::ed::spreadsheet | } // namespace blender::ed::spreadsheet | ||||
It usually seems cleaner to define these default "blank" functions right in the header. Is that possible here or did you put them here for another reason?
It's just one less search hit to look through when you want to know more about the implementations of these methods, which IMO helps a lot.