3#include <SemanticObjectRelations/Shapes/json.h>
11 semantic::data::Shape result;
12 result.json = nlohmann::json(shape).dump();
19 return nlohmann::json::parse(shape.json).get<semrel::ShapePtr>();
22 semantic::data::ShapeList
25 semantic::data::ShapeList result;
26 result.reserve(shapes.size());
27 for (
const auto& shape : shapes)
29 result.push_back(
toIce(*shape));
34 semantic::data::ShapeList
37 semantic::data::ShapeList result;
38 result.reserve(shapes.size());
39 for (
const auto& [
id, shape] : shapes)
41 result.push_back(
toIce(*shape));
49 semrel::ShapeList result;
50 result.reserve(shapes.size());
51 for (
const auto& shape : shapes)
53 result.push_back(
fromIce(shape));
semrel::AttributedGraph fromIce(const semantic::data::Graph &graph)
data::Graph toIce(const semrel::AttributedGraph &input)
This file offers overloads of toIce() and fromIce() functions for STL container types.
void fromIce(const std::map< IceKeyT, IceValueT > &iceMap, boost::container::flat_map< CppKeyT, CppValueT > &cppMap)
void toIce(std::map< IceKeyT, IceValueT > &iceMap, const boost::container::flat_map< CppKeyT, CppValueT > &cppMap)