CUBRID Engine
latest
Main Page
Namespaces
Classes
Files
File List
File Members
db_json_types_internal.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2008 Search Solution Corporation
3
* Copyright 2016 CUBRID Corporation
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*/
18
19
#include "
db_json_types_internal.hpp
"
20
21
bool
22
JSON_DOC::IsLeaf
()
23
{
24
return
!IsArray () && !IsObject ();
25
}
26
27
/*
28
* db_json_doc_to_value ()
29
* doc (in)
30
* value (out)
31
* We need this cast in order to use the overloaded methods
32
* JSON_DOC is derived from GenericDocument which also extends GenericValue
33
* Yet JSON_DOC and JSON_VALUE are two different classes because they are templatized and their type is not known
34
* at compile time
35
*/
36
JSON_VALUE
&
37
db_json_doc_to_value
(
JSON_DOC
&doc)
38
{
39
return
reinterpret_cast<
JSON_VALUE
&
>
(doc);
40
}
41
42
const
JSON_VALUE
&
43
db_json_doc_to_value
(
const
JSON_DOC
&doc)
44
{
45
return
reinterpret_cast<
const
JSON_VALUE
&
>
(doc);
46
}
db_json_doc_to_value
JSON_VALUE & db_json_doc_to_value(JSON_DOC &doc)
Definition:
db_json_types_internal.cpp:37
db_json_types_internal.hpp
JSON_DOC
Definition:
db_json_types_internal.hpp:33
JSON_DOC::IsLeaf
bool IsLeaf()
Definition:
db_json_types_internal.cpp:22
JSON_VALUE
rapidjson::GenericValue< JSON_ENCODING, JSON_PRIVATE_MEMPOOL > JSON_VALUE
Definition:
db_json_types_internal.hpp:31
src
compat
db_json_types_internal.cpp
Generated by
1.8.11