25#include <SimoxUtility/algorithm/string/string_tools.h>
26#include <SimoxUtility/json.h>
33 static const char* nowhereText =
"[Nowhere]";
40 json[
"depth"] = vertex.
depth;
44 json[
"style"][
"label"] = nowhereText;
45 json[
"style"][
"fill-color"] = simox::Color::gray().to_vector4i();
50 std::string del =
"/";
53 del =
static_cast<std::string
>(
"/\n");
55 json[
"style"][
"label"] = simox::alg::join(items, del);
56 json[
"style"][
"fill-color"] = vertex.
fillColor.to_vector4i();
63 json.at(
"memoryID").get_to(vertex.
memoryID);
64 json.at(
"depth").get_to(vertex.
depth);
77 json[
"style"][
"color"] = simox::Color::kit_red().to_vector4i();
std::string str(bool escapeDelimiters=true) const
Get a string representation of this memory ID.
bool hasMemoryName() const
std::vector< std::string > getItems(bool escapeDelimiters=false) const
Get the levels from root to first not defined level (excluding).
void to_json(nlohmann::json &j, const MemoryVertex &vertex)
void from_json(const nlohmann::json &j, MemoryVertex &vertex)