|
ORE Studio 0.0.4
|
Encapsulates Qt command line parsing for the application. More...
#include <CommandLineParser.hpp>

Public Member Functions | |
| CommandLineParser () | |
| Construct the parser and configure all options. | |
| void | process (const QCoreApplication &app) |
| Process command line arguments. | |
| std::optional< logging::logging_options > | loggingOptions () 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. | |
| QString | instanceName () const |
| Get the instance name for identifying this application instance. | |
| QColor | instanceColor () const |
| Get the instance color for the title bar. | |
Encapsulates Qt command line parsing for the application.
Provides a clean interface for parsing command line options and extracting configuration values.
| void process | ( | const QCoreApplication & | app | ) |
Process command line arguments.
| app | The Qt application instance |
| std::optional< logging::logging_options > loggingOptions | ( | ) | const |
Get logging configuration based on parsed options.
Returns std::nullopt if –log-enabled is not set, which disables logging.
| 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.
| QString instanceName | ( | ) | const |
Get the instance name for identifying this application instance.
Used when running multiple instances for testing or debugging. Returns empty string if not specified.
| QColor instanceColor | ( | ) | const |
Get the instance color for the title bar.
Returns the color specified via –instance-color as a QColor. Returns an invalid color (QColor()) if not specified.