Cppcheck
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ConditionHandler Struct Referenceabstract
Inheritance diagram for ConditionHandler:
ContainerConditionHandler SimpleConditionHandler IteratorConditionHandler SymbolicConditionHandler

Classes

struct  Condition
 

Public Member Functions

virtual std::vector< Conditionparse (const Token *tok, const Settings &settings) const =0
 
virtual Analyzer::Result forward (Token *start, const Token *stop, const Token *exprTok, const std::list< ValueFlow::Value > &values, TokenList &tokenlist, ErrorLogger &errorLogger, const Settings &settings, SourceLocation loc=SourceLocation::current()) const
 
virtual Analyzer::Result forward (Token *top, const Token *exprTok, const std::list< ValueFlow::Value > &values, TokenList &tokenlist, ErrorLogger &errorLogger, const Settings &settings, SourceLocation loc=SourceLocation::current()) const
 
virtual void reverse (Token *start, const Token *endToken, const Token *exprTok, const std::list< ValueFlow::Value > &values, TokenList &tokenlist, ErrorLogger &errorLogger, const Settings &settings, SourceLocation loc=SourceLocation::current()) const
 
void traverseCondition (const SymbolDatabase &symboldatabase, const Settings &settings, const std::set< const Scope * > &skippedFunctions, const std::function< void(const Condition &cond, Token *tok, const Scope *scope)> &f) const
 
void beforeCondition (TokenList &tokenlist, const SymbolDatabase &symboldatabase, ErrorLogger &errorLogger, const Settings &settings, const std::set< const Scope * > &skippedFunctions) const
 
void afterCondition (TokenList &tokenlist, const SymbolDatabase &symboldatabase, ErrorLogger &errorLogger, const Settings &settings, const std::set< const Scope * > &skippedFunctions) const
 
virtual ~ConditionHandler ()=default
 
 ConditionHandler (const ConditionHandler &)=default
 

Static Public Member Functions

static TokenskipNotAndCasts (Token *tok, bool *inverted=nullptr)
 
static void fillFromPath (ProgramMemory &pm, const Token *top, MathLib::bigint path, const Settings &settings)
 

Protected Member Functions

 ConditionHandler ()=default
 

Detailed Description

Definition at line 6292 of file valueflow.cpp.

Constructor & Destructor Documentation

◆ ~ConditionHandler()

virtual ConditionHandler::~ConditionHandler ( )
virtualdefault

◆ ConditionHandler() [1/2]

ConditionHandler::ConditionHandler ( const ConditionHandler )
default

◆ ConditionHandler() [2/2]

ConditionHandler::ConditionHandler ( )
protecteddefault

Member Function Documentation

◆ afterCondition()

void ConditionHandler::afterCondition ( TokenList tokenlist,
const SymbolDatabase symboldatabase,
ErrorLogger errorLogger,
const Settings settings,
const std::set< const Scope * > &  skippedFunctions 
) const
inline

◆ beforeCondition()

void ConditionHandler::beforeCondition ( TokenList tokenlist,
const SymbolDatabase symboldatabase,
ErrorLogger errorLogger,
const Settings settings,
const std::set< const Scope * > &  skippedFunctions 
) const
inline

◆ fillFromPath()

static void ConditionHandler::fillFromPath ( ProgramMemory pm,
const Token top,
MathLib::bigint  path,
const Settings settings 
)
inlinestatic

◆ forward() [1/2]

virtual Analyzer::Result ConditionHandler::forward ( Token start,
const Token stop,
const Token exprTok,
const std::list< ValueFlow::Value > &  values,
TokenList tokenlist,
ErrorLogger errorLogger,
const Settings settings,
SourceLocation  loc = SourceLocation::current() 
) const
inlinevirtual

Definition at line 6360 of file valueflow.cpp.

References Token::next(), and valueFlowForward().

◆ forward() [2/2]

virtual Analyzer::Result ConditionHandler::forward ( Token top,
const Token exprTok,
const std::list< ValueFlow::Value > &  values,
TokenList tokenlist,
ErrorLogger errorLogger,
const Settings settings,
SourceLocation  loc = SourceLocation::current() 
) const
inlinevirtual

Definition at line 6372 of file valueflow.cpp.

References valueFlowForwardRecursive().

◆ parse()

virtual std::vector<Condition> ConditionHandler::parse ( const Token tok,
const Settings settings 
) const
pure virtual

◆ reverse()

virtual void ConditionHandler::reverse ( Token start,
const Token endToken,
const Token exprTok,
const std::list< ValueFlow::Value > &  values,
TokenList tokenlist,
ErrorLogger errorLogger,
const Settings settings,
SourceLocation  loc = SourceLocation::current() 
) const
inlinevirtual

Definition at line 6383 of file valueflow.cpp.

References valueFlowReverse().

Referenced by beforeCondition().

◆ skipNotAndCasts()

static Token* ConditionHandler::skipNotAndCasts ( Token tok,
bool *  inverted = nullptr 
)
inlinestatic

◆ traverseCondition()

void ConditionHandler::traverseCondition ( const SymbolDatabase symboldatabase,
const Settings settings,
const std::set< const Scope * > &  skippedFunctions,
const std::function< void(const Condition &cond, Token *tok, const Scope *scope)> &  f 
) const
inline

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