JsonCpp project page JsonCpp home page

Public Types | Public Member Functions | Friends | List of all members
Json::ValueInternalArray Class Reference

A simplified deque implementation used internally by Value. More...

#include </home/iurt/rpmbuild/BUILD/jsoncpp-src-0.5.0/include/json/value.h>

+ Collaboration diagram for Json::ValueInternalArray:

Public Types

enum  { itemsPerPage = 8 }
 
typedef Value::ArrayIndex ArrayIndex
 
typedef unsigned int PageIndex
 

Public Member Functions

 ValueInternalArray ()
 
 ValueInternalArray (const ValueInternalArray &other)
 
ValueInternalArrayoperator= (const ValueInternalArray &other)
 
 ~ValueInternalArray ()
 
void swap (ValueInternalArray &other)
 
void clear ()
 
void resize (ArrayIndex newSize)
 
ValueresolveReference (ArrayIndex index)
 
Valuefind (ArrayIndex index) const
 
ArrayIndex size () const
 
int compare (const ValueInternalArray &other) const
 

Friends

class Value
 
class ValueIteratorBase
 

Detailed Description

A simplified deque implementation used internally by Value.

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 728 of file value.h.

Member Typedef Documentation

Definition at line 734 of file value.h.

Definition at line 735 of file value.h.

Member Enumeration Documentation

anonymous enum
Enumerator
itemsPerPage 

Definition at line 733 of file value.h.

Constructor & Destructor Documentation

Json::ValueInternalArray::ValueInternalArray ( )

Definition at line 245 of file json_internalarray.inl.

Json::ValueInternalArray::ValueInternalArray ( const ValueInternalArray other)
Json::ValueInternalArray::~ValueInternalArray ( )

Member Function Documentation

void Json::ValueInternalArray::clear ( )

Definition at line 323 of file json_internalarray.inl.

References swap().

Referenced by resize().

+ Here is the caller graph for this function:

int Json::ValueInternalArray::compare ( const ValueInternalArray other) const

Definition at line 434 of file json_internalarray.inl.

References Json::Value::compare(), and itemsPerPage.

Value * Json::ValueInternalArray::find ( ArrayIndex  index) const

Definition at line 402 of file json_internalarray.inl.

References itemsPerPage.

ValueInternalArray & Json::ValueInternalArray::operator= ( const ValueInternalArray other)

Definition at line 279 of file json_internalarray.inl.

References swap().

void Json::ValueInternalArray::resize ( ArrayIndex  newSize)
Value & Json::ValueInternalArray::resolveReference ( ArrayIndex  index)

Definition at line 394 of file json_internalarray.inl.

References itemsPerPage.

Referenced by resize().

+ Here is the caller graph for this function:

ValueInternalArray::ArrayIndex Json::ValueInternalArray::size ( ) const

Definition at line 410 of file json_internalarray.inl.

void Json::ValueInternalArray::swap ( ValueInternalArray other)

Definition at line 309 of file json_internalarray.inl.

Referenced by clear(), and operator=().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class Value
friend

Definition at line 730 of file value.h.

Referenced by ValueInternalArray().

friend class ValueIteratorBase
friend

Definition at line 731 of file value.h.


The documentation for this class was generated from the following files:

SourceForge Logo hosts this site. Send comments to:
Json-cpp Developers