Knight-Path 1.0.D018

/home/archives/knight-path/branch.1/branch.0/delta5682.018/knight-path/solver.h

Go to the documentation of this file.
00001 //
00002 // knight-path - shortest knight path between two squares
00003 // Copyright (C) 2011 Peter Miller
00004 //
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 3 of the License, or (at
00008 // your option) any later version.
00009 //
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License along
00016 // with this program. If not, see <http://www.gnu.org/licenses/>.
00017 //
00018 
00019 #ifndef KNIGHT_PATH_SOLVER_H
00020 #define KNIGHT_PATH_SOLVER_H
00021 
00022 #include <boost/shared_ptr.hpp>
00023 #include <list>
00024 
00025 #include <knight-path/position.h>
00026 
00031 class solver
00032 {
00033 public:
00034     typedef boost::shared_ptr<solver> pointer;
00035 
00036     typedef std::list<position> list_t;
00037 
00041     virtual ~solver();
00042 
00043 public:
00056     static pointer factory(const char *name);
00057 
00078     virtual list_t solve(const position &from, const position &to) = 0;
00079 
00085     static void list_algorithms(void);
00086 
00087 protected:
00092     solver();
00093 
00094 private:
00101     solver(const solver &rhs);
00102 
00109     solver &operator=(const solver &rhs);
00110 };
00111 
00112 #endif // KNIGHT_PATH_SOLVER_H