FOSSology  3.2.0rc1
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 34 of file copyrightState.hpp.

Constructor & Destructor Documentation

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 58 of file copyrightState.cc.

Member Function Documentation

void CliOptions::addScanner ( scanner sc)

Add scanner to CliOptions.

Parameters
scScanner to be added

Definition at line 118 of file copyrightState.cc.

bool CliOptions::doignoreFilesWithMimeType ( ) const

Check to ignore files with particular mimetype.

Returns
True if required, else false

Definition at line 136 of file copyrightState.cc.

bool CliOptions::doJsonOutput ( ) const

Check if JSON output is required.

Returns
True if required, else false

Definition at line 127 of file copyrightState.cc.

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

Get scanner s set by CliOptions.

Returns
List of scanners

Definition at line 100 of file copyrightState.cc.

unsigned int CliOptions::getOptType ( ) const

Get the opt type set by CliOptions.

Returns
The opt type

Definition at line 82 of file copyrightState.cc.

bool CliOptions::isVerbosityDebug ( ) const

Check if verbosity is set.

Returns
True if set, else false

Definition at line 109 of file copyrightState.cc.

Member Data Documentation

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

List of available scanners

Definition at line 41 of file copyrightState.hpp.

bool CliOptions::ignoreFilesWithMimeType
private

Whether to ignore files with particular mimetype

Definition at line 40 of file copyrightState.hpp.

bool CliOptions::json
private

Whether to generate JSON output

Definition at line 39 of file copyrightState.hpp.

unsigned int CliOptions::optType
private

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

Definition at line 38 of file copyrightState.hpp.

int CliOptions::verbosity
private

The verbosity level

Definition at line 37 of file copyrightState.hpp.


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