File indexing completed on 2024-05-19 05:38:24

0001 /*
0002     SPDX-FileCopyrightText: 2014 John Layt <john@layt.net>
0003     SPDX-FileCopyrightText: 2018 Eike Hein <hein@kde.org>
0004     SPDX-FileCopyrightText: 2019 Kevin Ottens <kevin.ottens@enioka.com>
0005     SPDX-FileCopyrightText: 2021 Han Young <hanyoung@protonmail.com>
0006     SPDX-License-Identifier: LGPL-2.0-or-later
0007 */
0008 #include "config-workspace.h"
0009 
0010 #include "localegenerator.h"
0011 
0012 #include "localegeneratorbase.h"
0013 
0014 #include "localegeneratorgeneratedglibc.h"
0015 
0016 #if UBUNTU_LOCALE
0017 #include "localegeneratorubuntu.h"
0018 #elif GLIBC_LOCALE_AUTO
0019 #include "localegeneratorglibc.h"
0020 #endif
0021 
0022 LocaleGeneratorBase *LocaleGenerator::getGenerator()
0023 {
0024 #if UBUNTU_LOCALE
0025     static LocaleGeneratorUbuntu singleton;
0026 #elif GLIBC_LOCALE_AUTO
0027     static LocaleGeneratorGlibc singleton;
0028 #elif GLIBC_LOCALE_GENERATED
0029     static LocaleGeneratorGeneratedGlibc singleton;
0030 #else
0031     static LocaleGeneratorBase singleton;
0032 #endif
0033     return &singleton;
0034 }