Struct CommandContext¶
Defined in File command_system.h
Struct Documentation¶
-
struct CommandContext¶
Complete context and parameters for command execution.
This structure contains all parameters, options, and state information needed to execute any command in the ComChemKit. It serves as the primary communication mechanism between command parsing and execution.
The structure is organized into logical groups:
Core command identification
Common parameters shared across commands
Runtime state and configuration
Public Functions
-
inline CommandContext()¶
Default constructor with built-in fallback values.
Initializes all parameters with sensible defaults. These defaults are later overridden by configuration file values and command-line options. The initialization order is: defaults → config file → command line.
Note
Configuration defaults are applied via apply_config_defaults() after the configuration system is initialized
-
void apply_config_defaults()¶
Apply configuration file defaults to context parameters.
Updates context parameters with values from the loaded configuration file. This method is called after configuration loading to apply user preferences while preserving any command-line overrides that were already applied.
Note
This method should be called after configuration loading but before final parameter validation
Public Members
-
CommandType command¶
The command to execute.
-
bool quiet¶
Suppress non-essential output.
-
unsigned int requested_threads¶
Number of threads requested by user.
-
size_t max_file_size_mb¶
Maximum individual file size in MB.
-
size_t batch_size¶
Batch size for processing large directories (0 = auto)
-
std::string extension¶
File extension to process (default: “.log”)
-
std::vector<std::string> valid_extensions¶
List of valid file extensions (e.g {“.log”, “.out”})
-
std::vector<std::string> files¶
List of input files to process.
-
std::vector<std::string> warnings¶
Collected warnings from parsing.
-
JobResources job_resources¶
Job scheduler resource information.