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

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

#include <OjoState.hpp>

Collaboration diagram for OjoCliOptions:
Collaboration graph

Public Member Functions

void setUserId (const int)
 Set the user id. More...
 
void setGroupId (const int)
 Set the group id. More...
 
bool isVerbosityDebug () const
 Check if verbosity is set. More...
 
bool doJsonOutput () const
 Check if JSON output is required. More...
 
bool doignoreFilesWithMimeType () const
 Check ignore files with particular mimetype is required. More...
 
int getUserId () const
 Get the user running the agent. More...
 
int getGroupId () const
 Get the group running the agent. More...
 
 OjoCliOptions (int verbosity, bool json, bool ignoreFilesWithMimeType)
 Constructor for OjoCliOptions. More...
 
 OjoCliOptions ()
 Default constructor for OjoCliOptions.
 

Private Attributes

int verbosity
 
bool json
 
bool ignoreFilesWithMimeType
 
int userId
 
int groupId
 

Detailed Description

Store the options sent through the CLI.

Definition at line 23 of file OjoState.hpp.

Constructor & Destructor Documentation

◆ OjoCliOptions()

OjoCliOptions::OjoCliOptions ( int  verbosity,
bool  json,
bool  ignoreFilesWithMimeType 
)

Constructor for OjoCliOptions.

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

Definition at line 52 of file OjoState.cc.

Member Function Documentation

◆ doignoreFilesWithMimeType()

bool OjoCliOptions::doignoreFilesWithMimeType ( ) const

Check ignore files with particular mimetype is required.

Returns
True if required, else false

Definition at line 98 of file OjoState.cc.

◆ doJsonOutput()

bool OjoCliOptions::doJsonOutput ( ) const

Check if JSON output is required.

Returns
True if required, else false

Definition at line 89 of file OjoState.cc.

◆ getGroupId()

int OjoCliOptions::getGroupId ( ) const

Get the group running the agent.

Returns
Group id if available, -1 otherwise

Definition at line 134 of file OjoState.cc.

◆ getUserId()

int OjoCliOptions::getUserId ( ) const

Get the user running the agent.

Returns
User id if available, -1 otherwise

Definition at line 125 of file OjoState.cc.

◆ isVerbosityDebug()

bool OjoCliOptions::isVerbosityDebug ( ) const

Check if verbosity is set.

Returns
True if set, else false

Definition at line 80 of file OjoState.cc.

◆ setGroupId()

void OjoCliOptions::setGroupId ( const int  groupId)

Set the group id.

Parameters
groupIdGroup id

Definition at line 116 of file OjoState.cc.

◆ setUserId()

void OjoCliOptions::setUserId ( const int  userId)

Set the user id.

Parameters
userIdUser id

Definition at line 107 of file OjoState.cc.

Member Data Documentation

◆ groupId

int OjoCliOptions::groupId
private

Group running the agent

Definition at line 30 of file OjoState.hpp.

◆ ignoreFilesWithMimeType

bool OjoCliOptions::ignoreFilesWithMimeType
private

Ignore files with particular mimetype

Definition at line 28 of file OjoState.hpp.

◆ json

bool OjoCliOptions::json
private

Whether to generate JSON output

Definition at line 27 of file OjoState.hpp.

◆ userId

int OjoCliOptions::userId
private

User running the agent

Definition at line 29 of file OjoState.hpp.

◆ verbosity

int OjoCliOptions::verbosity
private

The verbosity level

Definition at line 26 of file OjoState.hpp.


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