17 : name_(name), catalog_id_(catalog_id), simple_name_(simple_name), parent_(parent)
37 return has_unsaved_changes_;
60 return !children_.empty();
66 for (
auto &[key, item] : children) {
68 foreach_item_recursive(item.children_,
callback);
74 for (
auto &[key, item] : children_) {
89 "Malformed catalog path; should not start with a separator");
95 auto [key_and_item, was_inserted] = current_item_children->emplace(
98 is_last_component ? catalog.
catalog_id : nil_id,
105 if (is_last_component) {
114 current_item_children = &item.children_;
120 AssetCatalogTreeItem::foreach_item_recursive(root_items_,
callback);
125 for (
auto &[key, item] : root_items_) {
132 return root_items_.empty();
#define BLI_assert_msg(a, msg)
bool BLI_uuid_is_nil(bUUID uuid)
const std::string & str() const
void iterate_components(ComponentIteratorFn callback) const
void foreach_child(ItemIterFn callback) const
AssetCatalogTreeItem(StringRef name, CatalogID catalog_id, StringRef simple_name, const AssetCatalogTreeItem *parent=nullptr)
int count_parents() const
AssetCatalogPath catalog_path() const
CatalogID get_catalog_id() const
StringRefNull get_simple_name() const
std::map< std::string, AssetCatalogTreeItem > ChildMap
StringRefNull get_name() const
bool has_unsaved_changes() const
bool has_children() const
void foreach_root_item(ItemIterFn callback) const
const AssetCatalogTreeItem * find_item(const AssetCatalogPath &path) const
void foreach_item(ItemIterFn callback) const
void insert_item(const AssetCatalog &catalog)
const AssetCatalogTreeItem * find_root_item(const AssetCatalogPath &path) const
const CatalogID catalog_id
struct blender::asset_system::AssetCatalog::Flags flags
DEGForeachIDComponentCallback callback
Universally Unique Identifier according to RFC4122.