File Scanner 1.0.0
A high-performance C++ malicious file scanner.
Loading...
Searching...
No Matches
scanner::IScannerBuilder Class Referenceabstract

An interface for a builder that constructs a configured IScanner. More...

#include <interfaces.h>

Inheritance diagram for scanner::IScannerBuilder:
Inheritance graph
Collaboration diagram for scanner::IScannerBuilder:
Collaboration graph

Public Member Functions

virtual ~IScannerBuilder ()=default
 
virtual IScannerBuilderWithMd5Hasher ()=0
 Configures the scanner to use an MD5 file hasher.
 
virtual IScannerBuilderWithCsvDatabase (const std::filesystem::path &path)=0
 Configures the hash database from a CSV file.
 
virtual IScannerBuilderWithFileLogger (const std::filesystem::path &path)=0
 Configures the logger to write to a file.
 
virtual IScannerBuilderWithThreads (std::size_t num_threads)=0
 Sets the number of threads for the scanner.
 
virtual std::unique_ptr< IScannerBuild ()=0
 Builds the final IScanner instance.
 

Detailed Description

An interface for a builder that constructs a configured IScanner.

Constructor & Destructor Documentation

◆ ~IScannerBuilder()

virtual scanner::IScannerBuilder::~IScannerBuilder ( )
virtualdefault

Member Function Documentation

◆ Build()

virtual std::unique_ptr< IScanner > scanner::IScannerBuilder::Build ( )
pure virtual

Builds the final IScanner instance.

Returns
A unique pointer to the configured IScanner.
Exceptions
std::runtime_errorif dependencies are missing or fail to load.

Implemented in scanner::ScannerBuilder.

◆ WithCsvDatabase()

virtual IScannerBuilder & scanner::IScannerBuilder::WithCsvDatabase ( const std::filesystem::path &  path)
pure virtual

Configures the hash database from a CSV file.

Parameters
pathThe path to the CSV file.
Returns
A reference to this builder for chaining.

Implemented in scanner::ScannerBuilder.

◆ WithFileLogger()

virtual IScannerBuilder & scanner::IScannerBuilder::WithFileLogger ( const std::filesystem::path &  path)
pure virtual

Configures the logger to write to a file.

Parameters
pathThe path to the log file.
Returns
A reference to this builder for chaining.

Implemented in scanner::ScannerBuilder.

◆ WithMd5Hasher()

virtual IScannerBuilder & scanner::IScannerBuilder::WithMd5Hasher ( )
pure virtual

Configures the scanner to use an MD5 file hasher.

Returns
A reference to this builder for chaining.

Implemented in scanner::ScannerBuilder.

◆ WithThreads()

virtual IScannerBuilder & scanner::IScannerBuilder::WithThreads ( std::size_t  num_threads)
pure virtual

Sets the number of threads for the scanner.

Parameters
num_threadsThe number of threads to use.
Returns
A reference to this builder for chaining.

Implemented in scanner::ScannerBuilder.


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