#include <map>
#include <string>
Go to the source code of this file.
◆ OutputFormat
Enum class to specify the output format.
Definition at line 9 of file OutputFormats.h.
◆ convertToOutputFormat()
OutputFormat convertToOutputFormat |
( |
const std::string & |
output_format | ) |
|
Converts a string to an OutputFormat.
- Parameters
-
output_format | The string to convert |
- Returns
- OutputFormat The converted OutputFormat
Definition at line 9 of file OutputFormats.cpp.
12 if (!supported.contains(output_format)) {
13 auto supported_formats = std::string();
14 for (
auto& [name, format] : supported) {
15 supported_formats += name +
", ";
18 Logger::logger->error(
"Invalid output format given: {}. Supported output formats are: {}", output_format, supported_formats);
19 throw std::runtime_error(
"Invalid output format given");
22 return supported[output_format];
static std::shared_ptr< spdlog::logger > logger
Publically accessible shared pointer to the logger.
◆ get_supported_output_formats()
const std::map<std::string, OutputFormat> get_supported_output_formats |
( |
| ) |
|
Returns a mappping of supported output formats.
- Returns
- std::map<std::string,OutputFormat> Mapping of supported output formats
Definition at line 5 of file OutputFormats.cpp.