CHashTable 1
Loading...
Searching...
No Matches
interactive_mode.h File Reference

Argument parser API for interactive mode. More...

Include dependency graph for interactive_mode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ParsedInput
 Interactive mode command line input. More...
 

Enumerations

enum  Command {
  CMD_INVALID , CMD_ADD , CMD_GET , CMD_DEL ,
  CMD_SAVE , CMD_LOAD , CMD_PRINT , CMD_EXIT ,
  CMD_HELP
}
 Interactive mode commands.
 

Functions

ParsedInput get_input (FILE *input_stream, FILE *output_stream)
 Prompts user for interactive mode command and arguments.
 

Variables

constexpr ColorCode PROMPT_COLOR = COLOR_BLUE
 Default interactive mode prompt color.
 
constexpr ColorCode OUTPUT_COLOR = COLOR_GREEN
 Default interactive mode output color.
 
constexpr ColorCode ERROR_COLOR = COLOR_BOLD_RED
 Default interactive mode error color.
 

Detailed Description

Argument parser API for interactive mode.

Function Documentation

◆ get_input()

ParsedInput get_input ( FILE *  input_stream,
FILE *  output_stream 
)

Prompts user for interactive mode command and arguments.

Parameters
input_streamStream to get the input from
output_streamStream to print to
Returns
ParsedInput object with parsed command and argument