.. _program_listing_file_lib_graphviz_interface.cpp: Program Listing for File graphviz_interface.cpp =============================================== |exhale_lsh| :ref:`Return to documentation for file ` (``lib/graphviz_interface.cpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #include "graphviz_interface.hpp" #include namespace delphi::gv { void set_property(Agedge_t *edge, std::string property_name, std::string property_value) { agsafeset(edge, const_cast(property_name.c_str()), const_cast(property_value.c_str()), const_cast("")); } void set_property(Agnode_t *node, std::string property_name, std::string property_value) { agsafeset(node, const_cast(property_name.c_str()), const_cast(property_value.c_str()), const_cast("")); } void set_property(Agraph_t *g, int kind, std::string property_name, std::string property_value) { agattr(g, kind, const_cast(property_name.c_str()), const_cast(property_value.c_str())); } Agnode_t *add_node(Agraph_t *g, std::string node_name) { return agnode(g, const_cast(node_name.c_str()), 1); } } // namespace delphi::gv