IN2OSM  1.0.1
GenericObject< Const, ValueT >

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

#include <document.h>

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

Public Types

typedef GenericObject< true, ValueT > ConstObject
 
typedef GenericObject< false, ValueT > Object
 
typedef ValueT PlainType
 
typedef internal::MaybeAddConst< Const, PlainType >::Type ValueType
 
typedef GenericMemberIterator< Const, typename ValueT::EncodingType, typename ValueT::AllocatorType > MemberIterator
 
typedef GenericMemberIterator< true, typename ValueT::EncodingType, typename ValueT::AllocatorType > ConstMemberIterator
 
typedef ValueType::AllocatorType AllocatorType
 
typedef ValueType::StringRefType StringRefType
 
typedef ValueType::EncodingType EncodingType
 
typedef ValueType::Ch Ch
 

Public Member Functions

 GenericObject (const GenericObject &rhs)
 
GenericObjectoperator= (const GenericObject &rhs)
 
 ~GenericObject ()
 
SizeType MemberCount () const
 
SizeType MemberCapacity () const
 
bool ObjectEmpty () const
 
template<typename T >
ValueTypeoperator[] (T *name) const
 
template<typename SourceAllocator >
ValueTypeoperator[] (const GenericValue< EncodingType, SourceAllocator > &name) const
 
MemberIterator MemberBegin () const
 
MemberIterator MemberEnd () const
 
GenericObject MemberReserve (SizeType newCapacity, AllocatorType &allocator) const
 
bool HasMember (const Ch *name) const
 
template<typename SourceAllocator >
bool HasMember (const GenericValue< EncodingType, SourceAllocator > &name) const
 
MemberIterator FindMember (const Ch *name) const
 
template<typename SourceAllocator >
MemberIterator FindMember (const GenericValue< EncodingType, SourceAllocator > &name) const
 
GenericObject AddMember (ValueType &name, ValueType &value, AllocatorType &allocator) const
 
GenericObject AddMember (ValueType &name, StringRefType value, AllocatorType &allocator) const
 
