]> ruin.nu Git - germs.git/blobdiff - src/models.cpp
started a refactoring with Model class to score different sort actions
[germs.git] / src / models.cpp
diff --git a/src/models.cpp b/src/models.cpp
new file mode 100644 (file)
index 0000000..cd89ef8
--- /dev/null
@@ -0,0 +1,66 @@
+/***************************************************************************
+ *   Copyright (C) 2006 by Michael Andreen                                 *
+ *   andreen@student.chalmers.se                                           *
+ *                                                                         *
+ *   This program 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 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program 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 this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA          *
+ ***************************************************************************/
+
+#include "models.h"
+
+using namespace std;
+
+namespace Models{
+
+ModelImpl::~ModelImpl(){}
+
+double ModelImpl::score(const SortAction& sa){
+       return 1;
+}
+string ModelImpl::name(){
+       return "Standard";
+}
+
+
+
+double X::score(const SortAction& sa){
+       return 1;
+}
+string X::name(){
+       return "X";
+}
+
+double Zipper::score(const SortAction& sa){
+       return 1;
+}
+string Zipper::name(){
+       return "Zipper";
+}
+
+double Cloud::score(const SortAction& sa){
+       return 1;
+}
+string Cloud::name(){
+       return "Cloud";
+}
+
+double FatX::score(const SortAction& sa){
+       return 1;
+}
+string FatX::name(){
+       return "FatX";
+}
+
+}