IN2OSM  1.0.1
GenericArray< Const, ValueT >

Helper class for accessing Value of array type. More...

#include <document.h>

Collaboration diagram for GenericArray< Const, ValueT >:
Collaboration graph

Public Types

typedef GenericArray< true, ValueT > ConstArray
 
typedef GenericArray< false, ValueT > Array
 
typedef ValueT PlainType
 
typedef internal::MaybeAddConst< Const, PlainType >::Type ValueType
 
typedef ValueTypeValueIterator
 
typedef const ValueT * ConstValueIterator
 
typedef ValueType::AllocatorType AllocatorType
 
typedef ValueType::StringRefType StringRefType
 

Public Member Functions

 GenericArray (const GenericArray &rhs)
 
GenericArrayoperator= (const GenericArray &rhs)
 
 ~GenericArray ()
 
SizeType Size () const
 
SizeType Capacity () const
 
bool Empty () const
 
void Clear () const
 
ValueTypeoperator[] (SizeType index) const
 
ValueIterator Begin () const
 
ValueIterator End () const
 
GenericArray Reserve (SizeType newCapacity, AllocatorType &allocator) const
 
GenericArray PushBack (ValueType &value, AllocatorType &allocator) const
 
GenericArray PushBack (StringRefType value, AllocatorType &allocator) const
 
