File indexing completed on 2025-02-02 04:11:03

0001 /*
0002  * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best>
0003  *
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  */
0006 
0007 #pragma once
0008 
0009 #include <unordered_set>
0010 
0011 #include "utils/pseudo_mutex.hpp"
0012 
0013 namespace glaxnimate::model {
0014 
0015 class ReferencePropertyBase;
0016 class DocumentNode;
0017 
0018 class AssetBase
0019 {
0020 public:
0021     using User = ReferencePropertyBase;
0022 
0023     virtual ~AssetBase() {}
0024 
0025     /**
0026      * \brief Removes the asset if it isn't needed
0027      * \param clean_lists when \b true, remove even if the asset is in a useful list
0028      * \return Whether it has been removed
0029      */
0030     virtual bool remove_if_unused(bool clean_lists) = 0;
0031 };
0032 
0033 
0034 
0035 } // namespace glaxnimate::model
0036