Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_spreadsheet/spreadsheet_column.hh
- This file was copied from source/blender/editors/space_spreadsheet/spreadsheet_from_geometry.hh.
| Show All 10 Lines | |||||
| * | * | ||||
| * 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 | #pragma once | ||||
| #include "BKE_geometry_set.hh" | #include "DNA_space_types.h" | ||||
| #include "BLI_resource_scope.hh" | #include "BLI_hash.hh" | ||||
| #include "spreadsheet_column_layout.hh" | namespace blender { | ||||
| template<> struct DefaultHash<SpreadsheetColumnID> { | |||||
| struct bContext; | uint64_t operator()(const SpreadsheetColumnID &column_id) const | ||||
| { | |||||
| return get_default_hash_2(StringRef(column_id.name), column_id.index); | |||||
| } | |||||
| }; | |||||
| } // namespace blender | |||||
| inline bool operator==(const SpreadsheetColumnID &a, const SpreadsheetColumnID &b) | |||||
| { | |||||
| using blender::StringRef; | |||||
| return StringRef(a.name) == StringRef(b.name) && a.index == b.index; | |||||
| } | |||||
| namespace blender::ed::spreadsheet { | namespace blender::ed::spreadsheet { | ||||
| void spreadsheet_columns_from_geometry(const bContext *C, | SpreadsheetColumnID *spreadsheet_column_id_new(); | ||||
| Object *object_eval, | SpreadsheetColumnID *spreadsheet_column_id_copy(const SpreadsheetColumnID *src_column_id); | ||||
| SpreadsheetColumnLayout &column_layout, | void spreadsheet_column_id_free(SpreadsheetColumnID *column_id); | ||||
| ResourceScope &scope); | |||||
| SpreadsheetColumn *spreadsheet_column_new(SpreadsheetColumnID *column_id); | |||||
| SpreadsheetColumn *spreadsheet_column_copy(const SpreadsheetColumn *src_column); | |||||
| void spreadsheet_column_free(SpreadsheetColumn *column); | |||||
| } // namespace blender::ed::spreadsheet | } // namespace blender::ed::spreadsheet | ||||