LLVM  14.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]
Collaboration diagram for llvm::DGEdge< NodeType, EdgeType >:
Collaboration graph
[legend]

Public Member Functions

 DGEdge ()=delete
 
 DGEdge (NodeType &N)
 Create an edge pointing to the given node N. More...
 
 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. More...
 
bool operator!= (const DGEdge &E) const
 
const NodeType & getTargetNode () const
 Retrieve the target node this edge connects to. More...
 
NodeType & getTargetNode ()
 
void setTargetNode (const NodeType &N)
 Set the target node this edge connects to. More...
 

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 27 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 31 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 32 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 61 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 62 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 47 of file DirectedGraph.h.

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

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

◆ isEqualTo()

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

Definition at line 58 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 44 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 34 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 41 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 54 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: