ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CommandLineParser Class Referencefinal

Encapsulates Qt command line parsing for the application. More...

#include <CommandLineParser.hpp>

Collaboration diagram for CommandLineParser:
Collaboration graph

Public Member Functions

 CommandLineParser ()
 Construct the parser and configure all options.
 
void process (const QCoreApplication &app)
 Process command line arguments.
 
std::optional< utility::log::logging_optionsloggingOptions () const
 Get logging configuration based on parsed options.
 
bool isLoggingEnabled () const
 Check if logging is enabled.
 
bool isCompressionEnabled () const
 Check if compression is enabled.
 
std::uint8_t supportedCompression () const
 Get the supported compression bitmask based on parsed options.
 

Detailed Description

Encapsulates Qt command line parsing for the application.

Provides a clean interface for parsing command line options and extracting configuration values.

Member Function Documentation

◆ process()

void process ( const QCoreApplication &  app)

Process command line arguments.

Parameters
appThe Qt application instance

◆ loggingOptions()

std::optional< utility::log::logging_options > loggingOptions ( ) const

Get logging configuration based on parsed options.

Returns std::nullopt if –log-enabled is not set, which disables logging.

Returns
Logging options configured from command line arguments

◆ supportedCompression()

std::uint8_t supportedCompression ( ) const

Get the supported compression bitmask based on parsed options.

Returns the bitmask value for use in client_options.supported_compression. If compression is disabled, returns 0. If a specific algorithm is selected, returns just that bit. If "all" is selected (default), returns COMPRESSION_SUPPORT_ALL.

Returns
Compression support bitmask