Cppcheck
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
Analyzer::Action Struct Reference

#include <analyzer.h>

Public Types

enum  {
  None = 0 , Read = (1 << 0) , Write = (1 << 1) , Invalid = (1 << 2) ,
  Inconclusive = (1 << 3) , Match = (1 << 4) , Idempotent = (1 << 5) , Incremental = (1 << 6) ,
  SymbolicMatch = (1 << 7) , Internal = (1 << 8)
}
 

Public Member Functions

 Action ()=default
 
 Action (const Action &)=default
 
Actionoperator= (const Action &rhs)=default
 
template<class T , REQUIRES("T must be convertible to unsigned int", std::is_convertible< T, unsigned int >) , REQUIRES("T must not be a bool", !std::is_same< T, bool >) >
 Action (T f)
 
void set (unsigned int f, bool state=true)
 
bool get (unsigned int f) const
 
bool isRead () const
 
bool isWrite () const
 
bool isInvalid () const
 
bool isInconclusive () const
 
bool isNone () const
 
bool isModified () const
 
bool isIdempotent () const
 
bool isIncremental () const
 
bool isSymbolicMatch () const
 
bool isInternal () const
 
bool matches () const
 
Actionoperator|= (Action a)
 

Private Attributes

unsigned int mFlag {}
 

Friends

Action operator| (Action a, Action b)
 
bool operator== (Action a, Action b)
 
bool operator!= (Action a, Action b)
 

Detailed Description

Definition at line 33 of file analyzer.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
None 
Read 
Write 
Invalid 
Inconclusive 
Match 
Idempotent 
Incremental 
SymbolicMatch 
Internal 

Definition at line 46 of file analyzer.h.

Constructor & Destructor Documentation

◆ Action() [1/3]

Analyzer::Action::Action ( )
default

◆ Action() [2/3]

Analyzer::Action::Action ( const Action )
default

◆ Action() [3/3]

template<class T , REQUIRES("T must be convertible to unsigned int", std::is_convertible< T, unsigned int >) , REQUIRES("T must not be a bool", !std::is_same< T, bool >) >
Analyzer::Action::Action ( f)
inline

Definition at line 43 of file analyzer.h.

Member Function Documentation

◆ get()

bool Analyzer::Action::get ( unsigned int  f) const
inline

◆ isIdempotent()

bool Analyzer::Action::isIdempotent ( ) const
inline

Definition at line 91 of file analyzer.h.

References get(), and Idempotent.

◆ isInconclusive()

bool Analyzer::Action::isInconclusive ( ) const
inline

Definition at line 79 of file analyzer.h.

References get(), and Inconclusive.

Referenced by ValueFlowAnalyzer::analyzeToken(), and ValueFlowAnalyzer::update().

◆ isIncremental()

bool Analyzer::Action::isIncremental ( ) const
inline

Definition at line 95 of file analyzer.h.

References get(), and Incremental.

◆ isInternal()

bool Analyzer::Action::isInternal ( ) const
inline

Definition at line 103 of file analyzer.h.

References get(), and Internal.

Referenced by ValueFlowAnalyzer::update().

◆ isInvalid()

bool Analyzer::Action::isInvalid ( ) const
inline

Definition at line 75 of file analyzer.h.

References get(), and Invalid.

Referenced by isModified().

◆ isModified()

bool Analyzer::Action::isModified ( ) const
inline

◆ isNone()

bool Analyzer::Action::isNone ( ) const
inline

Definition at line 83 of file analyzer.h.

References mFlag, and None.

◆ isRead()

bool Analyzer::Action::isRead ( ) const
inline

Definition at line 67 of file analyzer.h.

References get(), and Read.

Referenced by ValueFlowAnalyzer::analyzeToken(), and ValueFlowAnalyzer::update().

◆ isSymbolicMatch()

bool Analyzer::Action::isSymbolicMatch ( ) const
inline

Definition at line 99 of file analyzer.h.

References get(), and SymbolicMatch.

Referenced by ValueFlowAnalyzer::update().

◆ isWrite()

bool Analyzer::Action::isWrite ( ) const
inline

Definition at line 71 of file analyzer.h.

References get(), and Write.

Referenced by isModified(), and ValueFlowAnalyzer::update().

◆ matches()

bool Analyzer::Action::matches ( ) const
inline

Definition at line 107 of file analyzer.h.

References get(), and Match.

Referenced by ValueFlowAnalyzer::analyzeToken().

◆ operator=()

Action& Analyzer::Action::operator= ( const Action rhs)
default

◆ operator|=()

Action& Analyzer::Action::operator|= ( Action  a)
inline

Definition at line 111 of file analyzer.h.

References mFlag, and set().

◆ set()

void Analyzer::Action::set ( unsigned int  f,
bool  state = true 
)
inline

Definition at line 59 of file analyzer.h.

References mFlag.

Referenced by operator|=().

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( Action  a,
Action  b 
)
friend

Definition at line 125 of file analyzer.h.

◆ operator==

bool operator== ( Action  a,
Action  b 
)
friend

Definition at line 121 of file analyzer.h.

◆ operator|

Action operator| ( Action  a,
Action  b 
)
friend

Definition at line 116 of file analyzer.h.

Member Data Documentation

◆ mFlag

unsigned int Analyzer::Action::mFlag {}
private

Definition at line 130 of file analyzer.h.

Referenced by get(), isNone(), operator|=(), and set().


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