Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
SVF::SlicedPAGEdgeIterImpl< Forward > Class Template Reference

#include <SlicedGraphs.h>

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = SlicedPAGEdgeRef
 
using difference_type = std::ptrdiff_t
 
using pointer = const SlicedPAGEdgeRef *
 
using reference = const SlicedPAGEdgeRef &
 

Public Member Functions

 SlicedPAGEdgeIterImpl ()=default
 
reference operator* () const
 
pointer operator-> () const
 
SlicedPAGNodeRef target () const
 
SlicedPAGEdgeIterImploperator++ ()
 
SlicedPAGEdgeIterImpl operator++ (int)
 

Static Public Member Functions

static SlicedPAGEdgeIterImpl begin (const SlicedPAGView *v, const SVFVar *n)
 
static SlicedPAGEdgeIterImpl end (const SlicedPAGView *v, const SVFVar *n)
 

Private Types

using EdgeIt = SVFVar::const_iterator
 

Private Member Functions

 SlicedPAGEdgeIterImpl (const SlicedPAGView *v, const SVFVar *n)
 
void skipNonKept ()
 
void refresh ()
 

Private Attributes

const SlicedPAGViewview = nullptr
 
const SVFVarsrc = nullptr
 
EdgeIt realIt {}
 
EdgeIt realEnd {}
 
SlicedPAGEdgeRef cur {}
 

Friends

bool operator== (const SlicedPAGEdgeIterImpl &a, const SlicedPAGEdgeIterImpl &b)
 
bool operator!= (const SlicedPAGEdgeIterImpl &a, const SlicedPAGEdgeIterImpl &b)
 

Detailed Description

template<bool Forward>
class SVF::SlicedPAGEdgeIterImpl< Forward >

Definition at line 883 of file SlicedGraphs.h.

Member Typedef Documentation

◆ difference_type

template<bool Forward>
using SVF::SlicedPAGEdgeIterImpl< Forward >::difference_type = std::ptrdiff_t

Definition at line 888 of file SlicedGraphs.h.

◆ EdgeIt

template<bool Forward>
using SVF::SlicedPAGEdgeIterImpl< Forward >::EdgeIt = SVFVar::const_iterator
private

Definition at line 953 of file SlicedGraphs.h.

◆ iterator_category

template<bool Forward>
using SVF::SlicedPAGEdgeIterImpl< Forward >::iterator_category = std::forward_iterator_tag

Definition at line 886 of file SlicedGraphs.h.

◆ pointer

Definition at line 889 of file SlicedGraphs.h.

◆ reference

template<bool Forward>
using SVF::SlicedPAGEdgeIterImpl< Forward >::reference = const SlicedPAGEdgeRef&

Definition at line 890 of file SlicedGraphs.h.

◆ value_type

template<bool Forward>
using SVF::SlicedPAGEdgeIterImpl< Forward >::value_type = SlicedPAGEdgeRef

Definition at line 887 of file SlicedGraphs.h.

Constructor & Destructor Documentation

◆ SlicedPAGEdgeIterImpl() [1/2]

template<bool Forward>
SVF::SlicedPAGEdgeIterImpl< Forward >::SlicedPAGEdgeIterImpl ( )
default

◆ SlicedPAGEdgeIterImpl() [2/2]

template<bool Forward>
SVF::SlicedPAGEdgeIterImpl< Forward >::SlicedPAGEdgeIterImpl ( const SlicedPAGView v,
const SVFVar n 
)
inlineprivate

Definition at line 959 of file SlicedGraphs.h.

959: view(v), src(n) {}
cJSON * n
Definition cJSON.cpp:2558
const SlicedPAGView * view
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76

Member Function Documentation

◆ begin()

template<bool Forward>
static SlicedPAGEdgeIterImpl SVF::SlicedPAGEdgeIterImpl< Forward >::begin ( const SlicedPAGView v,
const SVFVar n 
)
inlinestatic

Definition at line 894 of file SlicedGraphs.h.

895 {
897 const auto& edges = Forward ? n->getOutEdges() : n->getInEdges();
898 it.realIt = edges.begin();
899 it.realEnd = edges.end();
900 it.skipNonKept();
901 it.refresh();
902 return it;
903 }

◆ end()

template<bool Forward>
static SlicedPAGEdgeIterImpl SVF::SlicedPAGEdgeIterImpl< Forward >::end ( const SlicedPAGView v,
const SVFVar n 
)
inlinestatic

