Blender  V3.3
Public Member Functions | Public Attributes | List of all members
blender::ed::asset::index::AssetIndexFile Class Reference
Inheritance diagram for blender::ed::asset::index::AssetIndexFile:
blender::ed::asset::index::AbstractFile

Public Member Functions

 AssetIndexFile (AssetLibraryIndex &library_index, BlendFile &asset_filename)
 
void mark_as_used ()
 
const char * get_file_path () const override
 
bool is_older_than (BlendFile &asset_file) const
 
bool constains_entries () const
 
std::unique_ptr< AssetIndexread_contents () const
 
bool ensure_parent_path_exists () const
 
void write_contents (AssetIndex &content)
 
- Public Member Functions inherited from blender::ed::asset::index::AbstractFile
virtual ~AbstractFile ()=default
 
bool exists () const
 
size_t get_file_size () const
 

Public Attributes

AssetLibraryIndexlibrary_index
 
const size_t MIN_FILE_SIZE_WITH_ENTRIES = 32
 
std::string filename
 

Detailed Description

Definition at line 614 of file asset_indexer.cc.

Constructor & Destructor Documentation

◆ AssetIndexFile()

blender::ed::asset::index::AssetIndexFile::AssetIndexFile ( AssetLibraryIndex library_index,
BlendFile asset_filename 
)
inline

Definition at line 624 of file asset_indexer.cc.

Member Function Documentation

◆ constains_entries()

bool blender::ed::asset::index::AssetIndexFile::constains_entries ( ) const
inline

Check whether the index file contains entries without opening the file.

Definition at line 650 of file asset_indexer.cc.

Referenced by blender::ed::asset::index::read_index().

◆ ensure_parent_path_exists()

bool blender::ed::asset::index::AssetIndexFile::ensure_parent_path_exists ( ) const
inline

Definition at line 667 of file asset_indexer.cc.

References BLI_make_existing_file().

◆ get_file_path()

const char* blender::ed::asset::index::AssetIndexFile::get_file_path ( ) const
inlineoverridevirtual

◆ is_older_than()

bool blender::ed::asset::index::AssetIndexFile::is_older_than ( BlendFile asset_file) const
inline

Returns whether the index file is older than the given asset file.

Definition at line 642 of file asset_indexer.cc.

References BLI_file_older(), and blender::ed::asset::index::BlendFile::get_file_path().

Referenced by blender::ed::asset::index::read_index().

◆ mark_as_used()

void blender::ed::asset::index::AssetIndexFile::mark_as_used ( )
inline

◆ read_contents()

std::unique_ptr<AssetIndex> blender::ed::asset::index::AssetIndexFile::read_contents ( ) const
inline

◆ write_contents()

void blender::ed::asset::index::AssetIndexFile::write_contents ( AssetIndex content)
inline

Member Data Documentation

◆ filename

std::string blender::ed::asset::index::AssetIndexFile::filename

Definition at line 622 of file asset_indexer.cc.

Referenced by blender::ed::asset::index::read_index().

◆ library_index

AssetLibraryIndex& blender::ed::asset::index::AssetIndexFile::library_index

Definition at line 616 of file asset_indexer.cc.

◆ MIN_FILE_SIZE_WITH_ENTRIES

const size_t blender::ed::asset::index::AssetIndexFile::MIN_FILE_SIZE_WITH_ENTRIES = 32

Asset index files with a size smaller than this attribute would be considered to not contain any entries.

Definition at line 621 of file asset_indexer.cc.


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