retdec
Public Member Functions | Private Member Functions | Private Attributes | List of all members
retdec::llvmir2hll::CLIPatternFinderRunner Class Reference

Runner of pattern finders for the command line interface (CLI). More...

#include <cli_pattern_finder_runner.h>

Inheritance diagram for retdec::llvmir2hll::CLIPatternFinderRunner:
Inheritance graph
[legend]
Collaboration diagram for retdec::llvmir2hll::CLIPatternFinderRunner:
Collaboration graph
[legend]

Public Member Functions

 CLIPatternFinderRunner (utils::io::Logger &os)
 Constructs a runner of pattern finders. More...
 
- Public Member Functions inherited from retdec::llvmir2hll::PatternFinderRunner
virtual ~PatternFinderRunner ()=default
 
void run (const PatternFinders &pfs, ShPtr< Module > module)
 Runs all the given pattern finders in pfs on module. More...
 
void run (ShPtr< PatternFinder > pf, ShPtr< Module > module)
 Runs the given pattern finder pf on module. More...
 

Private Member Functions

virtual void doActionsBeforePatternFinderRuns (ShPtr< PatternFinder > pf) override
 Prints a sub-phase saying that the given finder is run. More...
 
virtual void doActionsAfterPatternFinderHasRun (ShPtr< PatternFinder > pf, const PatternFinder::Patterns &foundPatterns) override
 Prints the found patterns of the given finder. More...
 
void printPatternInfo (const ShPtr< Pattern > &p)
 Prints information about the given pattern. More...
 

Private Attributes

utils::io::Loggeros
 Output stream, into which the patterns will be emitted. More...
 

Additional Inherited Members

- Public Types inherited from retdec::llvmir2hll::PatternFinderRunner
using PatternFinders = std::vector< ShPtr< PatternFinder > >
 A container storing pattern finders. More...
 

Detailed Description

Runner of pattern finders for the command line interface (CLI).

It prints information on the command line.

Instances of this class have reference object semantics.

Constructor & Destructor Documentation

◆ CLIPatternFinderRunner()

retdec::llvmir2hll::CLIPatternFinderRunner::CLIPatternFinderRunner ( utils::io::Logger os)

Constructs a runner of pattern finders.

Parameters
[out]osOutput stream, into which the patterns will be emited.

Member Function Documentation

◆ doActionsAfterPatternFinderHasRun()

void retdec::llvmir2hll::CLIPatternFinderRunner::doActionsAfterPatternFinderHasRun ( ShPtr< PatternFinder pf,
const PatternFinder::Patterns foundPatterns 
)
overrideprivatevirtual

Prints the found patterns of the given finder.

Implements retdec::llvmir2hll::PatternFinderRunner.

◆ doActionsBeforePatternFinderRuns()

void retdec::llvmir2hll::CLIPatternFinderRunner::doActionsBeforePatternFinderRuns ( ShPtr< PatternFinder pf)
overrideprivatevirtual

Prints a sub-phase saying that the given finder is run.

The ID of the finder is included in the output.

Implements retdec::llvmir2hll::PatternFinderRunner.

◆ printPatternInfo()

void retdec::llvmir2hll::CLIPatternFinderRunner::printPatternInfo ( const ShPtr< Pattern > &  p)
private

Prints information about the given pattern.

Member Data Documentation

◆ os

utils::io::Logger& retdec::llvmir2hll::CLIPatternFinderRunner::os
private

Output stream, into which the patterns will be emitted.


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