--- queensgui/src/solution.h 2007/07/19 23:44:01 4 +++ queensgui/src/solution.h 2007/07/20 01:22:53 5 @@ -28,31 +28,26 @@ class Solution { public: + virtual ~Solution() {} - - // functions - Solution(int size=8); - Solution(const Solution &input); - ~Solution(); - - void set(bool input[MAX_SIZE][MAX_SIZE]); - void rotate90(); - void mirror(); + virtual void rotate90() = 0; + virtual void mirror() = 0; - Solution* copy(); - - bool operator==(const Solution& sol); - bool operator!=(const Solution& sol); - bool getMatrix(int x, int y); - void setMatrix(int x, int y, bool val); + virtual Solution* copy() = 0; + virtual bool operator==(const Solution& sol) = 0; + //virtual bool operator!=(const Solution& sol) = 0; + virtual bool getMatrix(int x, int y) = 0; + virtual void setMatrix(int x, int y, bool val) = 0; int size() {return m_size;}; void setSize(int size) {m_size = size;}; + void print(); + void print(bool debug, int row, int col); protected: - bool m_matrix[MAX_SIZE][MAX_SIZE]; int m_size; + Solution& operator=(Solution& s); }; #endif