#include <algorithm>
#include <array>
#include <ranges>
#include <stdexcept>
#include <string>
#include <string_view>
#include <type_traits>
#include <utility>
Go to the source code of this file.
|
| enum class | mazes::algo : unsigned int {
BINARY_TREE = 0
, SIDEWINDER = 1
, DFS = 2
, PIXELS = 3
,
STRINGIFY = 4
, WAVEFRONT_OBJECT = 5
, TOTAL = 6
} |
| | Enumeration of maze generation algorithms.
|
| |
|
| constexpr std::array< std::string_view, static_cast< size_t >(algo::TOTAL)> | mazes::ALGOS_LABELS_LOWERCASE |
| | Array of string_view labels for the algo enum, in lowercase.
|
| |
◆ to_algo_from_sv()
| algo mazes::to_algo_from_sv |
( |
std::string_view | a | ) |
|
|
inline |
Convert a string_view to an algo enum.
- Parameters
-
- Returns
- algo
◆ to_sv_from_algo()
| std::string_view mazes::to_sv_from_algo |
( |
algo | a | ) |
|
|
inline |
Convert the algo enum to a string_view.
- Parameters
-
- Returns
◆ ALGOS_LABELS_LOWERCASE
| std::array<std::string_view, static_cast<size_t>(algo::TOTAL)> mazes::ALGOS_LABELS_LOWERCASE |
|
constexpr |
Initial value:= {
"binary_tree",
"sidewinder",
"dfs",
"pixels",
"stringify",
"wavefront_object"
}
Array of string_view labels for the algo enum, in lowercase.