|
Blender V5.0
|
Public Member Functions | |
| AssetIndex (const FileIndexerEntries &indexer_entries) | |
| AssetIndex (std::unique_ptr< Value > &value) | |
| int | get_version () const |
| bool | is_latest_version () const |
| int | extract_into (FileIndexerEntries &indexer_entries) const |
Public Attributes | |
| const int | UNKNOWN_VERSION = -1 |
| std::unique_ptr< Value > | contents |
Static Public Attributes | |
| static const int | CURRENT_VERSION = 1 |
| Version to store in new index files. | |
Instance of this class represents the contents of an asset index file.
Definition at line 445 of file asset_indexer.cc.
|
inline |
Constructor for when creating/updating an asset index file. #AssetIndex.contents are filled from the given indexer_entries.
Definition at line 473 of file asset_indexer.cc.
References blender::ed::asset::index::ATTRIBUTE_VERSION(), CURRENT_VERSION, and blender::ed::asset::index::init_value_from_file_indexer_entries().
|
inline |
Constructor when reading an asset index file. #AssetIndex.contents are read from the given value.
Definition at line 486 of file asset_indexer.cc.
References contents.
|
inline |
Extract the contents of this index into the given indexer_entries.
Definition at line 508 of file asset_indexer.cc.
References blender::ed::asset::index::init_indexer_entries_from_value().
|
inline |
Definition at line 488 of file asset_indexer.cc.
References blender::ed::asset::index::ATTRIBUTE_VERSION(), blender::io::serialize::DictionaryValue::lookup_int(), and UNKNOWN_VERSION.
Referenced by is_latest_version().
|
inline |
Definition at line 498 of file asset_indexer.cc.
References CURRENT_VERSION, and get_version().
| std::unique_ptr<Value> blender::ed::asset::index::AssetIndex::contents |
io::serialize::Value representing the contents of an index file.
Value is used over DictionaryValue as the contents of the index could be corrupted and doesn't represent an object. In case corrupted files are detected the get_version would return UNKNOWN_VERSION.
Definition at line 467 of file asset_indexer.cc.
Referenced by AssetIndex(), and blender::ed::asset::index::AssetIndexFile::write_contents().
|
static |
Version to store in new index files.
Versions are written to each index file. When reading the version is checked against CURRENT_VERSION to make sure we can use the index. Developer should increase CURRENT_VERSION when changes are made to the structure of the stored index.
Definition at line 453 of file asset_indexer.cc.
Referenced by AssetIndex(), is_latest_version(), and blender::ed::asset::index::read_index().
| const int blender::ed::asset::index::AssetIndex::UNKNOWN_VERSION = -1 |
Version number to use when version couldn't be read from an index file.
Definition at line 458 of file asset_indexer.cc.
Referenced by get_version().