diff options
Diffstat (limited to 'src/Model/Cell.hpp')
| -rw-r--r-- | src/Model/Cell.hpp | 53 |
1 files changed, 39 insertions, 14 deletions
diff --git a/src/Model/Cell.hpp b/src/Model/Cell.hpp index badd070..7638c4e 100644 --- a/src/Model/Cell.hpp +++ b/src/Model/Cell.hpp @@ -8,24 +8,49 @@ * Date : 29/04/2015 */ #include <iostream> -#include <string> -class Cell + +template<class T> class Cell { private: - std::string m_value; - + T* m_Element; + public: - Cell(); - Cell(std::string value); - ~Cell(); - - bool isEmpty(); - bool equals(Cell * otherCell); - std::string getValue(); - - // Describes the cell in a terminal - std::string description(); + + //Constructor + Cell(std::string value) + { + m_Element=new T(); + m_Element->setValue(value); + } + + //Destructor + ~Cell() + { + delete m_Element; + } + + + bool isEmpty() + { + return true; + } + + std::string getElementValue() + { + return m_Element->getValue(); + } + + bool equals(Cell *otherCell) + { + return true; + } + + // Description + std::string description() + { + return m_Element->description(); + } }; |
