File indexing completed on 2024-05-12 15:59:35

0001 /*
0002  *  SPDX-FileCopyrightText: 2007 Cyrille Berger <cberger@cberger.net>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-or-later
0005 */
0006 
0007 #ifndef KOCOLORTRANSFORMATIONFACTORYREGISTRY_H
0008 #define KOCOLORTRANSFORMATIONFACTORYREGISTRY_H
0009 
0010 #include <KoGenericRegistry.h>
0011 
0012 #include "kritapigment_export.h"
0013 
0014 class KoColorSpace;
0015 class KoColorTransformationFactory;
0016 
0017 /**
0018  * This class list the available transformation. The only reason to use directly
0019  * that class is for adding new factory use the static method
0020  * KoColorTransformationFactoryRegistry::add.
0021  */
0022 class KRITAPIGMENT_EXPORT KoColorTransformationFactoryRegistry : private KoGenericRegistry<KoColorTransformationFactory*>
0023 {
0024     friend class KoColorSpace;
0025 public:
0026     ~KoColorTransformationFactoryRegistry() override;
0027     /**
0028      * Add a KoColorTransformationFactory to the registry.
0029      */
0030     static void addColorTransformationFactory(KoColorTransformationFactory* factory);
0031     static void removeColorTransformationFactory(KoColorTransformationFactory* factory);
0032 private:
0033     static KoColorTransformationFactoryRegistry* instance();
0034 private:
0035     KoColorTransformationFactoryRegistry();
0036 private:
0037     struct Private;
0038     Private* const d;
0039 };
0040 
0041 #endif