CHashTable 1
Loading...
Searching...
No Matches
interactive_mode.h
Go to the documentation of this file.
1
6#ifndef CHASHTABLE_INTERACTIVE_MODE_H
7#define CHASHTABLE_INTERACTIVE_MODE_H
8
9#include "../fprintf_color/fprintf_color.h"
10
12constexpr ColorCode PROMPT_COLOR = COLOR_BLUE;
14constexpr ColorCode OUTPUT_COLOR = COLOR_GREEN;
16constexpr ColorCode ERROR_COLOR = COLOR_BOLD_RED;
17
21typedef enum {
22 CMD_INVALID,
23 CMD_ADD,
24 CMD_GET,
25 CMD_DEL,
26 CMD_SAVE,
27 CMD_LOAD,
28 CMD_PRINT,
29 CMD_EXIT,
30 CMD_HELP
31} Command;
32
38typedef struct {
40 int arg_key;
43
50ParsedInput get_input(FILE *input_stream, FILE *output_stream);
51
52#endif //CHASHTABLE_INTERACTIVE_MODE_H
ColorCode
Print colors for printf_color()
Definition fprintf_color.h:12
constexpr ColorCode OUTPUT_COLOR
Default interactive mode output color.
Definition interactive_mode.h:14
ParsedInput get_input(FILE *input_stream, FILE *output_stream)
Prompts user for interactive mode command and arguments.
Definition argument_parser.c:51
Command
Interactive mode commands.
Definition interactive_mode.h:21
constexpr ColorCode PROMPT_COLOR
Default interactive mode prompt color.
Definition interactive_mode.h:12
constexpr ColorCode ERROR_COLOR
Default interactive mode error color.
Definition interactive_mode.h:16
Interactive mode command line input.
Definition interactive_mode.h:38
int arg_value
Definition interactive_mode.h:41
int arg_key
Definition interactive_mode.h:40
Command cmd
Definition interactive_mode.h:39