Handles input for set operations.
More...
#include <input_handler.hpp>
Handles input for set operations.
Priority:
- stdin (if redirected or piped, i.e., !isatty(STDIN_FILENO))
- Inline value (positional argument)
- Error (no input provided)
Definition at line 33 of file input_handler.hpp.
◆ detect_source()
| InputSource rux::database::InputHandler::detect_source |
( |
const std::optional< std::string > & | inline_value | ) |
|
|
static |
Detect input source.
- Parameters
-
| inline_value | Optional inline value from command line |
- Returns
- Input source type
◆ is_stdin_available()
| bool rux::database::InputHandler::is_stdin_available |
( |
| ) |
|
|
static |
Check if stdin is available (redirected or piped).
- Returns
- true if stdin is not a TTY (has data to read)
◆ read_binary_from_stdin()
| std::vector< uint8_t > rux::database::InputHandler::read_binary_from_stdin |
( |
| ) |
|
|
static |
Read binary data from stdin.
- Returns
- Binary data
◆ read_input()
| DataPayload rux::database::InputHandler::read_input |
( |
const std::optional< std::string > & | inline_value | ) |
|
|
static |
Detect and read input.
- Parameters
-
| inline_value | Optional inline value from command line |
- Returns
- Data payload
- Exceptions
-
| std::runtime_error | if no input is available |
◆ read_text_from_stdin()
| std::string rux::database::InputHandler::read_text_from_stdin |
( |
| ) |
|
|
static |
Read text data from stdin.
- Returns
- Text data
The documentation for this class was generated from the following file: