17 |
* Free Software Foundation, Inc., * |
* Free Software Foundation, Inc., * |
18 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
19 |
***************************************************************************/ |
***************************************************************************/ |
20 |
#ifndef SOLUTIONLIST_H |
#ifndef CONTAINERLIST_H |
21 |
#define SOLUTIONLIST_H |
#define CONTAINERLIST_H |
22 |
|
|
23 |
#include "solutioncontainer.h" |
#include "solutioncontainer.h" |
24 |
#include "solution.h" |
#include "solution.h" |
25 |
|
|
26 |
#include <list> |
#include <list> |
27 |
|
#include <boost/shared_ptr.hpp> |
28 |
|
|
29 |
|
|
30 |
/** |
/** |
31 |
@author Torben Nielsen |
@author Torben Nielsen |
32 |
*/ |
*/ |
33 |
class SolutionList : public SolutionContainer |
class ContainerList : public SolutionContainer |
34 |
{ |
{ |
35 |
public: |
public: |
36 |
SolutionList(GUIUpdate* update); |
ContainerList(GUIUpdate* update); |
37 |
|
|
38 |
~SolutionList(); |
~ContainerList(); |
39 |
void uniqueSolutions(); |
void uniqueSolutions(); |
40 |
int numSolutions(); |
int numSolutions(); |
41 |
int totalSolutions(); |
int totalSolutions(); |
43 |
Solution* solution(int index); |
Solution* solution(int index); |
44 |
void addSolution(Solution* sol); |
void addSolution(Solution* sol); |
45 |
private: |
private: |
46 |
typedef std::list<Solution*>::iterator ListIt; |
typedef std::list<boost::shared_ptr<Solution> >::iterator ListIt; |
47 |
typedef std::list<Solution*> SolList; |
typedef std::list<boost::shared_ptr<Solution> > SolList; |
48 |
SolList solutions; |
SolList solutions; |
49 |
|
|
50 |
void uniqueSolutionsWorker(int rot, bool mirror); |
void uniqueSolutionsWorker(int rot, bool mirror); |