FOSSology  4.4.0
Open Source License Compliance by Open Source Software
CliOptions Class Reference

Store the options sent through the CLI. More...

#include <copyrightState.hpp>

Collaboration diagram for CliOptions:
Collaboration graph

Public Member Functions

bool isVerbosityDebug () const
 Check if verbosity is set. More...
 
unsigned int getOptType () const
 Get the opt type set by CliOptions. More...
 
bool doJsonOutput () const
 Check if JSON output is required. More...
 
bool doignoreFilesWithMimeType () const
 Check to ignore files with particular mimetype. More...
 
void addScanner (scanner *regexDesc)
 Add scanner to CliOptions. More...
 
std::list< unptr::shared_ptr< scanner > > extractScanners ()
 Get scanner s set by CliOptions. More...
 
 CliOptions (int verbosity, unsigned int type, bool json, bool ignoreFilesWithMimeType)
 Constructor for CliOptions. More...
 
 CliOptions ()
 Default constructor for CliOptions.
 

Private Attributes

int verbosity
 
unsigned int optType
 
bool json
 
bool ignoreFilesWithMimeType
 
std::list< unptr::shared_ptr< scanner > > cliScanners
 

Detailed Description

Store the options sent through the CLI.

Definition at line 23 of file copyrightState.hpp.

Constructor & Destructor Documentation

◆ CliOptions()

CliOptions::CliOptions ( int  verbosity,
unsigned int  type,
bool  json,
bool  ignoreFilesWithMimeType 
)

Constructor for CliOptions.

Parameters
verbosityVerbosity set by CLI
typeType set by CLI
jsonTrue to get output in JSON format
ignoreFilesWithMimeTypeTrue to ignore files with particular mimetype

Definition at line 47 of file copyrightState.cc.

Member Function Documentation

◆ addScanner()

void CliOptions::addScanner ( scanner sc)

Add scanner to CliOptions.

Parameters
scScanner to be added

Definition at line 107 of file copyrightState.cc.

◆ doignoreFilesWithMimeType()

bool CliOptions::doignoreFilesWithMimeType ( ) const

Check to ignore files with particular mimetype.

Returns
True if required, else false

Definition at line 125 of file copyrightState.cc.

◆ doJsonOutput()

bool CliOptions::doJsonOutput ( ) const

Check if JSON output is required.

Returns
True if required, else false

Definition at line 116 of file copyrightState.cc.

◆ extractScanners()

std::list< unptr::shared_ptr< scanner > > CliOptions::extractScanners ( )

Get scanner s set by CliOptions.

Returns
List of scanners

Definition at line 89 of file copyrightState.cc.

◆ getOptType()

unsigned int CliOptions::getOptType ( ) const

Get the opt type set by CliOptions.

Returns
The opt type

Definition at line 71 of file copyrightState.cc.

◆ isVerbosityDebug()

bool CliOptions::isVerbosityDebug ( ) const

Check if verbosity is set.

Returns
True if set, else false

Definition at line 98 of file copyrightState.cc.

Member Data Documentation

◆ cliScanners

std::list<unptr::shared_ptr<scanner> > CliOptions::cliScanners
private

List of available scanners

Definition at line 30 of file copyrightState.hpp.

◆ ignoreFilesWithMimeType

bool CliOptions::ignoreFilesWithMimeType
private

Whether to ignore files with particular mimetype

Definition at line 29 of file copyrightState.hpp.

◆ json

bool CliOptions::json
private

Whether to generate JSON output

Definition at line 28 of file copyrightState.hpp.

◆ optType

unsigned int CliOptions::optType
private

Scan type (2 => url, 4 => email, 8 => author, 16 => ecc)

Definition at line 27 of file copyrightState.hpp.

◆ verbosity

int CliOptions::verbosity
private

The verbosity level

Definition at line 26 of file copyrightState.hpp.


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