|
Simox
2.3.74.0
|
Namespaces | |
| error | |
Typedefs | |
| using | json = nlohmann::json |
| A JSON document. More... | |
Functions | |
| Eigen::Matrix4f | posquat2eigen4f (const std::string &str) |
| Eigen::Matrix4f | posquat2eigen4f (const char *str) |
| Eigen::Matrix4f | posquat2eigen4f (const simox::json::json &j) |
| std::vector< Eigen::Matrix4f > | posquatArray2eigen4fVector (const std::string &str) |
| std::vector< Eigen::Matrix4f > | posquatArray2eigen4fVector (const char *str) |
| std::vector< Eigen::Matrix4f > | posquatArray2eigen4fVector (const simox::json::json &j) |
| std::string | eigen4f2posquatJson (const Eigen::Matrix4f &str) |
| std::string | eigen4fVector2posquatArrayJson (const std::vector< Eigen::Matrix4f > &str) |
| std::map< std::string, float > | json2NameValueMap (const std::string &str) |
| std::map< std::string, float > | json2NameValueMap (const char *str) |
| std::map< std::string, float > | json2NameValueMap (const simox::json::json &j) |
| json | read (const std::string &filename) |
| Read a JSON document from the given file. More... | |
| json | read (std::istream &is) |
| Read a JSON document from the given in-stream. More... | |
| void | write (const std::string &filename, const json &j, const int indent=-1, const char indent_char=' ') |
| Write a JSON document to the given file. More... | |
| void | write (std::ostream &os, const json &j, const int indent=-1, const char indent_char=' ') |
| Write a JSON document to the given out-stream. More... | |
| template<class BO > | |
| void | write (const std::string &filename, const BO &bo, const int indent=-1, const char indent_char=' ') |
| Write a business object as JSON to the given file. More... | |
| json::const_reference | at_any_key (const json &j, const std::vector< std::string > &keys) |
Get the value at the first key in keys contained in j. More... | |
| template<class T > | |
| T | get_at_any_key (const json &j, const std::vector< std::string > &keys) |
| template<class ValueT , class DefaultT = ValueT> | |
| void | get_to_if_exists (const json &j, const std::string &key, ValueT &dest, const DefaultT &default_=ValueT{}) |
| template<typename Float > | |
| void | to_json (nlohmann::json &j, const OrientedBox< Float > &ob) |
| template<typename Float > | |
| void | from_json (const nlohmann::json &j, OrientedBox< Float > &ob) |
| using simox::json::json = typedef nlohmann::json |
A JSON document.
| json::json::const_reference simox::json::at_any_key | ( | const json & | j, |
| const std::vector< std::string > & | keys | ||
| ) |
Get the value at the first key in keys contained in j.
| j | The JSON object. |
| keys | The keys. |
| std::out_of_range | If none of the keys is found in j. |
| std::string simox::json::eigen4f2posquatJson | ( | const Eigen::Matrix4f & | str | ) |
| std::string simox::json::eigen4fVector2posquatArrayJson | ( | const std::vector< Eigen::Matrix4f > & | str | ) |
| void simox::json::from_json | ( | const nlohmann::json & | j, |
| OrientedBox< Float > & | ob | ||
| ) |
| T simox::json::get_at_any_key | ( | const json & | j, |
| const std::vector< std::string > & | keys | ||
| ) |
| void simox::json::get_to_if_exists | ( | const json & | j, |
| const std::string & | key, | ||
| ValueT & | dest, | ||
| const DefaultT & | default_ = ValueT{} |
||
| ) |
| std::map< std::string, float > simox::json::json2NameValueMap | ( | const std::string & | str | ) |
| std::map< std::string, float > simox::json::json2NameValueMap | ( | const char * | str | ) |
| std::map< std::string, float > simox::json::json2NameValueMap | ( | const simox::json::json & | j | ) |
| Eigen::Matrix4f simox::json::posquat2eigen4f | ( | const std::string & | str | ) |
| Eigen::Matrix4f simox::json::posquat2eigen4f | ( | const char * | str | ) |
| Eigen::Matrix4f simox::json::posquat2eigen4f | ( | const simox::json::json & | j | ) |
| std::vector< Eigen::Matrix4f > simox::json::posquatArray2eigen4fVector | ( | const std::string & | str | ) |
| std::vector< Eigen::Matrix4f > simox::json::posquatArray2eigen4fVector | ( | const char * | str | ) |
| std::vector< Eigen::Matrix4f > simox::json::posquatArray2eigen4fVector | ( | const simox::json::json & | j | ) |
| BO simox::json::read | ( | const std::string & | filename | ) |
Read a JSON document from the given file.
Read a JSON document from the given file and convert it to the business-object type BO.
| filename | The name of the file to read from. |
| <tt>simox::json::error::IOError</tt> | If IO access fails. |
| <tt>simox::json::error::ParseError</tt> | If parsing fails. |
| filename | The name of the file to read from. |
| <tt>simox::json::error::IOError</tt> | If IO access fails. |
| <tt>simox::json::error::ParseError</tt> | If parsing fails. |
| <tt>simox::json::error::ConversionError</tt> | If converting the JSON document to the BO fails. |
| json::json simox::json::read | ( | std::istream & | is | ) |
Read a JSON document from the given in-stream.
| is | The in-stream. |
| <tt>simox::json::error::ParseError</tt> | If parsing fails. |
| void simox::json::to_json | ( | nlohmann::json & | j, |
| const OrientedBox< Float > & | ob | ||
| ) |
| void simox::json::write | ( | const std::string & | filename, |
| const json & | j, | ||
| const int | indent = -1, |
||
| const char | indent_char = ' ' |
||
| ) |
Write a JSON document to the given file.
| filename | The name of the file to write to. |
| j | The JSON document. |
| indent | See nlohmann::json::dump(). |
| indent_char | See nlohmann::json::dump(). |
| <tt>simox::json::error::IOError</tt> | If IO access fails. |
| void simox::json::write | ( | std::ostream & | os, |
| const json & | j, | ||
| const int | indent = -1, |
||
| const char | indent_char = ' ' |
||
| ) |
Write a JSON document to the given out-stream.
| os | The out-stream. |
| j | The JSON document. |
| indent | The number of indents, if nonnegative (see nlohmann::json::dump()). |
| indent_char | The character used for indents (see nlohmann::json::dump()). |
| void simox::json::write | ( | const std::string & | filename, |
| const BO & | bo, | ||
| const int | indent = -1, |
||
| const char | indent_char = ' ' |
||
| ) |
Write a business object as JSON to the given file.
| filename | The name of the file to write to. |
| bo | The business object. |
| indent | The number of indents, if nonnegative (see nlohmann::json::dump()). |
| indent_char | The character used for indents (see nlohmann::json::dump()). |
| <tt>simox::json::error::IOError</tt> | If IO access fails. |
| <tt>simox::json::error::ConversionError</tt> | If the bo could not access fails. |