Static Value-Flow Analysis
Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
SVF::WTOCycle< GraphT > Class Template Reference

#include <WTO.h>

Inheritance diagram for SVF::WTOCycle< GraphT >:
SVF::WTOComponent< GraphT >

Public Types

typedef GraphT::NodeType NodeT
 
typedef WTOComponent< GraphT > WTOComponentT
 
typedef WTOComponentRefList::const_iterator Iterator
 Iterator over the components. More...
 
- Public Types inherited from SVF::WTOComponent< GraphT >
enum  WTOCT { Node , Cycle }
 

Public Member Functions

 WTOCycle (const WTONode< GraphT > *head, WTOComponentRefList components)
 Constructor. More...
 
const WTONode< GraphT > * head () const
 Return the head of the cycle. More...
 
const WTOComponentRefListgetWTOComponents () const
 Get all wto components in WTO cycle. More...
 
Iterator begin () const
 Begin iterator over the components. More...
 
Iterator end () const
 End iterator over the components. More...
 
void accept (WTOComponentVisitor< GraphT > &v) const override
 Accept the given visitor. More...
 
std::string toString () const override
 Dump the cycle, for debugging purpose. More...
 
- Public Member Functions inherited from SVF::WTOComponent< GraphT >
 WTOComponent (WTOCT k)
 Default constructor. More...
 
 WTOComponent (const WTOComponent &) noexcept=default
 Copy constructor. More...
 
 WTOComponent (WTOComponent &&) noexcept=default
 Move constructor. More...
 
WTOComponentoperator= (const WTOComponent &) noexcept=default
 Copy assignment operator. More...
 
WTOComponentoperator= (WTOComponent &&) noexcept=default
 Move assignment operator. More...
 
virtual ~WTOComponent ()=default
 Destructor. More...
 
WTOCT getKind () const
 

Static Public Member Functions

static bool classof (const WTOCycle< GraphT > *)
 ClassOf. More...
 
static bool classof (const WTOComponent< GraphT > *c)
 

Private Types

typedef const WTOComponentTWTOComponentPtr
 
typedef std::list< WTOComponentPtrWTOComponentRefList
 

Private Attributes

const WTONode< GraphT > * _head
 Head of the cycle. More...
 
WTOComponentRefList _components
 List of components. More...
 

Additional Inherited Members

- Public Attributes inherited from SVF::WTOComponent< GraphT >
WTOCT _type
 

Detailed Description

template<typename GraphT>
class SVF::WTOCycle< GraphT >

WTO cycle for GraphT

Definition at line 380 of file WTO.h.

Member Typedef Documentation

◆ Iterator

template<typename GraphT >
typedef WTOComponentRefList::const_iterator SVF::WTOCycle< GraphT >::Iterator

Iterator over the components.

Definition at line 394 of file WTO.h.

◆ NodeT

template<typename GraphT >
typedef GraphT::NodeType SVF::WTOCycle< GraphT >::NodeT

Definition at line 385 of file WTO.h.

◆ WTOComponentPtr

template<typename GraphT >
typedef const WTOComponentT* SVF::WTOCycle< GraphT >::WTOComponentPtr
private

Definition at line 389 of file WTO.h.

◆ WTOComponentRefList

template<typename GraphT >
typedef std::list<WTOComponentPtr> SVF::WTOCycle< GraphT >::WTOComponentRefList
private

Definition at line 390 of file WTO.h.

◆ WTOComponentT

template<typename GraphT >
typedef WTOComponent<GraphT> SVF::WTOCycle< GraphT >::WTOComponentT

Definition at line 386 of file WTO.h.

Constructor & Destructor Documentation

◆ WTOCycle()

template<typename GraphT >
SVF::WTOCycle< GraphT >::WTOCycle ( const WTONode< GraphT > *  head,
WTOComponentRefList  components 
)
inline

Constructor.

Definition at line 405 of file WTO.h.

406  : WTOComponent<GraphT>(WTOComponent<GraphT>::Cycle), _head(head),
407  _components(std::move(components))
408  {
409  }
const WTONode< GraphT > * head() const
Return the head of the cycle.
Definition: WTO.h:412
const WTONode< GraphT > * _head
Head of the cycle.
Definition: WTO.h:398
WTOComponentRefList _components
List of components.
Definition: WTO.h:401
constexpr std::remove_reference< T >::type && move(T &&t) noexcept
Definition: SVFUtil.h:447

Member Function Documentation

◆ accept()

template<typename GraphT >
void SVF::WTOCycle< GraphT >::accept ( WTOComponentVisitor< GraphT > &  v) const
inlineoverridevirtual

Accept the given visitor.

Implements SVF::WTOComponent< GraphT >.

Definition at line 436 of file WTO.h.

437  {
438  v.visit(*this);
439  }

◆ begin()

template<typename GraphT >
Iterator SVF::WTOCycle< GraphT >::begin ( ) const
inline

Begin iterator over the components.

Definition at line 424 of file WTO.h.

425  {
426  return _components.cbegin();
427  }

◆ classof() [1/2]

template<typename GraphT >
static bool SVF::WTOCycle< GraphT >::classof ( const WTOComponent< GraphT > *  c)
inlinestatic

Definition at line 448 of file WTO.h.

449  {
450  return c->getKind() == WTOComponent<GraphT>::Cycle;
451  }

◆ classof() [2/2]

template<typename GraphT >
static bool SVF::WTOCycle< GraphT >::classof ( const WTOCycle< GraphT > *  )
inlinestatic

ClassOf.

Definition at line 443 of file WTO.h.

444  {
445  return true;
446  }

◆ end()

template<typename GraphT >
Iterator SVF::WTOCycle< GraphT >::end ( ) const
inline

End iterator over the components.

Definition at line 430 of file WTO.h.

431  {
432  return _components.cend();
433  }

◆ getWTOComponents()

template<typename GraphT >
const WTOComponentRefList& SVF::WTOCycle< GraphT >::getWTOComponents ( ) const
inline

Get all wto components in WTO cycle.

Definition at line 418 of file WTO.h.

419  {
420  return _components;
421  }

◆ head()

template<typename GraphT >
const WTONode<GraphT>* SVF::WTOCycle< GraphT >::head ( ) const
inline

Return the head of the cycle.

Definition at line 412 of file WTO.h.

413  {
414  return _head;
415  }

◆ toString()

template<typename GraphT >
std::string SVF::WTOCycle< GraphT >::toString ( ) const
inlineoverridevirtual

Dump the cycle, for debugging purpose.

Implements SVF::WTOComponent< GraphT >.

Definition at line 455 of file WTO.h.

456  {
457  std::string str;
458  std::stringstream rawstr(str);
459  rawstr << "(";
460  rawstr << _head->getICFGNode()->getId() << ", ";
461  for (auto it = begin(), et = end(); it != et;)
462  {
463  rawstr << (*it)->toString();
464  ++it;
465  if (it != et)
466  {
467  rawstr << ", ";
468  }
469  }
470  rawstr << ")";
471  return rawstr.str();
472  }
const char *const string
Definition: cJSON.h:172
Iterator end() const
End iterator over the components.
Definition: WTO.h:430
Iterator begin() const
Begin iterator over the components.
Definition: WTO.h:424

Member Data Documentation

◆ _components

template<typename GraphT >
WTOComponentRefList SVF::WTOCycle< GraphT >::_components
private

List of components.

Definition at line 401 of file WTO.h.

◆ _head

template<typename GraphT >
const WTONode<GraphT>* SVF::WTOCycle< GraphT >::_head
private

Head of the cycle.

Definition at line 398 of file WTO.h.


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