444b6a377ecc50b2242a0b380e71d0f05a222e90
[tagua/yd.git] / src / variantfactory.cpp
blob444b6a377ecc50b2242a0b380e71d0f05a222e90
1 /*
2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
4 (c) 2008 Yann Dirson <ydirson@altern.org>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
12 #include "variantfactory.h"
13 #include <memory>
14 #include <KDebug>
15 #include "foreach.h"
16 #include "variant.h"
17 #include "variantfactories/kdepluginvariants.h"
19 void load_plugins();
21 VariantFactory::VariantFactory() { }
23 VariantFactory& VariantFactory::self() {
24 static VariantFactory inst;
25 return inst;
28 Variant* VariantFactory::create(const QString& name) {
29 Variant* v = KDEPluginVariants::self().create(name);
30 return v;
33 QStringList VariantFactory::all() const {
34 QStringList l = KDEPluginVariants::self().all();
35 return l;
38 Repository* VariantFactory::getRepository(const QString& variant) {
39 Repository* r = KDEPluginVariants::self().getRepository(variant);
40 return r;