Class that represents a Node in "dot" format.
More...
#include <Node.h>
|
virtual | ~Node ()=default |
| Destroy the Node object.
|
|
| Node (const std::string &id) |
| Construct a new Node object.
|
|
std::string | id () const |
| return id
|
|
const std::unordered_map< std::string, std::string > & | attributes () const |
| return attributes
|
|
void | setAttribute (const std::string &key, const std::string &val) |
| Store an attribute with key-value pair.
|
|
std::string | getAttribute (const std::string &key) |
| Get the attributte value that is associated with key.
|
|
void | addOutEdge (Node *dotinfo) |
| Add an edge in the graph, which is an outgoing edge.
|
|
const std::vector< Node * > & | out_edges () const |
| Return list of out edges.
|
|
Class that represents a Node in "dot" format.
Definition at line 55 of file Node.h.
◆ ~Node()
virtual onert::dumper::dot::Node::~Node |
( |
| ) |
|
|
virtualdefault |
◆ Node()
onert::dumper::dot::Node::Node |
( |
const std::string & |
id | ) |
|
Construct a new Node object.
- Parameters
-
Definition at line 31 of file Node.cc.
31 : _id{id}
32{
33
34 _attributes["style"] = "filled";
37}
static const std::string DEFAULT_COLORSCHEME
static const std::string DEFAULT_FILLCOLOR
References DEFAULT_COLORSCHEME, and DEFAULT_FILLCOLOR.
◆ addOutEdge()
void onert::dumper::dot::Node::addOutEdge |
( |
Node * |
dotinfo | ) |
|
|
inline |
Add an edge in the graph, which is an outgoing edge.
- Parameters
-
[in] | dotinfo | A node that the new edge will be connected to |
Definition at line 109 of file Node.h.
109{ _out_edges.emplace_back(dotinfo); }
◆ attributes()
const std::unordered_map< std::string, std::string > & onert::dumper::dot::Node::attributes |
( |
| ) |
const |
|
inline |
return attributes
- Returns
- const reference of attributes object
Definition at line 88 of file Node.h.
88{ return _attributes; }
◆ getAttribute()
std::string onert::dumper::dot::Node::getAttribute |
( |
const std::string & |
key | ) |
|
Get the attributte value that is associated with key.
- Parameters
-
[in] | key | key of the attribute |
- Returns
- value that is associated with the key
Definition at line 41 of file Node.cc.
42{
43 auto itr = _attributes.find(key);
44 if (itr == _attributes.end())
45 {
46 return "";
47 }
48 else
49 {
50 return itr->second;
51 }
52}
◆ id()
std::string onert::dumper::dot::Node::id |
( |
| ) |
const |
|
inline |
return id
- Returns
- id
Definition at line 81 of file Node.h.
◆ out_edges()
const std::vector< Node * > & onert::dumper::dot::Node::out_edges |
( |
| ) |
const |
|
inline |
◆ setAttribute()
void onert::dumper::dot::Node::setAttribute |
( |
const std::string & |
key, |
|
|
const std::string & |
val |
|
) |
| |
◆ BG_COLORS
const std::string onert::dumper::dot::Node::BG_COLORS = {"1", "2", "3", "4", "5", "6", "7", "8"} |
|
static |
◆ DEFAULT_COLORSCHEME
const std::string onert::dumper::dot::Node::DEFAULT_COLORSCHEME = "x11" |
|
static |
◆ DEFAULT_FILLCOLOR
const std::string onert::dumper::dot::Node::DEFAULT_FILLCOLOR = "white" |
|
static |
The documentation for this class was generated from the following files:
- runtime/onert/core/src/dumper/dot/Node.h
- runtime/onert/core/src/dumper/dot/Node.cc