Blender V4.3
file_indexer.cc File Reference
#include "file_indexer.hh"
#include "MEM_guardedalloc.h"
#include "BLI_linklist.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"

Go to the source code of this file.

Namespaces

namespace  blender
 
namespace  blender::ed
 
namespace  blender::ed::file
 
namespace  blender::ed::file::indexer
 

Functions

static eFileIndexerResult blender::ed::file::indexer::read_index (const char *, FileIndexerEntries *, int *, void *)
 
static void blender::ed::file::indexer::update_index (const char *, FileIndexerEntries *, void *)
 
constexpr FileIndexerType blender::ed::file::indexer::default_indexer ()
 
static FileIndexerEntryblender::ed::file::indexer::file_indexer_entry_create_from_datablock_info (BLODataBlockInfo *datablock_info, const int idcode)
 
void ED_file_indexer_entries_extend_from_datablock_infos (FileIndexerEntries *indexer_entries, LinkNode *datablock_infos, const int idcode)
 
void ED_file_indexer_entries_clear (FileIndexerEntries *indexer_entries)
 

Variables

const FileIndexerType file_indexer_noop = blender::ed::file::indexer::default_indexer()
 

Detailed Description

This file implements the default file browser indexer and has some helper function to work with FileIndexerEntries.

Definition in file file_indexer.cc.

Function Documentation

◆ ED_file_indexer_entries_clear()

void ED_file_indexer_entries_clear ( FileIndexerEntries * indexer_entries)

Removes all entries inside the given indexer_entries.

Definition at line 71 of file file_indexer.cc.

References BLI_linklist_free(), and FileIndexerEntries::entries.

Referenced by filelist_readjob_list_lib().

◆ ED_file_indexer_entries_extend_from_datablock_infos()

void ED_file_indexer_entries_extend_from_datablock_infos ( FileIndexerEntries * indexer_entries,
LinkNode * datablock_infos,
int idcode )

Adds all entries from the given datablock_infos to the indexer_entries. The datablock_infos must only contain data for a single IDType. The specific IDType must be passed in the idcode parameter.

Note
This can "steal" data contained in datablock_infos, to avoid expensive copies, which is supported by the BLODataBlockInfo type.

Definition at line 57 of file file_indexer.cc.

References BLI_linklist_prepend(), FileIndexerEntries::entries, blender::ed::file::indexer::file_indexer_entry_create_from_datablock_info(), and LinkNode::next.

Referenced by filelist_readjob_list_lib().

Variable Documentation

◆ file_indexer_noop

Default indexer to use when listing files. The implementation is a no-operation indexing. When set it won't use indexing. It is added to increase the code clarity.

Definition at line 82 of file file_indexer.cc.

Referenced by file_refresh(), filelist_settype(), and blender::ed::asset::list::AssetList::setup().