Static Value-Flow Analysis
Public Member Functions | Private Attributes | Friends | List of all members
SVF::CondVar< Cond > Class Template Reference

#include <ConditionalPT.h>

Public Member Functions

 CondVar (const Cond &cond, NodeID id)
 Constructor. More...
 
 CondVar (const CondVar &conVar)
 Copy constructor. More...
 
 CondVar ()
 Default constructor. More...
 
 ~CondVar ()
 
CondVaroperator= (const CondVar &rhs)
 
bool operator< (const CondVar &rhs) const
 
const Cond & get_cond () const
 
NodeID get_id () const
 
std::string toString () const
 
bool operator== (const CondVar &rhs) const
 
bool operator!= (const CondVar &rhs) const
 

Private Attributes

Cond m_cond
 
NodeID m_id
 

Friends

OutStreamoperator<< (OutStream &o, const CondVar< Cond > &cvar)
 

Detailed Description

template<class Cond>
class SVF::CondVar< Cond >

Conditional Variable (c,v) A context/path condition A variable NodeID

Definition at line 46 of file ConditionalPT.h.

Constructor & Destructor Documentation

◆ CondVar() [1/3]

template<class Cond >
SVF::CondVar< Cond >::CondVar ( const Cond &  cond,
NodeID  id 
)
inline

Constructor.

Definition at line 50 of file ConditionalPT.h.

50  : m_cond(cond),m_id(id)
51  {
52  }

◆ CondVar() [2/3]

template<class Cond >
SVF::CondVar< Cond >::CondVar ( const CondVar< Cond > &  conVar)
inline

Copy constructor.

Definition at line 54 of file ConditionalPT.h.

54  : m_cond(conVar.m_cond), m_id(conVar.m_id)
55  {
56  }

◆ CondVar() [3/3]

template<class Cond >
SVF::CondVar< Cond >::CondVar ( )
inline

Default constructor.

Definition at line 58 of file ConditionalPT.h.

58 : m_cond(), m_id(0) {}

◆ ~CondVar()

template<class Cond >
SVF::CondVar< Cond >::~CondVar ( )
inline

Definition at line 60 of file ConditionalPT.h.

60 {}

Member Function Documentation

◆ get_cond()

template<class Cond >
const Cond& SVF::CondVar< Cond >::get_cond ( ) const
inline

Definition at line 100 of file ConditionalPT.h.

101  {
102  return m_cond;
103  }

◆ get_id()

template<class Cond >
NodeID SVF::CondVar< Cond >::get_id ( ) const
inline

Definition at line 104 of file ConditionalPT.h.

105  {
106  return m_id;
107  }

◆ operator!=()

template<class Cond >
bool SVF::CondVar< Cond >::operator!= ( const CondVar< Cond > &  rhs) const
inline

Definition at line 71 of file ConditionalPT.h.

72  {
73  return !(*this == rhs);
74  }

◆ operator<()

template<class Cond >
bool SVF::CondVar< Cond >::operator< ( const CondVar< Cond > &  rhs) const
inline

Less than implementation.

Definition at line 92 of file ConditionalPT.h.

93  {
94  if(m_id != rhs.get_id())
95  return m_id < rhs.get_id();
96  else
97  return m_cond < rhs.get_cond();
98  }

◆ operator=()

template<class Cond >
CondVar& SVF::CondVar< Cond >::operator= ( const CondVar< Cond > &  rhs)
inline

Definition at line 78 of file ConditionalPT.h.

79  {
80  if(*this!=rhs)
81  {
82  m_cond = rhs.get_cond();
83  m_id = rhs.get_id();
84  }
85  return *this;
86  }

◆ operator==()

template<class Cond >
bool SVF::CondVar< Cond >::operator== ( const CondVar< Cond > &  rhs) const
inline

Comparison between two elements.

Definition at line 66 of file ConditionalPT.h.

67  {
68  return (m_id == rhs.get_id() && m_cond == rhs.get_cond());
69  }

◆ toString()

template<class Cond >
std::string SVF::CondVar< Cond >::toString ( ) const
inline

Definition at line 109 of file ConditionalPT.h.

110  {
111  std::string str;
112  std::stringstream rawstr(str);
113  rawstr << "<" << m_id << " " << m_cond.toString() << "> ";
114  return rawstr.str();
115  }
const char *const string
Definition: cJSON.h:172

Friends And Related Function Documentation

◆ operator<<

template<class Cond >
OutStream& operator<< ( OutStream o,
const CondVar< Cond > &  cvar 
)
friend

Definition at line 117 of file ConditionalPT.h.

118  {
119  o << cvar.toString();
120  return o;
121  }

Member Data Documentation

◆ m_cond

template<class Cond >
Cond SVF::CondVar< Cond >::m_cond
private

Definition at line 123 of file ConditionalPT.h.

◆ m_id

template<class Cond >
NodeID SVF::CondVar< Cond >::m_id
private

Definition at line 124 of file ConditionalPT.h.


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