Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
GenericArray< Const, ValueT > Class Template Reference

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

#include <document.h>

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)
 
returnthis
 

Friends

template<typename , typename >
class GenericValue
 

Detailed Description

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

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 2514 of file document.h.

Member Typedef Documentation

◆ AllocatorType

template<bool Const, typename ValueT >
ValueType::AllocatorType GenericArray< Const, ValueT >::AllocatorType

Definition at line 2522 of file document.h.

◆ Array

template<bool Const, typename ValueT >
GenericArray<false, ValueT> GenericArray< Const, ValueT >::Array

Definition at line 2517 of file document.h.

◆ ConstArray

template<bool Const, typename ValueT >
GenericArray<true, ValueT> GenericArray< Const, ValueT >::ConstArray

Definition at line 2516 of file document.h.

◆ ConstValueIterator

template<bool Const, typename ValueT >
const ValueT* GenericArray< Const, ValueT >::ConstValueIterator

Definition at line 2521 of file document.h.

◆ PlainType

template<bool Const, typename ValueT >
ValueT GenericArray< Const, ValueT >::PlainType

Definition at line 2518 of file document.h.

◆ StringRefType

template<bool Const, typename ValueT >
ValueType::StringRefType GenericArray< Const, ValueT >::StringRefType

Definition at line 2523 of file document.h.

◆ ValueIterator

template<bool Const, typename ValueT >
ValueType* GenericArray< Const, ValueT >::ValueIterator

Definition at line 2520 of file document.h.

◆ ValueType

template<bool Const, typename ValueT >
internal::MaybeAddConst<Const,PlainType>::Type GenericArray< Const, ValueT >::ValueType

Definition at line 2519 of file document.h.

Constructor & Destructor Documentation

◆ GenericArray()

template<bool Const, typename ValueT >
GenericArray< Const, ValueT >::GenericArray ( const GenericArray< Const, ValueT > & rhs)
inline

Definition at line 2528 of file document.h.

2528: value_(rhs.value_) {}

◆ ~GenericArray()

template<bool Const, typename ValueT >
GenericArray< Const, ValueT >::~GenericArray ( )
inline

Definition at line 2530 of file document.h.

2530{}

Member Function Documentation

◆ Begin()

template<bool Const, typename ValueT >
ValueIterator GenericArray< Const, ValueT >::Begin ( ) const
inline

Definition at line 2537 of file document.h.

2537{ return value_.Begin(); }

◆ Capacity()

template<bool Const, typename ValueT >
SizeType GenericArray< Const, ValueT >::Capacity ( ) const
inline

Definition at line 2533 of file document.h.

2533{ return value_.Capacity(); }

◆ Clear()

template<bool Const, typename ValueT >
void GenericArray< Const, ValueT >::Clear ( ) const
inline

Definition at line 2535 of file document.h.

2535{ value_.Clear(); }

◆ Empty()

template<bool Const, typename ValueT >
bool GenericArray< Const, ValueT >::Empty ( ) const
inline

Definition at line 2534 of file document.h.

2534{ return value_.Empty(); }

◆ End()

template<bool Const, typename ValueT >
ValueIterator GenericArray< Const, ValueT >::End ( ) const
inline

Definition at line 2538 of file document.h.

2538{ return value_.End(); }

◆ Erase() [1/2]

template<bool Const, typename ValueT >
ValueIterator GenericArray< Const, ValueT >::Erase ( ConstValueIterator first,
ConstValueIterator last ) const
inline

Definition at line 2548 of file document.h.

2548{ return value_.Erase(first, last); }

◆ Erase() [2/2]

template<bool Const, typename ValueT >
ValueIterator GenericArray< Const, ValueT >::Erase ( ConstValueIterator pos) const
inline

Definition at line 2547 of file document.h.

2547{ return value_.Erase(pos); }

◆ operator=()

template<bool Const, typename ValueT >
GenericArray & GenericArray< Const, ValueT >::operator= ( const GenericArray< Const, ValueT > & rhs)
inline

Definition at line 2529 of file document.h.

2529{ value_ = rhs.value_; return *this; }

◆ operator[]()

template<bool Const, typename ValueT >
ValueType & GenericArray< Const, ValueT >::operator[] ( SizeType index) const
inline

Definition at line 2536 of file document.h.

2536{ return value_[index]; }

◆ PopBack()

template<bool Const, typename ValueT >
GenericArray GenericArray< Const, ValueT >::PopBack ( ) const
inline

Definition at line 2546 of file document.h.

2546{ value_.PopBack(); return *this; }

◆ PushBack() [1/2]

template<bool Const, typename ValueT >
GenericArray GenericArray< Const, ValueT >::PushBack ( StringRefType value,
AllocatorType & allocator ) const
inline

Definition at line 2544 of file document.h.

2544{ value_.PushBack(value, allocator); return *this; }
#define value
Definition pkcs11.h:157

◆ PushBack() [2/2]

template<bool Const, typename ValueT >
GenericArray GenericArray< Const, ValueT >::PushBack ( ValueType & value,
AllocatorType & allocator ) const
inline

Definition at line 2540 of file document.h.

2540{ value_.PushBack(value, allocator); return *this; }

◆ RAPIDJSON_DISABLEIF_RETURN()

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

◆ Reserve()

template<bool Const, typename ValueT >
GenericArray GenericArray< Const, ValueT >::Reserve ( SizeType newCapacity,
AllocatorType & allocator ) const
inline

Definition at line 2539 of file document.h.

2539{ value_.Reserve(newCapacity, allocator); return *this; }

◆ Size()

template<bool Const, typename ValueT >
SizeType GenericArray< Const, ValueT >::Size ( ) const
inline

Definition at line 2532 of file document.h.

2532{ return value_.Size(); }
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ GenericValue

template<bool Const, typename ValueT >
template<typename , typename >
friend class GenericValue
friend

Definition at line 2526 of file document.h.

Member Data Documentation

◆ const

template<bool Const, typename ValueT >
AllocatorType& allocator GenericArray< Const, ValueT >::const { value_.PushBack(value, allocator)

Definition at line 2545 of file document.h.

◆ this

template<bool Const, typename ValueT >
return* GenericArray< Const, ValueT >::this

Definition at line 2545 of file document.h.


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