CLI
class CLI
@brief Command-line interface for WAL++ with argument parsing
Handles: - Argument parsing - File execution - Expression evaluation - REPL startup - Help and version info
Functions
| Name | Description |
|---|---|
| CLI | @brief Initialize CLI with command-line arguments argc : Argument count argv : Argument values |
| run | @brief Run the CLI application Dispatches to appropriate mode: - REPL if no arguments - File execution with -f or filename - Expression evaluation with -e - Pipe file input with --pipe FILE - Standard input with --stdin - Help/version if requested Input modes: - --pipe FILE Read trace data from named pipe file - --stdin Read trace data from standard input Streaming options: - --streaming Enable streaming for large files (auto-detection) - --no-streaming Disable streaming (always use full-load) - --chunk-size SIZE Set chunk size in MB (default: 100) - --cache-capacity NUM Set cache entries per signal (default: 1000) - --cache-stats Show cache statistics after loading Return : Exit code (0 = success, non-zero = error) |
| get_wal | @brief Get WAL instance |
| get_repl | @brief Get REPL instance |
Function Details
CLI
CLI(int argc, const char* argv[])
@brief Initialize CLI with command-line arguments
-
argc - Argument count
-
argv - Argument values
get_repl
std::shared_ptr<REPL> get_repl() const
@brief Get REPL instance
get_wal
std::shared_ptr<Wal> get_wal() const
@brief Get WAL instance
run
int run()
@brief Run the CLI application
Dispatches to appropriate mode: - REPL if no arguments - File execution with -f or filename - Expression evaluation with -e - Pipe file input with --pipe FILE - Standard input with --stdin - Help/version if requested
Input modes: - --pipe FILE Read trace data from named pipe file - --stdin Read trace data from standard input
Streaming options: - --streaming Enable streaming for large files (auto-detection) - --no-streaming Disable streaming (always use full-load) - --chunk-size SIZE Set chunk size in MB (default: 100) - --cache-capacity NUM Set cache entries per signal (default: 1000) - --cache-stats Show cache statistics after loading
- Return
- Exit code (0 = success, non-zero = error)