LLVM 24.0.0git
llvm::df_iterator< GraphT, SetType, ExtStorage, GT > Class Template Reference

#include "llvm/ADT/DepthFirstIterator.h"

Inheritance diagram for llvm::df_iterator< GraphT, SetType, ExtStorage, GT >:
[legend]

Public Types

using iterator_category
using value_type = typename GT::NodeRef
using difference_type = std::ptrdiff_t
using pointer = value_type *
using reference = const value_type &

Public Member Functions

bool operator== (const df_iterator &x) const
bool operator!= (const df_iterator &x) const
reference operator* () const
NodeRef operator-> () const
df_iterator & operator++ ()
df_iterator & skipChildren ()
 Skips all children of the current node and traverses to next node.
df_iterator operator++ (int)
bool nodeVisited (NodeRef Node) const
unsigned getPathLength () const
 Return the length of the path from the entry node to the current node, counting both nodes.
NodeRef getPath (unsigned n) const
 Return the n'th node in the path from the entry node to the current node.

Static Public Member Functions

static df_iterator begin (const GraphT &G)
static df_iterator end (const GraphT &G)
static df_iterator begin (const GraphT &G, SetType &S)
static df_iterator end (const GraphT &G, SetType &S)

Additional Inherited Members

Public Attributes inherited from llvm::df_iterator_storage< SetType, External >
SetType Visited

Detailed Description

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
class llvm::df_iterator< GraphT, SetType, ExtStorage, GT >

Definition at line 87 of file DepthFirstIterator.h.

Member Typedef Documentation

◆ difference_type

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
using llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::difference_type = std::ptrdiff_t

Definition at line 94 of file DepthFirstIterator.h.

◆ iterator_category

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
using llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::iterator_category
Initial value:
std::conditional_t<ExtStorage, std::input_iterator_tag,
std::forward_iterator_tag>

Definition at line 90 of file DepthFirstIterator.h.

◆ pointer

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
using llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::pointer = value_type *

Definition at line 95 of file DepthFirstIterator.h.

◆ reference

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
using llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::reference = const value_type &

Definition at line 96 of file DepthFirstIterator.h.

◆ value_type

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
using llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::value_type = typename GT::NodeRef

Definition at line 93 of file DepthFirstIterator.h.

Member Function Documentation

◆ begin() [1/2]

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
df_iterator llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::begin ( const GraphT & G)
inlinestatic

◆ begin() [2/2]

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
df_iterator llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::begin ( const GraphT & G,
SetType & S )
inlinestatic

Definition at line 163 of file DepthFirstIterator.h.

◆ end() [1/2]

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
df_iterator llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::end ( const GraphT & G)
inlinestatic

◆ end() [2/2]

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
df_iterator llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::end ( const GraphT & G,
SetType & S )
inlinestatic

Definition at line 166 of file DepthFirstIterator.h.

◆ getPath()

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
NodeRef llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::getPath ( unsigned n) const
inline

Return the n'th node in the path from the entry node to the current node.

Definition at line 216 of file DepthFirstIterator.h.

◆ getPathLength()

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
unsigned llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::getPathLength ( ) const
inline

Return the length of the path from the entry node to the current node, counting both nodes.

Definition at line 213 of file DepthFirstIterator.h.

◆ nodeVisited()

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
bool llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::nodeVisited ( NodeRef Node) const
inline

Definition at line 207 of file DepthFirstIterator.h.

◆ operator!=()

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
bool llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::operator!= ( const df_iterator< GraphT, SetType, ExtStorage, GT > & x) const
inline

Definition at line 171 of file DepthFirstIterator.h.

◆ operator*()

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
reference llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::operator* ( ) const
inline

Definition at line 173 of file DepthFirstIterator.h.

◆ operator++() [1/2]

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
df_iterator & llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::operator++ ( )
inline

Definition at line 181 of file DepthFirstIterator.h.

◆ operator++() [2/2]

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
df_iterator llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::operator++ ( int )
inline

Definition at line 197 of file DepthFirstIterator.h.

◆ operator->()

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
NodeRef llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::operator-> ( ) const
inline

Definition at line 179 of file DepthFirstIterator.h.

◆ operator==()

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
bool llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::operator== ( const df_iterator< GraphT, SetType, ExtStorage, GT > & x) const
inline

Definition at line 168 of file DepthFirstIterator.h.

◆ skipChildren()

template<class GraphT, class SetType = df_iterator_default_set<typename GraphTraits<GraphT>::NodeRef>, bool ExtStorage = false, class GT = GraphTraits<GraphT>>
df_iterator & llvm::df_iterator< GraphT, SetType, ExtStorage, GT >::skipChildren ( )
inline

Skips all children of the current node and traverses to next node.

Note: This function takes care of incrementing the iterator. If you always increment and call this function, you risk walking off the end.

Definition at line 190 of file DepthFirstIterator.h.


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