template<typename T >
 RAPIDJSON_DISABLEIF_RETURN ((internal::OrExpr< internal::IsPointer< T >, internal::IsGenericValue< T > >),(const GenericArray &)) PushBack(T value
 
GenericArray PopBack () const
 
ValueIterator Erase (ConstValueIterator pos) const
 
ValueIterator Erase (ConstValueIterator first, ConstValueIterator last) const
 

Public Attributes

AllocatorType &allocator const { value_.PushBack(value, allocator)
 
return * this
 

Private Member Functions

 GenericArray ()
 
 GenericArray (ValueType &value)
 

Private Attributes

ValueTypevalue_
 

Friends

template<typename , typename >
class GenericValue
 

Detailed Description

template<bool Const, typename ValueT>
class GenericArray< Const, ValueT >

Helper class for accessing Value of array type.

Instance of this helper class is obtained by GenericValue::GetArray(). In addition to all APIs for array type, it provides range-based for loop if RAPIDJSON_HAS_CXX11_RANGE_FOR=1.

Definition at line 561 of file document.h.

Member Typedef Documentation

◆ AllocatorType

typedef ValueType::AllocatorType AllocatorType

Definition at line 2522 of file document.h.

◆ Array

typedef GenericArray<false, ValueT> Array

Definition at line 2517 of file document.h.

◆ ConstArray

typedef GenericArray<true, ValueT> ConstArray

Definition at line 2516 of file document.h.

◆ ConstValueIterator

typedef const ValueT* ConstValueIterator

Definition at line 2521 of file document.h.

◆ PlainType

typedef ValueT PlainType

Definition at line 2518 of file document.h.

◆ StringRefType

typedef ValueType::StringRefType StringRefType

Definition at line 2523 of file document.h.

◆ ValueIterator

Definition at line 2520 of file document.h.

◆ ValueType

typedef internal::MaybeAddConst<Const,PlainType>::Type ValueType

Definition at line 2519 of file document.h.

Constructor & Destructor Documentation

◆ GenericArray() [1/3]

GenericArray ( const GenericArray< Const, ValueT > &  rhs)
inline

Definition at line 2528 of file document.h.

2528 : value_(rhs.value_) {}
ValueType & value_
Definition: document.h:2558

◆ ~GenericArray()

~GenericArray ( )
inline

Definition at line 2530 of file document.h.

2530 {}

◆ GenericArray() [2/3]

GenericArray ( )
private

◆ GenericArray() [3/3]

GenericArray ( ValueType value)
inlineprivate

Definition at line 2557 of file document.h.

2557 : value_(value) {}
ValueType & value_
Definition: document.h:2558
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1282

Member Function Documentation

◆ Begin()

ValueIterator Begin ( ) const
inline

Definition at line 2537 of file document.h.

2537 { return value_.Begin(); }
ValueType & value_
Definition: document.h:2558

◆ Capacity()

SizeType Capacity ( ) const
inline

Definition at line 2533 of file document.h.

2533 { return value_.Capacity(); }
ValueType & value_
Definition: document.h:2558

◆ Clear()

void Clear ( ) const
inline

Definition at line 2535 of file document.h.

2535 { value_.Clear(); }
ValueType & value_
Definition: document.h:2558

◆ Empty()

bool Empty ( ) const
inline

Definition at line 2534 of file document.h.

2534 { return value_.Empty(); }
ValueType & value_
Definition: document.h:2558

◆ End()

ValueIterator End ( ) const
inline

Definition at line 2538 of file document.h.

2538 { return value_.End(); }
ValueType & value_
Definition: document.h:2558

◆ Erase() [1/2]

ValueIterator Erase ( ConstValueIterator  pos) const
inline

Definition at line 2547 of file document.h.

2547 { return value_.Erase(pos); }
ValueType & value_
Definition: document.h:2558

◆ Erase() [2/2]

ValueIterator Erase ( ConstValueIterator  first,
ConstValueIterator  last 
) const
inline

Definition at line 2548 of file document.h.

2548 { return value_.Erase(first, last); }
ValueType & value_
Definition: document.h:2558

◆ operator=()

GenericArray& operator= ( const GenericArray< Const, ValueT > &  rhs)
inline

Definition at line 2529 of file document.h.

2529 { value_ = rhs.value_; return *this; }
ValueType & value_
Definition: document.h:2558

◆ operator[]()

ValueType& operator[] ( SizeType  index) const
inline

Definition at line 2536 of file document.h.

2536 { return value_[index]; }
ValueType & value_
Definition: document.h:2558

◆ PopBack()

GenericArray PopBack ( ) const
inline

Definition at line 2546 of file document.h.

2546 { value_.PopBack(); return *this; }
ValueType & value_
Definition: document.h:2558
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PushBack() [1/2]

GenericArray PushBack ( ValueType value,
AllocatorType allocator 
) const
inline

Definition at line 2540 of file document.h.

2540 { value_.PushBack(value, allocator); return *this; }
ValueType & value_
Definition: document.h:2558
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1282
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PushBack() [2/2]

GenericArray PushBack ( StringRefType  value,
AllocatorType allocator 
) const
inline

Definition at line 2544 of file document.h.

2544 { value_.PushBack(value, allocator); return *this; }
ValueType & value_
Definition: document.h:2558
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1282
Here is the call graph for this function:

◆ RAPIDJSON_DISABLEIF_RETURN()

RAPIDJSON_DISABLEIF_RETURN ( (internal::OrExpr< internal::IsPointer< T >, internal::IsGenericValue< T > >)  ,
(const GenericArray< Const, ValueT > &)   
)

◆ Reserve()

GenericArray Reserve ( SizeType  newCapacity,
AllocatorType allocator 
) const
inline

Definition at line 2539 of file document.h.

2539 { value_.Reserve(newCapacity, allocator); return *this; }
ValueType & value_
Definition: document.h:2558
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Size()

SizeType Size ( ) const
inline

Definition at line 2532 of file document.h.

2532 { return value_.Size(); }
ValueType & value_
Definition: document.h:2558

Friends And Related Function Documentation

◆ GenericValue

friend class GenericValue
friend

Definition at line 2526 of file document.h.

Member Data Documentation

◆ const

AllocatorType& allocator const { value_.PushBack(value, allocator)

Definition at line 2545 of file document.h.

◆ this

return* this

Definition at line 2545 of file document.h.

◆ value_

ValueType& value_
private

Definition at line 2558 of file document.h.


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