diff --git a/src/app/Dictionary.h b/src/app/Dictionary.h index d75b696..d49e3b8 100644 --- a/src/app/Dictionary.h +++ b/src/app/Dictionary.h @@ -11,6 +11,7 @@ template class Dictionary { public: + Dictionary() :_parameter(NULL), _value(NULL), _next(NULL), _head(this){} ~Dictionary() { if(_head == this) @@ -21,17 +22,17 @@ public: //_value = NULL; //Useless, just my c habits } - boolean addParameter(const char *parameter, T *value) + boolean add(const char *parameter, T *value) { Dictionary *dictionaryNode = new Dictionary(parameter, value); return addNewNodeAtTheEnd(dictionaryNode); } - boolean addParameter(const char *parameter, T value) + boolean add(const char *parameter, T value) { Dictionary *dictionaryNode = new Dictionary(parameter, new T(value)); return addNewNodeAtTheEnd(dictionaryNode); } - boolean deleteParameter(const char *parameter) + boolean remove(const char *parameter) { if(_head->_next == NULL) return false; @@ -124,7 +125,6 @@ public: T* getValueRef(){return _value;} const char *getParameter() const{return _parameter == NULL ? "" : _parameter;} protected: - Dictionary() :_parameter(NULL), _value(NULL), _next(NULL), _head(this){} Dictionary(const char *parameter, T *value) : Dictionary() { //We copy the parameter and the value