Definition at line 904 of file SlicedGraphs.h.

905 {
907 const auto& edges = Forward ? n->getOutEdges() : n->getInEdges();
908 it.realIt = edges.end();
909 it.realEnd = edges.end();
910 return it;
911 }

◆ operator*()

template<bool Forward>
reference SVF::SlicedPAGEdgeIterImpl< Forward >::operator* ( ) const
inline

Definition at line 913 of file SlicedGraphs.h.

914 {
915 return cur;
916 }

◆ operator++() [1/2]

Definition at line 926 of file SlicedGraphs.h.

927 {
928 if (realIt != realEnd)
929 {
930 ++realIt;
931 skipNonKept();
932 }
933 refresh();
934 return *this;
935 }

◆ operator++() [2/2]

Definition at line 936 of file SlicedGraphs.h.

937 {
938 SlicedPAGEdgeIterImpl t = *this;
939 ++*this;
940 return t;
941 }

◆ operator->()

template<bool Forward>
pointer SVF::SlicedPAGEdgeIterImpl< Forward >::operator-> ( ) const
inline

Definition at line 917 of file SlicedGraphs.h.

918 {
919 return &cur;
920 }

◆ refresh()

template<bool Forward>
void SVF::SlicedPAGEdgeIterImpl< Forward >::refresh ( )
inlineprivate

Definition at line 965 of file SlicedGraphs.h.

966 {
967 if (realIt != realEnd)
968 {
969 const SVFStmt* s = *realIt;
970 cur = SlicedPAGEdgeRef{{view, s->getSrcNode()}, {view, s->getDstNode()}, s};
971 }
972 else
973 {
974 cur = SlicedPAGEdgeRef{};
975 }
976 }

◆ skipNonKept()

template<bool Forward>
void SVF::SlicedPAGEdgeIterImpl< Forward >::skipNonKept ( )
inlineprivate

Definition at line 961 of file SlicedGraphs.h.

962 {
963 while (realIt != realEnd && !view->isKeptStmt(*realIt)) ++realIt;
964 }
bool isKeptStmt(const SVFStmt *s) const

◆ target()

template<bool Forward>
SlicedPAGNodeRef SVF::SlicedPAGEdgeIterImpl< Forward >::target ( ) const
inline

Definition at line 921 of file SlicedGraphs.h.

922 {
923 return Forward ? cur.dst : cur.src;
924 }
SlicedPAGNodeRef src
SlicedPAGNodeRef dst

Friends And Related Symbol Documentation

◆ operator!=

template<bool Forward>
bool operator!= ( const SlicedPAGEdgeIterImpl< Forward > &  a,
const SlicedPAGEdgeIterImpl< Forward > &  b 
)
friend

Definition at line 947 of file SlicedGraphs.h.

948 {
949 return !(a == b);
950 }
cJSON * a
Definition cJSON.cpp:2560
const cJSON *const b
Definition cJSON.h:255

◆ operator==

template<bool Forward>
bool operator== ( const SlicedPAGEdgeIterImpl< Forward > &  a,
const SlicedPAGEdgeIterImpl< Forward > &  b 
)
friend

Definition at line 943 of file SlicedGraphs.h.

944 {
945 return a.view == b.view && a.src == b.src && a.realIt == b.realIt;
946 }

Member Data Documentation

◆ cur

template<bool Forward>
SlicedPAGEdgeRef SVF::SlicedPAGEdgeIterImpl< Forward >::cur {}
private

Definition at line 957 of file SlicedGraphs.h.

957{};

◆ realEnd

template<bool Forward>
EdgeIt SVF::SlicedPAGEdgeIterImpl< Forward >::realEnd {}
private

Definition at line 956 of file SlicedGraphs.h.

956{}, realEnd{};

◆ realIt

template<bool Forward>
EdgeIt SVF::SlicedPAGEdgeIterImpl< Forward >::realIt {}
private

Definition at line 956 of file SlicedGraphs.h.

956{}, realEnd{};

◆ src

template<bool Forward>
const SVFVar* SVF::SlicedPAGEdgeIterImpl< Forward >::src = nullptr
private

Definition at line 955 of file SlicedGraphs.h.

◆ view

template<bool Forward>
const SlicedPAGView* SVF::SlicedPAGEdgeIterImpl< Forward >::view = nullptr
private

Definition at line 954 of file SlicedGraphs.h.


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