Joedb 10.5.0
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
joedb::Command_Interpreter Class Reference

#include <joedb/ui/Command_Interpreter.h>

Inheritance diagram for joedb::Command_Interpreter:
Collaboration diagram for joedb::Command_Interpreter:

Public Member Functions

 Command_Interpreter ()
void add_processor (Command_Processor &processor)
void set_parent (const Command_Interpreter *new_parent)
void set_prompt_string (std::string s)
virtual void write_prompt (std::ostream &out) const
void write_whole_prompt (std::ostream &out) const
void set_echo (bool new_echo)
void set_rethrow (bool new_rethrow)
void set_prompt (bool new_prompt)
void main_loop (std::istream &in, std::ostream &out)
bool is_last_line_empty () const
Public Member Functions inherited from joedb::Command_Processor
virtual ~Command_Processor ()

Protected Member Functions

Status process_command (std::string_view command, std::istream &parameters, std::istream &in, std::ostream &out) override

Additional Inherited Members

Public Types inherited from joedb::Command_Processor
enum class  Status {
  ok , done , quit , abort ,
  not_found
}

Detailed Description

Definition at line 14 of file Command_Interpreter.h.

Constructor & Destructor Documentation

◆ Command_Interpreter()

joedb::Command_Interpreter::Command_Interpreter ( )

Definition at line 115 of file Command_Interpreter.cpp.

Member Function Documentation

◆ add_processor()

void joedb::Command_Interpreter::add_processor ( Command_Processor & processor)

Definition at line 122 of file Command_Interpreter.cpp.

◆ is_last_line_empty()

bool joedb::Command_Interpreter::is_last_line_empty ( ) const
inline

Definition at line 56 of file Command_Interpreter.h.

◆ main_loop()

void joedb::Command_Interpreter::main_loop ( std::istream & in,
std::ostream & out )

Definition at line 166 of file Command_Interpreter.cpp.

◆ process_command()

Command_Processor::Status joedb::Command_Interpreter::process_command ( std::string_view command,
std::istream & parameters,
std::istream & in,
std::ostream & out )
overrideprotectedvirtual

Implements joedb::Command_Processor.

Reimplemented in joedb::Writable_Client_Command_Processor.

Definition at line 37 of file Command_Interpreter.cpp.

◆ set_echo()

void joedb::Command_Interpreter::set_echo ( bool new_echo)
inline

Definition at line 52 of file Command_Interpreter.h.

◆ set_parent()

void joedb::Command_Interpreter::set_parent ( const Command_Interpreter * new_parent)

Definition at line 129 of file Command_Interpreter.cpp.

◆ set_prompt()

void joedb::Command_Interpreter::set_prompt ( bool new_prompt)
inline

Definition at line 54 of file Command_Interpreter.h.

◆ set_prompt_string()

void joedb::Command_Interpreter::set_prompt_string ( std::string s)
inline

Definition at line 49 of file Command_Interpreter.h.

◆ set_rethrow()

void joedb::Command_Interpreter::set_rethrow ( bool new_rethrow)
inline

Definition at line 53 of file Command_Interpreter.h.

◆ write_prompt()

void joedb::Command_Interpreter::write_prompt ( std::ostream & out) const
virtual

Reimplemented in joedb::Client_Command_Processor.

Definition at line 143 of file Command_Interpreter.cpp.

◆ write_whole_prompt()

void joedb::Command_Interpreter::write_whole_prompt ( std::ostream & out) const

Definition at line 150 of file Command_Interpreter.cpp.


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