| JsonCpp project page | JsonCpp home page |
#include <json/value.h>

Public Types | |
| enum | { itemsPerPage = 8 } |
| typedef Value::ArrayIndex | ArrayIndex |
| typedef unsigned int | PageIndex |
Public Member Functions | |
| ValueInternalArray () | |
| ValueInternalArray (const ValueInternalArray &other) | |
| ValueInternalArray & | operator= (const ValueInternalArray &other) |
| ~ValueInternalArray () | |
| void | swap (ValueInternalArray &other) |
| void | clear () |
| void | resize (ArrayIndex newSize) |
| Value & | resolveReference (ArrayIndex index) |
| Value * | find (ArrayIndex index) const |
| ArrayIndex | size () const |
| int | compare (const ValueInternalArray &other) const |
Friends | |
| class | Value |
| class | ValueIteratorBase |
For internal use only.
It is based on a list of fixed "page", each page contains a fixed number of items. Instead of using a linked-list, a array of pointer is used for fast item look-up. Look-up for an element is as follow:
Insertion is amortized constant time (only the array containing the index of pointers need to be reallocated when items are appended).
Definition at line 762 of file value.h.
| typedef unsigned int Json::ValueInternalArray::PageIndex |
| Json::ValueInternalArray::ValueInternalArray | ( | ) |
Definition at line 251 of file json_internalarray.inl.
| Json::ValueInternalArray::ValueInternalArray | ( | const ValueInternalArray & | other | ) |
Definition at line 259 of file json_internalarray.inl.
References Json::ValueArrayAllocator::allocateArrayPage(), Json::arrayAllocator(), itemsPerPage, JSON_ASSERT_MESSAGE, Json::ValueArrayAllocator::reallocateArrayPageIndex(), and Value.
| Json::ValueInternalArray::~ValueInternalArray | ( | ) |
Definition at line 293 of file json_internalarray.inl.
References Json::arrayAllocator(), itemsPerPage, Json::ValueArrayAllocator::releaseArrayPage(), Json::ValueArrayAllocator::releaseArrayPageIndex(), and Json::Value::~Value().
| void Json::ValueInternalArray::clear | ( | ) |
Definition at line 329 of file json_internalarray.inl.
References swap().
Referenced by resize().

| int Json::ValueInternalArray::compare | ( | const ValueInternalArray & | other | ) | const |
| Value * Json::ValueInternalArray::find | ( | ArrayIndex | index | ) | const |
Definition at line 408 of file json_internalarray.inl.
| ValueInternalArray & Json::ValueInternalArray::operator= | ( | const ValueInternalArray & | other | ) |
| void Json::ValueInternalArray::resize | ( | ArrayIndex | newSize | ) |
Definition at line 337 of file json_internalarray.inl.
References Json::arrayAllocator(), clear(), itemsPerPage, Json::ValueArrayAllocator::releaseArrayPage(), resolveReference(), and Json::Value::~Value().
| Value & Json::ValueInternalArray::resolveReference | ( | ArrayIndex | index | ) |
Definition at line 400 of file json_internalarray.inl.
Referenced by resize().

| ValueInternalArray::ArrayIndex Json::ValueInternalArray::size | ( | ) | const |
Definition at line 416 of file json_internalarray.inl.
| void Json::ValueInternalArray::swap | ( | ValueInternalArray & | other | ) |
Definition at line 315 of file json_internalarray.inl.
Referenced by clear(), and operator=().

friend class Value [friend] |
friend class ValueIteratorBase [friend] |
|
|
hosts this site. |
Send comments to: Json-cpp Developers |