Added support of String class (issue #55, #56, #70, #77)

This commit is contained in:
Benoit Blanchon
2015-05-25 15:38:58 +02:00
parent 756c279cdc
commit 1b5be892b9
22 changed files with 351 additions and 119 deletions

View File

@@ -48,22 +48,7 @@ class List {
const_iterator end() const { return const_iterator(NULL); }
protected:
node_type *addNewNode() {
if (!_buffer) return NULL;
node_type *newNode = new (_buffer) node_type();
if (_firstNode) {
node_type *lastNode = _firstNode;
while (lastNode->next) lastNode = lastNode->next;
lastNode->next = newNode;
} else {
_firstNode = newNode;
}
return newNode;
}
node_type *addNewNode();
void removeNode(node_type *nodeToRemove);
JsonBuffer *_buffer;