10 # error This is a C++ header. The C interface is yet to be implemented/designed.
30 class AssetCatalogCollection;
31 class AssetCatalogDefinitionFile;
32 class AssetCatalogFilter;
33 class AssetCatalogTree;
172 std::unique_ptr<AssetCatalogTree>
catalog_tree_ = std::make_unique<AssetCatalogTree>();
260 std::unique_ptr<AssetCatalogCollection>
deep_copy()
const;
290 using ChildMap = std::map<std::string, AssetCatalogTreeItem>;
struct bUUID bUUID
Universally Unique Identifier according to RFC4122.
AssetCatalogCollection(const AssetCatalogCollection &other)=delete
static OwningAssetCatalogMap copy_catalog_map(const OwningAssetCatalogMap &orig)
AssetCatalogCollection(AssetCatalogCollection &&other) noexcept=default
AssetCatalogCollection()=default
bool has_unsaved_changes_
OwningAssetCatalogMap deleted_catalogs_
std::unique_ptr< AssetCatalogCollection > deep_copy() const
OwningAssetCatalogMap catalogs_
std::unique_ptr< AssetCatalogDefinitionFile > catalog_definition_file_
void parse_catalog_file(const CatalogFilePath &catalog_definition_file_path, AssetCatalogParsedFn callback)
AssetCatalogDefinitionFile()=default
static const std::string VERSION_MARKER
bool parse_version_line(StringRef line)
bool ensure_directory_exists(const CatalogFilePath directory_path) const
void forget(CatalogID catalog_id)
void add_new(AssetCatalog *catalog)
bool contains(CatalogID catalog_id) const
bool write_to_disk_unsafe(const CatalogFilePath &dest_file_path) const
static const std::string HEADER
Map< CatalogID, AssetCatalog * > catalogs_
void add_overwrite(AssetCatalog *catalog)
bool write_to_disk() const
std::unique_ptr< AssetCatalog > parse_catalog_line(StringRef line)
CatalogFilePath file_path
std::unique_ptr< AssetCatalogDefinitionFile > copy_and_remap(const OwningAssetCatalogMap &catalogs, const OwningAssetCatalogMap &deleted_catalogs) const
static const int SUPPORTED_VERSION
const Set< CatalogID > matching_catalog_ids
bool is_known(CatalogID asset_catalog_id) const
const Set< CatalogID > known_catalog_ids
bool contains(CatalogID asset_catalog_id) const
AssetCatalogFilter(Set< CatalogID > &&matching_catalog_ids, Set< CatalogID > &&known_catalog_ids)
friend AssetCatalogService
void create_missing_catalogs()
void delete_catalog_by_id_hard(CatalogID catalog_id)
bool has_unsaved_changes() const
std::unique_ptr< AssetCatalogDefinitionFile > parse_catalog_file(const CatalogFilePath &catalog_definition_file_path)
void load_directory_recursive(const CatalogFilePath &directory_path)
std::unique_ptr< AssetCatalogTree > catalog_tree_
AssetCatalog * create_catalog(const AssetCatalogPath &catalog_path)
void delete_catalog_by_id_soft(CatalogID catalog_id)
void untag_has_unsaved_changes()
bool write_to_disk(const CatalogFilePath &blend_file_path)
AssetCatalog * find_catalog_by_path(const AssetCatalogPath &path) const
void update_catalog_path(CatalogID catalog_id, const AssetCatalogPath &new_catalog_path)
void tag_has_unsaved_changes(AssetCatalog *edited_catalog)
AssetCatalogDefinitionFile * get_catalog_definition_file()
AssetCatalogFilter create_catalog_filter(CatalogID active_catalog_id) const
void tag_all_catalogs_as_unsaved_changes()
bool is_redo_possbile() const
std::unique_ptr< AssetCatalogDefinitionFile > construct_cdf_in_memory(const CatalogFilePath &file_path)
AssetCatalog * find_catalog(CatalogID catalog_id) const
static CatalogFilePath find_suitable_cdf_path_for_writing(const CatalogFilePath &blend_file_path)
std::unique_ptr< AssetCatalogTree > read_into_tree()
CatalogFilePath asset_library_root_
void prune_catalogs_by_id(CatalogID catalog_id)
Vector< std::unique_ptr< AssetCatalogCollection > > undo_snapshots_
void load_single_file(const CatalogFilePath &catalog_definition_file_path)
bool is_catalog_known_with_unsaved_changes(CatalogID catalog_id) const
bool is_undo_possbile() const
std::unique_ptr< AssetCatalogCollection > catalog_collection_
AssetCatalogTree * get_catalog_tree()
void prepare_to_merge_on_write()
void prune_catalogs_by_path(const AssetCatalogPath &path)
OwningAssetCatalogMap & get_deleted_catalogs()
void purge_catalogs_not_listed(const Set< CatalogID > &catalogs_to_keep)
static const CatalogFilePath DEFAULT_CATALOG_FILENAME
OwningAssetCatalogMap & get_catalogs()
Vector< std::unique_ptr< AssetCatalogCollection > > redo_snapshots_
bool is_catalog_known(CatalogID catalog_id) const
bool write_to_disk_ex(const CatalogFilePath &blend_file_path)
AssetCatalogTreeItem(StringRef name, CatalogID catalog_id, StringRef simple_name, const AssetCatalogTreeItem *parent=nullptr)
FunctionRef< void(AssetCatalogTreeItem &)> ItemIterFn
StringRefNull get_name() const
AssetCatalogPath catalog_path() const
std::map< std::string, AssetCatalogTreeItem > ChildMap
int count_parents() const
void foreach_child(const ItemIterFn callback)
bool has_unsaved_changes_
const AssetCatalogTreeItem * parent_
bool has_children() const
bool has_unsaved_changes() const
StringRefNull get_simple_name() const
CatalogID get_catalog_id() const
CatalogPathComponent name_
void insert_item(const AssetCatalog &catalog)
void foreach_item(const AssetCatalogTreeItem::ItemIterFn callback)
void foreach_root_item(const ItemIterFn callback)
struct blender::bke::AssetCatalog::Flags flags
static std::unique_ptr< AssetCatalog > from_path(const AssetCatalogPath &path)
void simple_name_refresh()
static std::string sensible_simple_name_for_path(const AssetCatalogPath &path)
DEGForeachIDComponentCallback callback
SyclQueue void void size_t num_bytes void
std::set< AssetCatalog *, AssetCatalogLessThan > MutableAssetCatalogOrderedSet
std::string CatalogFilePath
std::set< const AssetCatalog *, AssetCatalogLessThan > AssetCatalogOrderedSet
std::string CatalogPathComponent
Universally Unique Identifier according to RFC4122.
bool operator()(const AssetCatalog *lhs, const AssetCatalog *rhs) const