From e0cae59ac28713729a3ac2302a26c38f26ed4b83 Mon Sep 17 00:00:00 2001
From: jpbl <jpbl>
Date: Mon, 19 Dec 2005 18:47:58 +0000
Subject: [PATCH] cleanup

---
 libs/taxidermy/WidgetBuilderCreator.inl     | 27 ++++++++++++++++++++
 libs/taxidermy/WidgetBuilderFactoryImpl.inl | 28 +++++++++++++++++++++
 2 files changed, 55 insertions(+)
 create mode 100644 libs/taxidermy/WidgetBuilderCreator.inl
 create mode 100644 libs/taxidermy/WidgetBuilderFactoryImpl.inl

diff --git a/libs/taxidermy/WidgetBuilderCreator.inl b/libs/taxidermy/WidgetBuilderCreator.inl
new file mode 100644
index 0000000000..a78c1cabb9
--- /dev/null
+++ b/libs/taxidermy/WidgetBuilderCreator.inl
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ * Author: Jean-Philippe Barrette-LaPierre
+ *            (jean-philippe.barrette-lapierre@savoirfairelinux.com)
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2,
+ * or (at your option) any later version.
+ *
+ * This is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with dpkg; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+template< typename T >
+taxidermy::WidgetBuilder *
+taxidermy::WidgetBuilderCreator< T >::create()
+{
+  return new T();
+}
+
diff --git a/libs/taxidermy/WidgetBuilderFactoryImpl.inl b/libs/taxidermy/WidgetBuilderFactoryImpl.inl
new file mode 100644
index 0000000000..9b15b9876c
--- /dev/null
+++ b/libs/taxidermy/WidgetBuilderFactoryImpl.inl
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ * Author: Jean-Philippe Barrette-LaPierre
+ *            (jean-philippe.barrette-lapierre@savoirfairelinux.com)
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2,
+ * or (at your option) any later version.
+ *
+ * This is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with dpkg; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+template< typename T >
+void
+taxidermy::WidgetBuilderFactoryImpl::add(const QString &objectType) 
+{
+  mBuilders.insert(objectType, new WidgetBuilderCreator<T>());
+}
+
+
-- 
GitLab