inLimbo
TUI Music Player that keeps you in Limbo.
 
Loading...
Searching...
No Matches
ArgumentHandler Class Reference

Handles processing of command-line arguments and executes corresponding actions. More...

#include <arg-handler.hpp>

Classes

struct  Paths
 Represents essential application paths. More...
 

Static Public Member Functions

static void handleArguments (const CommandLineArgs &cmdArgs, const std::string &programName, const Paths &paths)
 Handles command-line arguments and executes corresponding actions.
 
static auto processSongTreeArguments (SongTree &song_tree) -> void
 

Static Public Attributes

static SongTreeState song_tree_parse_state = {}
 

Detailed Description

Handles processing of command-line arguments and executes corresponding actions.

The ArgumentHandler class is responsible for parsing command-line arguments, executing predefined actions for valid flags, and managing application paths. It also includes utilities for colorful console output.

Member Function Documentation

◆ handleArguments()

static void ArgumentHandler::handleArguments ( const CommandLineArgs & cmdArgs,
const std::string & programName,
const Paths & paths )
inlinestatic

Handles command-line arguments and executes corresponding actions.

This method processes all valid flags provided through the CommandLineArgs object and invokes the corresponding handler functions. For unsupported flags, an error message is displayed.

Parameters
cmdArgsThe CommandLineArgs object containing parsed command-line arguments.
programNameThe name of the program (typically argv[0]).
pathsThe application paths required for handling certain flags.

◆ processSongTreeArguments()

static auto ArgumentHandler::processSongTreeArguments ( SongTree & song_tree) -> void
inlinestatic

Member Data Documentation

◆ song_tree_parse_state

SongTreeState ArgumentHandler::song_tree_parse_state = {}
inlinestatic

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