Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
70f9671b
Commit
70f9671b
authored
Feb 17, 2016
by
Milo Yip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return value type for GenericObject/Array member functions
parent
8c79fb65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
document.h
include/rapidjson/document.h
+15
-15
No files found.
include/rapidjson/document.h
View file @
70f9671b
...
...
@@ -2365,14 +2365,14 @@ public:
ValueType
&
operator
[](
SizeType
index
)
const
{
return
(
*
ptr_
)[
index
];
}
ValueIterator
Begin
()
const
{
return
ptr_
->
Begin
();
}
ValueIterator
End
()
const
{
return
ptr_
->
End
();
}
const
GenericArray
&
Reserve
(
SizeType
newCapacity
,
AllocatorType
&
allocator
)
const
{
ptr_
->
Reserve
(
newCapacity
,
allocator
);
return
*
this
;
}
const
GenericArray
&
PushBack
(
ValueType
&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
PushBack
(
value
,
allocator
);
return
*
this
;
}
GenericArray
Reserve
(
SizeType
newCapacity
,
AllocatorType
&
allocator
)
const
{
ptr_
->
Reserve
(
newCapacity
,
allocator
);
return
*
this
;
}
GenericArray
PushBack
(
ValueType
&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
PushBack
(
value
,
allocator
);
return
*
this
;
}
#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
const
GenericArray
&
PushBack
(
ValueType
&&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
PushBack
(
value
,
allocator
);
return
*
this
;
}
GenericArray
PushBack
(
ValueType
&&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
PushBack
(
value
,
allocator
);
return
*
this
;
}
#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
const
GenericArray
&
PushBack
(
StringRefType
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
PushBack
(
value
,
allocator
);
return
*
this
;
}
GenericArray
PushBack
(
StringRefType
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
PushBack
(
value
,
allocator
);
return
*
this
;
}
template
<
typename
T
>
RAPIDJSON_DISABLEIF_RETURN
((
internal
::
OrExpr
<
internal
::
IsPointer
<
T
>
,
internal
::
IsGenericValue
<
T
>
>
),
(
const
GenericArray
&
))
PushBack
(
T
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
PushBack
(
value
,
allocator
);
return
*
this
;
}
const
GenericArray
&
PopBack
()
const
{
ptr_
->
PopBack
();
return
*
this
;
}
GenericArray
PopBack
()
const
{
ptr_
->
PopBack
();
return
*
this
;
}
ValueIterator
Erase
(
ConstValueIterator
pos
)
const
{
return
ptr_
->
Erase
(
pos
);
}
ValueIterator
Erase
(
ConstValueIterator
first
,
ConstValueIterator
last
)
const
{
return
ptr_
->
Erase
(
first
,
last
);
}
...
...
@@ -2432,21 +2432,21 @@ public:
#if RAPIDJSON_HAS_STDSTRING
MemberIterator
FindMember
(
const
std
::
basic_string
<
Ch
>&
name
)
const
{
return
ptr_
->
FindMember
(
name
);
}
#endif
const
GenericObject
&
AddMember
(
ValueType
&
name
,
ValueType
&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
const
GenericObject
&
AddMember
(
ValueType
&
name
,
StringRefType
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
GenericObject
AddMember
(
ValueType
&
name
,
ValueType
&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
GenericObject
AddMember
(
ValueType
&
name
,
StringRefType
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
#if RAPIDJSON_HAS_STDSTRING
const
GenericObject
&
AddMember
(
ValueType
&
name
,
std
::
basic_string
<
Ch
>&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
GenericObject
AddMember
(
ValueType
&
name
,
std
::
basic_string
<
Ch
>&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
#endif
template
<
typename
T
>
RAPIDJSON_DISABLEIF_RETURN
((
internal
::
OrExpr
<
internal
::
IsPointer
<
T
>
,
internal
::
IsGenericValue
<
T
>
>
),
(
ValueType
&
))
AddMember
(
ValueType
&
name
,
T
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
const
GenericObject
&
AddMember
(
ValueType
&&
name
,
ValueType
&&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
const
GenericObject
&
AddMember
(
ValueType
&&
name
,
ValueType
&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
const
GenericObject
&
AddMember
(
ValueType
&
name
,
ValueType
&&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
const
GenericObject
&
AddMember
(
StringRefType
name
,
ValueType
&&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
GenericObject
AddMember
(
ValueType
&&
name
,
ValueType
&&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
GenericObject
AddMember
(
ValueType
&&
name
,
ValueType
&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
GenericObject
AddMember
(
ValueType
&
name
,
ValueType
&&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
GenericObject
AddMember
(
StringRefType
name
,
ValueType
&&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
const
GenericObject
&
AddMember
(
StringRefType
name
,
ValueType
&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
const
GenericObject
&
AddMember
(
StringRefType
name
,
StringRefType
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
template
<
typename
T
>
RAPIDJSON_DISABLEIF_RETURN
((
internal
::
OrExpr
<
internal
::
IsPointer
<
T
>
,
internal
::
IsGenericValue
<
T
>
>
),
(
const
GenericObject
&
))
AddMember
(
StringRefType
name
,
T
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
GenericObject
AddMember
(
StringRefType
name
,
ValueType
&
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
GenericObject
AddMember
(
StringRefType
name
,
StringRefType
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
template
<
typename
T
>
RAPIDJSON_DISABLEIF_RETURN
((
internal
::
OrExpr
<
internal
::
IsPointer
<
T
>
,
internal
::
IsGenericValue
<
T
>
>
),
(
GenericObject
))
AddMember
(
StringRefType
name
,
T
value
,
AllocatorType
&
allocator
)
const
{
ptr_
->
AddMember
(
name
,
value
,
allocator
);
return
*
this
;
}
void
RemoveAllMembers
()
{
return
ptr_
->
RemoveAllMembers
();
}
bool
RemoveMember
(
const
Ch
*
name
)
const
{
return
ptr_
->
RemoveMember
(
name
);
}
#if RAPIDJSON_HAS_STDSTRING
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment