Blender  V3.3
Public Member Functions | Protected Attributes | List of all members
blender::bke::AssetCatalogTree Class Reference

#include <BKE_asset_catalog.hh>

Public Member Functions

void insert_item (const AssetCatalog &catalog)
 
void foreach_item (const AssetCatalogTreeItem::ItemIterFn callback)
 
void foreach_root_item (const ItemIterFn callback)
 

Protected Attributes

ChildMap root_items_
 

Detailed Description

A representation of the catalog paths as tree structure. Each component of the catalog tree is represented by an #AssetCatalogTreeItem. The last path component of an item is used as its name, which may also be shown to the user. An item can not have multiple children with the same name. That means the name uniquely identifies an item within its parent.

There is no single root tree element, the #AssetCatalogTree instance itself represents the root.

Definition at line 340 of file BKE_asset_catalog.hh.

Member Function Documentation

◆ foreach_item()

void blender::bke::AssetCatalogTree::foreach_item ( const AssetCatalogTreeItem::ItemIterFn  callback)

Definition at line 780 of file blenkernel/intern/asset_catalog.cc.

References callback, and root_items_.

◆ foreach_root_item()

void blender::bke::AssetCatalogTree::foreach_root_item ( const ItemIterFn  callback)

Iterate over root items calling callback for each of them, but do not recurse into their children.

Definition at line 785 of file blenkernel/intern/asset_catalog.cc.

References callback, and root_items_.

Referenced by blender::ed::asset_browser::AssetCatalogTreeView::build_tree().

◆ insert_item()

void blender::bke::AssetCatalogTree::insert_item ( const AssetCatalog catalog)

Member Data Documentation

◆ root_items_

ChildMap blender::bke::AssetCatalogTree::root_items_
protected

Child tree items, ordered by their names.

Definition at line 355 of file BKE_asset_catalog.hh.

Referenced by foreach_item(), foreach_root_item(), and insert_item().


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