Static Value-Flow Analysis
Loading...
Searching...
No Matches
SVF::WTO< GraphT >::WTOCycleDepthBuilder Class Referencefinal

Visitor to build the cycle depths of each node. More...

#include <WTO.h>

Inheritance diagram for SVF::WTO< GraphT >::WTOCycleDepthBuilder:
SVF::WTOComponentVisitor< GraphT >

Public Member Functions

 WTOCycleDepthBuilder (NodeRefToWTOCycleDepthPtr &nodeToWTOCycleDepth)
void visit (const WTOCycleT &cycle) override
 Visit the given cycle.
void visit (const WTONodeT &node) override
 Visit the given node.
Public Member Functions inherited from SVF::WTOComponentVisitor< GraphT >
 WTOComponentVisitor ()=default
 Default constructor.
 WTOComponentVisitor (const WTOComponentVisitor &) noexcept=default
 Copy constructor.
 WTOComponentVisitor (WTOComponentVisitor &&) noexcept=default
 Move constructor.
WTOComponentVisitor & operator= (const WTOComponentVisitor &) noexcept=default
 Copy assignment operator.
WTOComponentVisitor & operator= (WTOComponentVisitor &&) noexcept=default
 Move assignment operator.
virtual ~WTOComponentVisitor ()=default
 Destructor.

Private Attributes

WTOCycleDepthPtr _wtoCycleDepth
NodeRefToWTOCycleDepthPtr & _nodeToWTOCycleDepth

Additional Inherited Members

Public Types inherited from SVF::WTOComponentVisitor< GraphT >
typedef WTONode< GraphT > WTONodeT
typedef WTOCycle< GraphT > WTOCycleT

Detailed Description

template<typename GraphT>
class SVF::WTO< GraphT >::WTOCycleDepthBuilder

Visitor to build the cycle depths of each node.

Definition at line 683 of file WTO.h.

Constructor & Destructor Documentation

◆ WTOCycleDepthBuilder()

template<typename GraphT>
SVF::WTO< GraphT >::WTOCycleDepthBuilder::WTOCycleDepthBuilder ( NodeRefToWTOCycleDepthPtr & nodeToWTOCycleDepth)
inlineexplicit

Definition at line 690 of file WTO.h.

Member Function Documentation

◆ visit() [1/2]

template<typename GraphT>
void SVF::WTO< GraphT >::WTOCycleDepthBuilder::visit ( const WTOCycleT & )
inlineoverridevirtual

Visit the given cycle.

Implements SVF::WTOComponentVisitor< GraphT >.

Definition at line 697 of file WTO.h.

698 {
699 const NodeT* head = cycle.head()->getICFGNode();
704 _wtoCycleDepth->add(head);
705 for (auto it = cycle.begin(), et = cycle.end(); it != et; ++it)
706 {
707 (*it)->accept(*this);
708 }
710 }
Iterator begin() const
Begin iterator over the components.
Definition WTO.h:593
Iterator end() const
End iterator over the components.
Definition WTO.h:599

◆ visit() [2/2]

template<typename GraphT>
void SVF::WTO< GraphT >::WTOCycleDepthBuilder::visit ( const WTONodeT & )
inlineoverridevirtual

Visit the given node.

Implements SVF::WTOComponentVisitor< GraphT >.

Definition at line 712 of file WTO.h.

713 {
715 std::make_pair(node.getICFGNode(), _wtoCycleDepth));
716 }

Member Data Documentation

◆ _nodeToWTOCycleDepth

template<typename GraphT>
NodeRefToWTOCycleDepthPtr& SVF::WTO< GraphT >::WTOCycleDepthBuilder::_nodeToWTOCycleDepth
private

Definition at line 687 of file WTO.h.

◆ _wtoCycleDepth

template<typename GraphT>
WTOCycleDepthPtr SVF::WTO< GraphT >::WTOCycleDepthBuilder::_wtoCycleDepth
private

Definition at line 686 of file WTO.h.


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