LLVM 20.0.0git
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::DGEdge< NodeType, EdgeType > Class Template Reference

Represent an edge in the directed graph. More...

#include "llvm/ADT/DirectedGraph.h"

Inheritance diagram for llvm::DGEdge< NodeType, EdgeType >:
Inheritance graph
[legend]

Public Member Functions

 DGEdge ()=delete
 
 DGEdge (NodeType &N)
 Create an edge pointing to the given node N.
 
 DGEdge (const DGEdge< NodeType, EdgeType > &E)
 
DGEdge< NodeType, EdgeType > & operator= (const DGEdge< NodeType, EdgeType > &E)
 
bool operator== (const DGEdge &E) const
 Static polymorphism: delegate implementation (via isEqualTo) to the derived class.
 
bool operator!= (const DGEdge &E) const
 
const NodeType & getTargetNode () const
 Retrieve the target node this edge connects to.
 
NodeType & getTargetNode ()
 
void setTargetNode (const NodeType &N)
 Set the target node this edge connects to.
 

Protected Member Functions

bool isEqualTo (const EdgeType &E) const
 
EdgeType & getDerived ()
 
const EdgeType & getDerived () const
 

Protected Attributes

NodeType & TargetNode
 

Detailed Description

template<class NodeType, class EdgeType>
class llvm::DGEdge< NodeType, EdgeType >

Represent an edge in the directed graph.

The edge contains the target node it connects to.

Definition at line 28 of file DirectedGraph.h.

Constructor & Destructor Documentation

◆ DGEdge() [1/3]

template<class NodeType , class EdgeType >
llvm::DGEdge< NodeType, EdgeType >::DGEdge ( )
delete

◆ DGEdge() [2/3]

template<class NodeType , class EdgeType >
llvm::DGEdge< NodeType, EdgeType >::DGEdge ( NodeType &  N)
inlineexplicit

Create an edge pointing to the given node N.

Definition at line 32 of file DirectedGraph.h.

◆ DGEdge() [3/3]

template<class NodeType , class EdgeType >
llvm::DGEdge< NodeType, EdgeType >::DGEdge ( const DGEdge< NodeType, EdgeType > &  E)
inlineexplicit

Definition at line 33 of file DirectedGraph.h.

Member Function Documentation

◆ getDerived() [1/2]

template<class NodeType , class EdgeType >
EdgeType & llvm::DGEdge< NodeType, EdgeType >::getDerived ( )
inlineprotected

Definition at line 62 of file DirectedGraph.h.

Referenced by llvm::DGEdge< NodeType, EdgeType >::operator==().

◆ getDerived() [2/2]

template<class NodeType , class EdgeType >
const EdgeType & llvm::DGEdge< NodeType, EdgeType >::getDerived ( ) const
inlineprotected

Definition at line 63 of file DirectedGraph.h.

◆ getTargetNode() [1/2]

template<class NodeType , class EdgeType >
NodeType & llvm::DGEdge< NodeType, EdgeType >::getTargetNode ( )
inline

◆ getTargetNode() [2/2]

template<class NodeType , class EdgeType >
const NodeType & llvm::DGEdge< NodeType, EdgeType >::getTargetNode ( ) const
inline

Retrieve the target node this edge connects to.

Definition at line 48 of file DirectedGraph.h.

References llvm::DGEdge< NodeType, EdgeType >::TargetNode.

Referenced by llvm::DGEdge< NodeType, EdgeType >::getTargetNode(), llvm::DDGBuilder::mergeNodes(), and llvm::operator<<().

◆ isEqualTo()

template<class NodeType , class EdgeType >
bool llvm::DGEdge< NodeType, EdgeType >::isEqualTo ( const EdgeType &  E) const
inlineprotected

Definition at line 59 of file DirectedGraph.h.

References E.

◆ operator!=()

template<class NodeType , class EdgeType >
bool llvm::DGEdge< NodeType, EdgeType >::operator!= ( const DGEdge< NodeType, EdgeType > &  E) const
inline

Definition at line 45 of file DirectedGraph.h.

References E, and llvm::DGEdge< NodeType, EdgeType >::operator==().

◆ operator=()

template<class NodeType , class EdgeType >
DGEdge< NodeType, EdgeType > & llvm::DGEdge< NodeType, EdgeType >::operator= ( const DGEdge< NodeType, EdgeType > &  E)
inline

Definition at line 35 of file DirectedGraph.h.

References E, and llvm::DGEdge< NodeType, EdgeType >::TargetNode.

Referenced by llvm::DDGEdge::operator=().

◆ operator==()

template<class NodeType , class EdgeType >
bool llvm::DGEdge< NodeType, EdgeType >::operator== ( const DGEdge< NodeType, EdgeType > &  E) const
inline

Static polymorphism: delegate implementation (via isEqualTo) to the derived class.

Definition at line 42 of file DirectedGraph.h.

References E, and llvm::DGEdge< NodeType, EdgeType >::getDerived().

Referenced by llvm::DGEdge< NodeType, EdgeType >::operator!=().

◆ setTargetNode()

template<class NodeType , class EdgeType >
void llvm::DGEdge< NodeType, EdgeType >::setTargetNode ( const NodeType &  N)
inline

Set the target node this edge connects to.

Definition at line 55 of file DirectedGraph.h.

References N, and llvm::DGEdge< NodeType, EdgeType >::TargetNode.

Member Data Documentation

◆ TargetNode

template<class NodeType , class EdgeType >
NodeType& llvm::DGEdge< NodeType, EdgeType >::TargetNode
protected

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