Blender V5.0
asset_catalog_collection.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "AS_asset_catalog.hh"
12
13namespace blender::asset_system {
14
16
23 protected:
26
31
32 /* For now only a single catalog definition file is supported.
33 * The aim is to support an arbitrary number of such files per asset library in the future. */
34 std::unique_ptr<AssetCatalogDefinitionFile> catalog_definition_file_;
35
38
41
42 public:
46
49 bool is_empty() const;
50
51 std::unique_ptr<AssetCatalogCollection> deep_copy() const;
53 FunctionRef<void(const AssetCatalog &existing, const AssetCatalog &to_be_ignored)>;
62 OnDuplicateCatalogIdFn on_duplicate_items);
63
64 protected:
66};
67
68} // namespace blender::asset_system
void add_catalogs_from_existing(const AssetCatalogCollection &other, OnDuplicateCatalogIdFn on_duplicate_items)
AssetCatalogCollection(const AssetCatalogCollection &other)=delete
FunctionRef< void(const AssetCatalog &existing, const AssetCatalog &to_be_ignored)> OnDuplicateCatalogIdFn
AssetCatalogCollection(AssetCatalogCollection &&other) noexcept=default
std::unique_ptr< AssetCatalogDefinitionFile > catalog_definition_file_
std::unique_ptr< AssetCatalogCollection > deep_copy() const
static OwningAssetCatalogMap copy_catalog_map(const OwningAssetCatalogMap &orig)
Map< CatalogID, std::unique_ptr< AssetCatalog > > OwningAssetCatalogMap