Defined in dot.hpp.
This nested struct represents a node in the represented graph.
|
|
| Node ()=default |
| | Default constructor.
|
| |
|
| Node (Node &&)=default |
| | Default move constructor.
|
| |
|
| Node (Node const &)=default |
| | Default copy constructor.
|
| |
| template<typename Thing> |
| | Node (Thing &&thing) |
| | Construct from anything.
|
| |
| template<typename Thing1, typename Thing2> |
| Node & | add_attr (Thing1 &&key, Thing2 &&val) |
| | Add an attribute to a node.
|
| |
|
Node & | operator= (Node &&)=default |
| | Default move assignment.
|
| |
|
Node & | operator= (Node const &)=default |
| | Default copy assignment.
|
| |
◆ Node()
This constructor creates a new Node object from the parameter thing, which is converted to a string (using std::to_string if thing is not already a std::string) by the constructor.
The newly constructed Node has no attributes set.
- Template Parameters
-
| Thing | the type of the argument. |
- Parameters
-
| thing | the object whose string representation will be the name of the node. |
◆ add_attr()
template<typename Thing1, typename Thing2>
| Node & add_attr |
( |
Thing1 && | key, |
|
|
Thing2 && | val ) |
|
inline |
This function adds a new attribute, or replaces the value of an existing attribute of a Node. The arguments key and val are converted to std::string (unless they are std::string, std::string_view, or char const* already).
- Template Parameters
-
| Thing1 | the type of the first argument. |
| Thing2 | the type of the second argument. |
- Parameters
-
| key | the name of the attribute. |
| val | the value of the attribute. |
- Returns
- A reference to
this.
- Warning
- No checks of any kind are performed that the string representations of
key or val are valid in DOT; see the Graphviz documentation for more details.
◆ to_human_readable_repr()
The documentation for this struct was generated from the following file:
- /Users/jdm3/libsemigroups/include/libsemigroups/dot.hpp