![]() |
EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <acts/blob/sPHENIX/thirdparty/nlohmann_json/single_include/nlohmann/json.hpp>
Collaboration diagram for nlohmann::json_pointer< BasicJsonType >:Public Member Functions | |
| json_pointer (const std::string &s="") | |
| create JSON pointer | |
| std::string | to_string () const |
| return a string representation of the JSON pointer | |
| operator std::string () const | |
| return a string representation of the JSON pointer | |
| json_pointer & | operator/= (const json_pointer &ptr) |
| append another JSON pointer at the end of this JSON pointer | |
| json_pointer & | operator/= (std::string token) |
| append an unescaped reference token at the end of this JSON pointer | |
| json_pointer & | operator/= (std::size_t array_idx) |
| append an array index at the end of this JSON pointer | |
| json_pointer | parent_pointer () const |
| returns the parent of this JSON pointer | |
| void | pop_back () |
| remove last reference token | |
| const std::string & | back () const |
| return last reference token | |
| void | push_back (const std::string &token) |
| append an unescaped token at the end of the reference pointer | |
| void | push_back (std::string &&token) |
| append an unescaped token at the end of the reference pointer | |
| bool | empty () const noexcept |
| return whether pointer points to the root document | |
Private Member Functions | |
| json_pointer | top () const |
| BasicJsonType & | get_and_create (BasicJsonType &j) const |
| create and return a reference to the pointed to value | |
| BasicJsonType & | get_unchecked (BasicJsonType *ptr) const |
| return a reference to the pointed to value | |
| BasicJsonType & | get_checked (BasicJsonType *ptr) const |
| const BasicJsonType & | get_unchecked (const BasicJsonType *ptr) const |
| return a const reference to the pointed to value | |
| const BasicJsonType & | get_checked (const BasicJsonType *ptr) const |
| bool | contains (const BasicJsonType *ptr) const |
Static Private Member Functions | |
| static int | array_index (const std::string &s) |
| static std::vector< std::string > | split (const std::string &reference_string) |
| split the string input to reference tokens | |
| static void | replace_substring (std::string &s, const std::string &f, const std::string &t) |
| replace all occurrences of a substring by another string | |
| static std::string | escape (std::string s) |
| escape "~" to "~0" and "/" to "~1" | |
| static void | unescape (std::string &s) |
| unescape "~1" to tilde and "~0" to slash (order is important!) | |
| static void | flatten (const std::string &reference_string, const BasicJsonType &value, BasicJsonType &result) |
| static BasicJsonType | unflatten (const BasicJsonType &value) |
Private Attributes | |
| std::vector< std::string > | reference_tokens |
| the reference tokens | |
Friends | |
| class | basic_json |
| json_pointer | operator/ (const json_pointer &lhs, const json_pointer &rhs) |
| create a new JSON pointer by appending the right JSON pointer at the end of the left JSON pointer | |
| json_pointer | operator/ (const json_pointer &ptr, std::string token) |
| create a new JSON pointer by appending the unescaped token at the end of the JSON pointer | |
| json_pointer | operator/ (const json_pointer &ptr, std::size_t array_idx) |
| create a new JSON pointer by appending the array-index-token at the end of the JSON pointer | |
| bool | operator== (json_pointer const &lhs, json_pointer const &rhs) noexcept |
| compares two JSON pointers for equality | |
| bool | operator!= (json_pointer const &lhs, json_pointer const &rhs) noexcept |
| compares two JSON pointers for inequality | |
Definition at line 10421 of file json.hpp.
View newest version in sPHENIX GitHub at line 10421 of file json.hpp
|
inlineexplicit |
create JSON pointer
Create a JSON pointer according to the syntax described in Section 3 of RFC6901.
| [in] | s | string representing the JSON pointer; if omitted, the empty string is assumed which references the whole JSON value |
| parse_error.107 | if the given JSON pointer s is nonempty and does not begin with a slash (/); see example below |
| parse_error.108 | if a tilde (~) in the given JSON pointer s is not followed by 0 (representing ~) or 1 (representing /); see example below |
{The example shows the construction several valid JSON pointers as well as the exceptional behavior.,json_pointer}
Definition at line 10449 of file json.hpp.
View newest version in sPHENIX GitHub at line 10449 of file json.hpp
|
inlinestaticprivate |
| [in] | s | reference token to be converted into an array index |
| out_of_range.404 | if string s could not be converted to an integer |
Definition at line 10733 of file json.hpp.
View newest version in sPHENIX GitHub at line 10733 of file json.hpp
References nlohmann::detail::out_of_range::create(), JSON_HEDLEY_UNLIKELY, and JSON_THROW.
Referenced by nlohmann::basic_json::patch().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
return last reference token
empty() {The example shows the usage of back.,json_pointer__back}
Constant.
| out_of_range.405 | if JSON pointer has no parent |
Definition at line 10673 of file json.hpp.
View newest version in sPHENIX GitHub at line 10673 of file json.hpp
References nlohmann::detail::out_of_range::create(), JSON_HEDLEY_UNLIKELY, and JSON_THROW.
Referenced by nlohmann::basic_json::patch().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
| parse_error.106 | if an array index begins with '0' |
| parse_error.109 | if an array index was not a number |
Definition at line 11103 of file json.hpp.
View newest version in sPHENIX GitHub at line 11103 of file json.hpp
References nlohmann::detail::parse_error::create(), JSON_CATCH, JSON_HEDLEY_UNLIKELY, JSON_THROW, and JSON_TRY.
Referenced by nlohmann::basic_json::contains().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinenoexcept |
return whether pointer points to the root document
Constant.
No-throw guarantee: this function never throws exceptions.
{The example shows the result of empty for different JSON Pointers.,json_pointer__empty}
Definition at line 10720 of file json.hpp.
View newest version in sPHENIX GitHub at line 10720 of file json.hpp
Referenced by nlohmann::basic_json::patch().
Here is the caller graph for this function:
|
inlinestaticprivate |
escape "~" to "~0" and "/" to "~1"
Definition at line 11266 of file json.hpp.
View newest version in sPHENIX GitHub at line 11266 of file json.hpp
References Acts::UnitConstants::s.
Referenced by nlohmann::basic_json::diff().
Here is the caller graph for this function:
|
inlinestaticprivate |
| [in] | reference_string | the reference string to the current value |
| [in] | value | the value to consider |
| [in,out] | result | the result object to insert values to |
null. Definition at line 11287 of file json.hpp.
View newest version in sPHENIX GitHub at line 11287 of file json.hpp
References nlohmann::to_string(), and value.
Referenced by nlohmann::basic_json::flatten().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
create and return a reference to the pointed to value
Linear in the number of reference tokens.
| parse_error.109 | if array index is not a number |
| type_error.313 | if value cannot be unflattened |
Definition at line 10767 of file json.hpp.
View newest version in sPHENIX GitHub at line 10767 of file json.hpp
References nlohmann::detail::parse_error::create(), nlohmann::detail::type_error::create(), JSON_CATCH, JSON_THROW, and JSON_TRY.
Referenced by nlohmann::json_pointer< BasicJsonType >::unflatten().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
| parse_error.106 | if an array index begins with '0' |
| parse_error.109 | if an array index was not a number |
| out_of_range.402 | if the array index '-' is used |
| out_of_range.404 | if the JSON pointer can not be resolved |
Definition at line 10923 of file json.hpp.
View newest version in sPHENIX GitHub at line 10923 of file json.hpp
References nlohmann::detail::parse_error::create(), nlohmann::detail::out_of_range::create(), JSON_CATCH, JSON_HEDLEY_UNLIKELY, JSON_THROW, JSON_TRY, and nlohmann::to_string().
Referenced by nlohmann::basic_json::at(), and nlohmann::basic_json::value().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
| parse_error.106 | if an array index begins with '0' |
| parse_error.109 | if an array index was not a number |
| out_of_range.402 | if the array index '-' is used |
| out_of_range.404 | if the JSON pointer can not be resolved |
Definition at line 11047 of file json.hpp.
View newest version in sPHENIX GitHub at line 11047 of file json.hpp
References nlohmann::detail::parse_error::create(), nlohmann::detail::out_of_range::create(), JSON_CATCH, JSON_HEDLEY_UNLIKELY, JSON_THROW, JSON_TRY, and nlohmann::to_string().
Here is the call graph for this function:
|
inlineprivate |
return a reference to the pointed to value
"/this/that" on a null value is equivalent to calling operator[]("this").operator[]("that") on that value, effectively changing the null value to an object.| [in] | ptr | a JSON value |
Linear in the length of the JSON pointer.
| parse_error.106 | if an array index begins with '0' |
| parse_error.109 | if an array index was not a number |
| out_of_range.404 | if the JSON pointer can not be resolved |
Definition at line 10847 of file json.hpp.
View newest version in sPHENIX GitHub at line 10847 of file json.hpp
References nlohmann::detail::parse_error::create(), nlohmann::detail::out_of_range::create(), JSON_CATCH, JSON_HEDLEY_UNLIKELY, JSON_THROW, JSON_TRY, and x.
Referenced by nlohmann::basic_json::operator[]().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
return a const reference to the pointed to value
| [in] | ptr | a JSON value |
| parse_error.106 | if an array index begins with '0' |
| parse_error.109 | if an array index was not a number |
| out_of_range.402 | if the array index '-' is used |
| out_of_range.404 | if the JSON pointer can not be resolved |
Definition at line 10988 of file json.hpp.
View newest version in sPHENIX GitHub at line 10988 of file json.hpp
References nlohmann::detail::parse_error::create(), nlohmann::detail::out_of_range::create(), JSON_CATCH, JSON_HEDLEY_UNLIKELY, JSON_THROW, JSON_TRY, and nlohmann::to_string().
Here is the call graph for this function:
|
inline |
return a string representation of the JSON pointer
ptr, it holds: {The example shows the result of to_string.,json_pointer__to_string}
Definition at line 10478 of file json.hpp.
View newest version in sPHENIX GitHub at line 10478 of file json.hpp
References nlohmann::to_string().
Here is the call graph for this function:
|
inline |
append another JSON pointer at the end of this JSON pointer
| [in] | ptr | JSON pointer to append |
{The example shows the usage of operator/=.,json_pointer__operator_add}
Linear in the length of ptr.
Definition at line 10499 of file json.hpp.
View newest version in sPHENIX GitHub at line 10499 of file json.hpp
References nlohmann::json_pointer< BasicJsonType >::reference_tokens.
|
inline |
append an unescaped reference token at the end of this JSON pointer
| [in] | token | reference token to append |
{The example shows the usage of operator/=.,json_pointer__operator_add}
Amortized constant.
Definition at line 10523 of file json.hpp.
View newest version in sPHENIX GitHub at line 10523 of file json.hpp
|
inline |
append an array index at the end of this JSON pointer
| [in] | array_idx | array index to append |
{The example shows the usage of operator/=.,json_pointer__operator_add}
Amortized constant.
Definition at line 10545 of file json.hpp.
View newest version in sPHENIX GitHub at line 10545 of file json.hpp
References nlohmann::to_string().
Here is the call graph for this function:
|
inline |
returns the parent of this JSON pointer
Linear in the length of the JSON pointer.
{The example shows the result of parent_pointer for different JSON Pointers.,json_pointer__parent_pointer}
Definition at line 10624 of file json.hpp.
View newest version in sPHENIX GitHub at line 10624 of file json.hpp
References nlohmann::json_pointer< BasicJsonType >::pop_back().
Here is the call graph for this function:
|
inline |
remove last reference token
empty(){The example shows the usage of pop_back.,json_pointer__pop_back}
Constant.
| out_of_range.405 | if JSON pointer has no parent |
Definition at line 10649 of file json.hpp.
View newest version in sPHENIX GitHub at line 10649 of file json.hpp
References nlohmann::detail::out_of_range::create(), JSON_HEDLEY_UNLIKELY, and JSON_THROW.
Referenced by nlohmann::json_pointer< BasicJsonType >::parent_pointer(), and nlohmann::basic_json::patch().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
append an unescaped token at the end of the reference pointer
| [in] | token | token to add |
Amortized constant.
{The example shows the result of push_back for different JSON Pointers.,json_pointer__push_back}
Definition at line 10695 of file json.hpp.
View newest version in sPHENIX GitHub at line 10695 of file json.hpp
|
inline |
append an unescaped token at the end of the reference pointer
| [in] | token | token to add |
Amortized constant.{The example shows the result of push_back for different JSON Pointers.,json_pointer__push_back}
Definition at line 10701 of file json.hpp.
View newest version in sPHENIX GitHub at line 10701 of file json.hpp
|
inlinestaticprivate |
replace all occurrences of a substring by another string
| [in,out] | s | the string to manipulate; changed so that all occurrences of f are replaced with t |
| [in] | f | the substring to replace with t |
| [in] | t | the string to replace f |
Definition at line 11254 of file json.hpp.
View newest version in sPHENIX GitHub at line 11254 of file json.hpp
Here is the call graph for this function:
|
inlinestaticprivate |
split the string input to reference tokens
| parse_error.107 | if the pointer is not empty or begins with '/' |
| parse_error.108 | if character '~' is not followed by '0' or '1' |
Definition at line 11179 of file json.hpp.
View newest version in sPHENIX GitHub at line 11179 of file json.hpp
References nlohmann::detail::parse_error::create(), JSON_HEDLEY_UNLIKELY, JSON_THROW, pos(), and start().
Referenced by lysspa().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
return a string representation of the JSON pointer
ptr, it holds: {The example shows the result of to_string.,json_pointer__to_string}
Definition at line 10467 of file json.hpp.
View newest version in sPHENIX GitHub at line 10467 of file json.hpp
|
inlineprivate |
Definition at line 10747 of file json.hpp.
View newest version in sPHENIX GitHub at line 10747 of file json.hpp
References nlohmann::detail::out_of_range::create(), JSON_HEDLEY_UNLIKELY, JSON_THROW, and nlohmann::json_pointer< BasicJsonType >::reference_tokens.
Referenced by nlohmann::basic_json::patch().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestaticprivate |
|
inlinestaticprivate |
| [in] | value | flattened JSON |
| parse_error.109 | if array index is not a number |
| type_error.314 | if value is not an object |
| type_error.315 | if object values are not primitive |
| type_error.313 | if value cannot be unflattened |
Definition at line 11350 of file json.hpp.
View newest version in sPHENIX GitHub at line 11350 of file json.hpp
References nlohmann::detail::type_error::create(), nlohmann::json_pointer< BasicJsonType >::get_and_create(), JSON_HEDLEY_UNLIKELY, and JSON_THROW.
Referenced by nlohmann::basic_json::unflatten().
Here is the call graph for this function:
Here is the caller graph for this function:
|
friend |
|
friend |
compares two JSON pointers for inequality
| [in] | lhs | JSON pointer to compare |
| [in] | rhs | JSON pointer to compare |
Linear in the length of the JSON pointer
No-throw guarantee: this function never throws exceptions.
Definition at line 11405 of file json.hpp.
View newest version in sPHENIX GitHub at line 11405 of file json.hpp
|
friend |
create a new JSON pointer by appending the right JSON pointer at the end of the left JSON pointer
| [in] | lhs | JSON pointer |
| [in] | rhs | JSON pointer |
{The example shows the usage of operator/.,json_pointer__operator_add_binary}
Linear in the length of lhs and rhs.
Definition at line 10565 of file json.hpp.
View newest version in sPHENIX GitHub at line 10565 of file json.hpp
|
friend |
create a new JSON pointer by appending the unescaped token at the end of the JSON pointer
| [in] | ptr | JSON pointer |
| [in] | token | reference token |
{The example shows the usage of operator/.,json_pointer__operator_add_binary}
Linear in the length of ptr.
Definition at line 10586 of file json.hpp.
View newest version in sPHENIX GitHub at line 10586 of file json.hpp
|
friend |
create a new JSON pointer by appending the array-index-token at the end of the JSON pointer
| [in] | ptr | JSON pointer |
| [in] | array_idx | array index |
{The example shows the usage of operator/.,json_pointer__operator_add_binary}
Linear in the length of ptr.
Definition at line 10606 of file json.hpp.
View newest version in sPHENIX GitHub at line 10606 of file json.hpp
|
friend |
compares two JSON pointers for equality
| [in] | lhs | JSON pointer to compare |
| [in] | rhs | JSON pointer to compare |
Linear in the length of the JSON pointer
No-throw guarantee: this function never throws exceptions.
Definition at line 11388 of file json.hpp.
View newest version in sPHENIX GitHub at line 11388 of file json.hpp
|
private |
the reference tokens
Definition at line 11412 of file json.hpp.
View newest version in sPHENIX GitHub at line 11412 of file json.hpp
Referenced by nlohmann::json_pointer< BasicJsonType >::operator/=(), and nlohmann::json_pointer< BasicJsonType >::top().