Cerata
A library to generate structural hardware designs
cerata::Edge Class Reference

A directed edge between two nodes. More...

#include <edge.h>

+ Inheritance diagram for cerata::Edge:
+ Collaboration diagram for cerata::Edge:

Public Member Functions

std::optional< Node * > GetOtherNode (const Node &node) const
 Get the node opposite to the other edge node.
 
Nodedst () const
 Return the destination node.
 
Nodesrc () const
 Return the source node.
 
- Public Member Functions inherited from cerata::Named
 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< EdgeMake (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

Nodedst_
 Destination node.
 
Nodesrc_
 Source node.
 

Detailed Description

A directed edge between two nodes.

Definition at line 35 of file edge.h.

Constructor & Destructor Documentation

◆ Edge()

cerata::Edge::Edge ( std::string  name,
Node dst,
Node src 
)
protected

Construct a new edge.

Parameters
nameThe name of the edge.
dstThe destination node.
srcThe source node.

Definition at line 29 of file edge.cc.


The documentation for this class was generated from the following files: