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 51 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 22 of file Node.cc.
22 : _id{id}
23{
24
25 _attributes["style"] = "filled";
28}
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 106 of file Node.h.
106{ _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 85 of file Node.h.
85{ 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 32 of file Node.cc.
33{
34 auto itr = _attributes.find(key);
35 if (itr == _attributes.end())
36 {
37 return "";
38 }
39 else
40 {
41 return itr->second;
42 }
43}
◆ id()
std::string onert::dumper::dot::Node::id |
( |
| ) |
const |
|
inline |
return id
- Returns
- id
Definition at line 78 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[8] = {"1", "2", "3", "4", "5", "6", "7", "8"} |
|
inlinestatic |
Definition at line 57 of file Node.h.
57{"1", "2", "3", "4", "5", "6", "7", "8"};
◆ DEFAULT_COLORSCHEME
const std::string onert::dumper::dot::Node::DEFAULT_COLORSCHEME = "white" |
|
inlinestatic |
◆ DEFAULT_FILLCOLOR
const std::string onert::dumper::dot::Node::DEFAULT_FILLCOLOR = "x11" |
|
inlinestatic |
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