diff --git a/src/app/Dictionary.h b/src/app/Dictionary.h index 5c7364e..d89f459 100644 --- a/src/app/Dictionary.h +++ b/src/app/Dictionary.h @@ -124,6 +124,34 @@ public: return false; } + boolean remove(int indice) + { + char indiceToStr[10]; + sprintf(indiceToStr,"%d", indice); + return remove(indiceToStr); + } + + boolean removeAt(int index) + { + unsigned int position(0); + if(_head->_next == NULL) return false; + + Dictionary *cursor = _head, *toDelete(NULL); + + while(!isListEmpty(cursor->_next)) + { + if(position++ == index) + { + toDelete = cursor->_next; + cursor->_next = cursor->_next->_next; + delete toDelete; + return true; + } + cursor = cursor->_next; + } + return false; + } + T* get(const char *parameter) { if(parameter == NULL) return NULL;