Extracting a common base class for JsonArray and JsonObject...

This commit is contained in:
Benoit Blanchon
2014-11-05 11:38:36 +01:00
parent ebb591ef28
commit 7d73e63c78
6 changed files with 29 additions and 37 deletions

View File

@@ -16,6 +16,7 @@ namespace Internals {
template <typename T>
class List {
public:
typedef T value_type;
typedef Node<T> node_type;
typedef NodeIterator<T> iterator;
typedef NodeConstIterator<T> const_iterator;
@@ -23,6 +24,7 @@ class List {
List(JsonBuffer *buffer) : _buffer(buffer), _firstNode(NULL) {}
bool success() const { return _buffer != NULL; }
int size() const;
iterator begin() { return iterator(_firstNode); }
iterator end() { return iterator(NULL); }