xale-db 1.0
minimal SQL engine, written in c++
Loading...
Searching...
No Matches
Xale::Client::CLIClient Class Reference

#include <CLIClient.h>

Inheritance diagram for Xale::Client::CLIClient:
Inheritance graph
Collaboration diagram for Xale::Client::CLIClient:
Collaboration graph

Public Member Functions

void start () override
 Starts the CLI client interface.
std::string getInput (bool *isExit) override
 Gets input from the command line.
void displayOutput (const std::string &output) override
 Displays output to the command line.
void close () override
 Closes the CLI client interface.

Member Function Documentation

◆ close()

void Xale::Client::CLIClient::close ( )
overridevirtual

Closes the CLI client interface.

Implements Xale::Client::IClient.

◆ displayOutput()

void Xale::Client::CLIClient::displayOutput ( const std::string & output)
overridevirtual

Displays output to the command line.

Parameters
outputThe output string to be displayed

Implements Xale::Client::IClient.

◆ getInput()

std::string Xale::Client::CLIClient::getInput ( bool * isExit)
overridevirtual

Gets input from the command line.

Handles special commands prefixed with '!':

  • !help : prints a command reference and re-prompts
  • !file <path> : reads a .sql file and returns its contents as the query
Parameters
isExitA pointer to a boolean that will be set to true if the client wants to exit
Returns
The input string from the command line

Implements Xale::Client::IClient.

◆ start()

void Xale::Client::CLIClient::start ( )
overridevirtual

Starts the CLI client interface.

Implements Xale::Client::IClient.


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