|
Blender V4.3
|
#include <spreadsheet_cache.hh>
Classes | |
| class | Key |
| class | Value |
Public Member Functions | |
| void | add (std::unique_ptr< Key > key, std::unique_ptr< Value > value) |
| Value * | lookup (const Key &key) |
| Value & | lookup_or_add (std::unique_ptr< Key > key, FunctionRef< std::unique_ptr< Value >()> create_value) |
| void | set_all_unused () |
| void | remove_all_unused () |
| template<typename T > | |
| T & | lookup_or_add (std::unique_ptr< Key > key) |
A generic cache for the spreadsheet. Different data sources can cache custom data using custom keys.
Elements are removed from the cache when they are not used during a redraw.
Definition at line 21 of file spreadsheet_cache.hh.
| void blender::ed::spreadsheet::SpreadsheetCache::add | ( | std::unique_ptr< Key > | key, |
| std::unique_ptr< Value > | value ) |
Definition at line 9 of file spreadsheet_cache.cc.
Referenced by lookup_or_add().
| SpreadsheetCache::Value * blender::ed::spreadsheet::SpreadsheetCache::lookup | ( | const Key & | key | ) |
Definition at line 16 of file spreadsheet_cache.cc.
References blender::ed::spreadsheet::SpreadsheetCache::Key::is_used.
Referenced by lookup_or_add().
|
inline |
Definition at line 59 of file spreadsheet_cache.hh.
References lookup_or_add().
| SpreadsheetCache::Value & blender::ed::spreadsheet::SpreadsheetCache::lookup_or_add | ( | std::unique_ptr< Key > | key, |
| FunctionRef< std::unique_ptr< Value >()> | create_value ) |
Definition at line 27 of file spreadsheet_cache.cc.
References add(), and lookup().
Referenced by lookup_or_add().
| void blender::ed::spreadsheet::SpreadsheetCache::remove_all_unused | ( | ) |
Definition at line 47 of file spreadsheet_cache.cc.
References blender::ed::spreadsheet::SpreadsheetCache::Key::is_used.
| void blender::ed::spreadsheet::SpreadsheetCache::set_all_unused | ( | ) |
Definition at line 40 of file spreadsheet_cache.cc.