template<typename T >
 RAPIDJSON_DISABLEIF_RETURN ((internal::OrExpr< internal::IsPointer< T >, internal::IsGenericValue< T > >),(ValueType &)) AddMember(ValueType &name
 
GenericObject AddMember (StringRefType name, ValueType &value, AllocatorType &allocator) const
 
GenericObject AddMember (StringRefType name, StringRefType value, AllocatorType &allocator) const
 
template<typename T >
 RAPIDJSON_DISABLEIF_RETURN ((internal::OrExpr< internal::IsPointer< T >, internal::IsGenericValue< T > >),(GenericObject)) AddMember(StringRefType name
 
void RemoveAllMembers ()
 
bool RemoveMember (const Ch *name) const
 
template<typename SourceAllocator >
bool RemoveMember (const GenericValue< EncodingType, SourceAllocator > &name) const
 
MemberIterator RemoveMember (MemberIterator m) const
 
MemberIterator EraseMember (ConstMemberIterator pos) const
 
MemberIterator EraseMember (ConstMemberIterator first, ConstMemberIterator last) const
 
bool EraseMember (const Ch *name) const
 
template<typename SourceAllocator >
bool EraseMember (const GenericValue< EncodingType, SourceAllocator > &name) const
 

Public Attributes

value
 
T AllocatorType &allocator const { value_.AddMember(name, value, allocator)
 
return * this
 

Private Member Functions

 GenericObject ()
 
 GenericObject (ValueType &value)
 

Private Attributes

ValueTypevalue_
 

Friends

template<typename , typename >
class GenericValue
 

Detailed Description

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

Helper class for accessing Value of object type.

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

Definition at line 562 of file document.h.

Member Typedef Documentation

◆ AllocatorType

typedef ValueType::AllocatorType AllocatorType

Definition at line 2575 of file document.h.

◆ Ch

typedef ValueType::Ch Ch

Definition at line 2578 of file document.h.

◆ ConstMemberIterator

typedef GenericMemberIterator<true, typename ValueT::EncodingType, typename ValueT::AllocatorType> ConstMemberIterator

Definition at line 2574 of file document.h.

◆ ConstObject

typedef GenericObject<true, ValueT> ConstObject

Definition at line 2569 of file document.h.

◆ EncodingType

typedef ValueType::EncodingType EncodingType

Definition at line 2577 of file document.h.

◆ MemberIterator

typedef GenericMemberIterator<Const, typename ValueT::EncodingType, typename ValueT::AllocatorType> MemberIterator

Definition at line 2573 of file document.h.

◆ Object

typedef GenericObject<false, ValueT> Object

Definition at line 2570 of file document.h.

◆ PlainType

typedef ValueT PlainType

Definition at line 2571 of file document.h.

◆ StringRefType

typedef ValueType::StringRefType StringRefType

Definition at line 2576 of file document.h.

◆ ValueType

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

Definition at line 2572 of file document.h.

Constructor & Destructor Documentation

◆ GenericObject() [1/3]

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

Definition at line 2583 of file document.h.

2583 : value_(rhs.value_) {}
ValueType & value_
Definition: document.h:2646

◆ ~GenericObject()

~GenericObject ( )
inline

Definition at line 2585 of file document.h.

2585 {}

◆ GenericObject() [2/3]

GenericObject ( )
private

◆ GenericObject() [3/3]

GenericObject ( ValueType value)
inlineprivate

Definition at line 2645 of file document.h.

2645 : value_(value) {}
ValueType & value_
Definition: document.h:2646

Member Function Documentation

◆ AddMember() [1/4]

GenericObject AddMember ( ValueType name,
ValueType value,
AllocatorType allocator 
) const
inline

Definition at line 2608 of file document.h.

2608 { value_.AddMember(name, value, allocator); return *this; }
ValueType & value_
Definition: document.h:2646
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddMember() [2/4]

GenericObject AddMember ( ValueType name,
StringRefType  value,
AllocatorType allocator 
) const
inline

Definition at line 2609 of file document.h.

2609 { value_.AddMember(name, value, allocator); return *this; }
ValueType & value_
Definition: document.h:2646
Here is the call graph for this function:

◆ AddMember() [3/4]

GenericObject AddMember ( StringRefType  name,
ValueType value,
AllocatorType allocator 
) const
inline

Definition at line 2620 of file document.h.

2620 { value_.AddMember(name, value, allocator); return *this; }
ValueType & value_
Definition: document.h:2646
Here is the call graph for this function:

◆ AddMember() [4/4]

GenericObject AddMember ( StringRefType  name,
StringRefType  value,
AllocatorType allocator 
) const
inline

Definition at line 2621 of file document.h.

2621 { value_.AddMember(name, value, allocator); return *this; }
ValueType & value_
Definition: document.h:2646
Here is the call graph for this function:

◆ EraseMember() [1/4]

MemberIterator EraseMember ( ConstMemberIterator  pos) const
inline

Definition at line 2630 of file document.h.

2630 { return value_.EraseMember(pos); }
ValueType & value_
Definition: document.h:2646

◆ EraseMember() [2/4]

MemberIterator EraseMember ( ConstMemberIterator  first,
ConstMemberIterator  last 
) const
inline

Definition at line 2631 of file document.h.

2631 { return value_.EraseMember(first, last); }
ValueType & value_
Definition: document.h:2646

◆ EraseMember() [3/4]

bool EraseMember ( const Ch name) const
inline

Definition at line 2632 of file document.h.

2632 { return value_.EraseMember(name); }
ValueType & value_
Definition: document.h:2646
Here is the call graph for this function:

◆ EraseMember() [4/4]

bool EraseMember ( const GenericValue< EncodingType, SourceAllocator > &  name) const
inline

Definition at line 2636 of file document.h.

2636 { return value_.EraseMember(name); }
ValueType & value_
Definition: document.h:2646

◆ FindMember() [1/2]

MemberIterator FindMember ( const Ch name) const
inline

Definition at line 2603 of file document.h.

2603 { return value_.FindMember(name); }
ValueType & value_
Definition: document.h:2646

◆ FindMember() [2/2]

MemberIterator FindMember ( const GenericValue< EncodingType, SourceAllocator > &  name) const
inline

Definition at line 2604 of file document.h.

2604 { return value_.FindMember(name); }
ValueType & value_
Definition: document.h:2646

◆ HasMember() [1/2]

bool HasMember ( const Ch name) const
inline

Definition at line 2598 of file document.h.

2598 { return value_.HasMember(name); }
ValueType & value_
Definition: document.h:2646

◆ HasMember() [2/2]

bool HasMember ( const GenericValue< EncodingType, SourceAllocator > &  name) const
inline

Definition at line 2602 of file document.h.

2602 { return value_.HasMember(name); }
ValueType & value_
Definition: document.h:2646

◆ MemberBegin()

MemberIterator MemberBegin ( ) const
inline

Definition at line 2595 of file document.h.

2595 { return value_.MemberBegin(); }
ValueType & value_
Definition: document.h:2646

◆ MemberCapacity()

SizeType MemberCapacity ( ) const
inline

Definition at line 2588 of file document.h.

2588 { return value_.MemberCapacity(); }
ValueType & value_
Definition: document.h:2646

◆ MemberCount()

SizeType MemberCount ( ) const
inline

Definition at line 2587 of file document.h.

2587 { return value_.MemberCount(); }
ValueType & value_
Definition: document.h:2646

◆ MemberEnd()

MemberIterator MemberEnd ( ) const
inline

Definition at line 2596 of file document.h.

2596 { return value_.MemberEnd(); }
ValueType & value_
Definition: document.h:2646

◆ MemberReserve()

GenericObject MemberReserve ( SizeType  newCapacity,
AllocatorType allocator 
) const
inline

Definition at line 2597 of file document.h.

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

◆ ObjectEmpty()

bool ObjectEmpty ( ) const
inline

Definition at line 2589 of file document.h.

2589 { return value_.ObjectEmpty(); }
ValueType & value_
Definition: document.h:2646

◆ operator=()

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

Definition at line 2584 of file document.h.

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

◆ operator[]() [1/2]

ValueType& operator[] ( T *  name) const
inline

Definition at line 2590 of file document.h.

2590 { return value_[name]; }
ValueType & value_
Definition: document.h:2646

◆ operator[]() [2/2]

ValueType& operator[] ( const GenericValue< EncodingType, SourceAllocator > &  name) const
inline

Definition at line 2591 of file document.h.

2591 { return value_[name]; }
ValueType & value_
Definition: document.h:2646

◆ RAPIDJSON_DISABLEIF_RETURN() [1/2]

RAPIDJSON_DISABLEIF_RETURN ( (internal::OrExpr< internal::IsPointer< T >, internal::IsGenericValue< T > >)  ,
(ValueType &)   
) &

◆ RAPIDJSON_DISABLEIF_RETURN() [2/2]

RAPIDJSON_DISABLEIF_RETURN ( (internal::OrExpr< internal::IsPointer< T >, internal::IsGenericValue< T > >)  ,
(GenericObject< Const, ValueT >)   
)

◆ RemoveAllMembers()

void RemoveAllMembers ( )
inline

Definition at line 2623 of file document.h.

2623 { value_.RemoveAllMembers(); }
ValueType & value_
Definition: document.h:2646

◆ RemoveMember() [1/3]

bool RemoveMember ( const Ch name) const
inline

Definition at line 2624 of file document.h.

2624 { return value_.RemoveMember(name); }
ValueType & value_
Definition: document.h:2646

◆ RemoveMember() [2/3]

bool RemoveMember ( const GenericValue< EncodingType, SourceAllocator > &  name) const
inline

Definition at line 2628 of file document.h.

2628 { return value_.RemoveMember(name); }
ValueType & value_
Definition: document.h:2646

◆ RemoveMember() [3/3]

MemberIterator RemoveMember ( MemberIterator  m) const
inline

Definition at line 2629 of file document.h.

2629 { return value_.RemoveMember(m); }
ValueType & value_
Definition: document.h:2646

Friends And Related Function Documentation

◆ GenericValue

friend class GenericValue
friend

Definition at line 2581 of file document.h.

Member Data Documentation

◆ const

T AllocatorType &allocator const { value_.AddMember(name, value, allocator)

Definition at line 2613 of file document.h.

◆ this

return * this

Definition at line 2613 of file document.h.

◆ value

T value

Definition at line 2613 of file document.h.

◆ value_

ValueType& value_
private

Definition at line 2646 of file document.h.


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