Parses and validates commands for a command-line interface. More...
#include <command_parser.hpp>
Public Member Functions | |
| CommandParser ()=default | |
| Default constructor for CommandParser. | |
| std::string | parser (const std::string &line) |
| Parses and executes a command. | |
Public Attributes | |
| LSMTree | db |
| Database engine instance. | |
Parses and validates commands for a command-line interface.
The CommandParser class provides methods to parse user input, validate commands, and interact with the underlying database engine.
|
default |
Default constructor for CommandParser.
This constructor initializes the CommandParser instance.
|
inline |
Parses and executes a command.
This method takes a command string, splits it into tokens, validates the command, and executes it using the database engine.
| line | The input command string. |
| LSMTree CommandParser::db |
Database engine instance.
This instance is used to interact with the underlying database engine for executing commands.