Cerata
A library to generate structural hardware designs
|
A directed edge between two nodes. More...
#include <edge.h>
Public Member Functions | |
std::optional< Node * > | GetOtherNode (const Node &node) const |
Get the node opposite to the other edge node. | |
Node * | dst () const |
Return the destination node. | |
Node * | src () const |
Return the source node. | |
![]() | |
Named (std::string name) | |
Named constructor. | |
std::string | name () const |
Return the name of the object. | |
void | SetName (std::string name) |
Change the name of the object. | |
virtual | ~Named ()=default |
Destructor. | |
Static Public Member Functions | |
static std::shared_ptr< Edge > | Make (const std::string &name, Node *dst, Node *src) |
Shorthand to get a smart pointer to an edge. | |
Protected Member Functions | |
Edge (std::string name, Node *dst, Node *src) | |
Construct a new edge. More... | |
Protected Attributes | |
Node * | dst_ |
Destination node. | |
Node * | src_ |
Source node. | |