ElementJsonSerializers.h File Reference
#include <functional>
#include <SimoxUtility/json.h>
#include <SimoxUtility/meta/type_name.h>
#include <RobotAPI/interface/ArViz/Elements.h>
#include "exceptions.h"
+ Include dependency graph for ElementJsonSerializers.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ElementJsonSerializers
 Handles serialization and deserialization of dynamic data::Element objects to and from JSON. More...
 

Namespaces

namespace  armarx
 This file offers overloads of toIce() and fromIce() functions for STL container types.
 
namespace  armarx::viz
 This file is part of ArmarX.
 
namespace  armarx::viz::data
 
namespace  armarx::viz::json
 

Typedefs

template<class ValueT>
using FromJsonFn = std::function<void(const nlohmann::json& j, ValueT& v)>
 A std::function pointer to a function with signature:
 
template<class ValueT>
using RawFromJsonFn = void (*)(const nlohmann::json& j, ValueT& v)
 A raw function pointer to a function with signature:
 
template<class ValueT>
using RawToJsonFn = void (*)(nlohmann::json& j, const ValueT& v)
 A raw function pointer to a function with signature:
 
template<class ValueT>
using ToJsonFn = std::function<void(nlohmann::json& j, const ValueT& v)>
 A std::function pointer to a function with signature:
 

Functions

void from_json (const nlohmann::json &j, Element &element)
 
void from_json (const nlohmann::json &j, ElementPtr &elementPtr)
 
std::string getTypeName (const nlohmann::json &j, const std::string &key)
 Get the type name stored in j.
 
void setTypeName (nlohmann::json &j, const std::string &key, const std::string &typeName)
 Store the type name in j.
 
void to_json (nlohmann::json &j, const Element &element)
 
void to_json (nlohmann::json &j, const Element *elementPtr)
 
void to_json (nlohmann::json &j, const ElementPtr &elementPtr)