slang-netlist  0.9.0
Loading...
Searching...
No Matches
slang::netlist::DirectedEdge< NodeType, EdgeType > Class Template Reference

A class to represent a directed edge in a graph. More...

#include <DirectedGraph.hpp>

Public Member Functions

 DirectedEdge (NodeType &sourceNode, NodeType &targetNode)
auto operator= (const DirectedEdge< NodeType, EdgeType > &edge) -> DirectedEdge< NodeType, EdgeType > &=default
auto operator== (const EdgeType &E) const -> bool
auto getSourceNode () const -> NodeType &
 Return the source node of this edge.
auto getTargetNode () const -> NodeType &
 Return the target node of this edge.

Protected Member Functions

auto isEqualTo (const EdgeType &edge) const -> bool
auto getDerived () -> EdgeType &
auto getDerived () const -> const EdgeType &

Protected Attributes

NodeType & sourceNode
NodeType & targetNode

Friends

auto operator== (const EdgeType &A, const EdgeType &B) noexcept -> bool

Detailed Description

template<class NodeType, class EdgeType>
class slang::netlist::DirectedEdge< NodeType, EdgeType >

A class to represent a directed edge in a graph.

Constructor & Destructor Documentation

◆ DirectedEdge()

template<class NodeType, class EdgeType>
slang::netlist::DirectedEdge< NodeType, EdgeType >::DirectedEdge ( NodeType & sourceNode,
NodeType & targetNode )
inline

Member Function Documentation

◆ getDerived() [1/2]

template<class NodeType, class EdgeType>
auto slang::netlist::DirectedEdge< NodeType, EdgeType >::getDerived ( ) -> EdgeType &
inlineprotected

◆ getDerived() [2/2]

template<class NodeType, class EdgeType>
auto slang::netlist::DirectedEdge< NodeType, EdgeType >::getDerived ( ) const -> const EdgeType &
inlineprotected

◆ getSourceNode()

template<class NodeType, class EdgeType>
auto slang::netlist::DirectedEdge< NodeType, EdgeType >::getSourceNode ( ) const -> NodeType &
inline

Return the source node of this edge.

◆ getTargetNode()

template<class NodeType, class EdgeType>
auto slang::netlist::DirectedEdge< NodeType, EdgeType >::getTargetNode ( ) const -> NodeType &
inline

Return the target node of this edge.

◆ isEqualTo()

template<class NodeType, class EdgeType>
auto slang::netlist::DirectedEdge< NodeType, EdgeType >::isEqualTo ( const EdgeType & edge) const -> bool
inlineprotected

◆ operator=()

template<class NodeType, class EdgeType>
auto slang::netlist::DirectedEdge< NodeType, EdgeType >::operator= ( const DirectedEdge< NodeType, EdgeType > & edge) -> DirectedEdge< NodeType, EdgeType > &=default
default

◆ operator==()

template<class NodeType, class EdgeType>
auto slang::netlist::DirectedEdge< NodeType, EdgeType >::operator== ( const EdgeType & E) const -> bool
inline

◆ operator==

template<class NodeType, class EdgeType>
auto operator== ( const EdgeType & A,
const EdgeType & B ) -> bool
friend

Static polymorphism: delegate implementation (via isEqualTo) to the derived class. Add friend operator to resolve ambiguity between operand ordering with C++20.

Member Data Documentation

◆ sourceNode

template<class NodeType, class EdgeType>
NodeType& slang::netlist::DirectedEdge< NodeType, EdgeType >::sourceNode
protected

◆ targetNode

template<class NodeType, class EdgeType>
NodeType& slang::netlist::DirectedEdge< NodeType, EdgeType >::targetNode
protected

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