File indexing completed on 2024-04-21 14:45:57
0001 /* 0002 SPDX-FileCopyrightText: 2015-2017 Pavel Mraz 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "hips.h" 0010 0011 #include <QCache> 0012 0013 class PixCache 0014 { 0015 public: 0016 PixCache() = default; 0017 0018 void add(pixCacheKey_t &key, pixCacheItem_t *item, int cost); 0019 pixCacheItem_t *get(pixCacheKey_t &key); 0020 void setMaxCost(int maxCost); 0021 void printCache(); 0022 int used(); 0023 0024 private: 0025 QCache <pixCacheKey_t, pixCacheItem_t> m_cache; 0026 }; 0027