9#include <unordered_map>
32 static void objectify(
const std::unique_ptr<maze>& m,
33 std::vector<std::tuple<int, int, int, int>>& vertices,
34 std::vector<std::vector<std::uint32_t>>& faces,
35 std::string_view sv = std::string_view{})
noexcept;
41 std::string_view sv = std::string_view{})
noexcept;
48 static void to_pixels(
const std::string& s, std::vector<std::uint8_t>&
pixels,
int& width,
int& height,
49 int stride = 4) noexcept;
57 static
void to_pixels_colored(const std::
string& s, std::vector<std::uint8_t>&
pixels,
int& width,
int& height,
int stride = 4) noexcept;
62 static std::
string stringify(const std::unique_ptr<maze>& m) noexcept;
67 static std::
string trim(const std::
string& str) noexcept;
73 static
bool contains(const std::
string& str, const std::
string& substr) noexcept;
84 static
bool ends_with(const std::
string& str, const std::
string& suffix) noexcept;
90 static std::string_view
find_first_of(const std::string_view& s, const std::string_view& chars) noexcept;
96 static std::vector<std::
string>
split(const std::
string& str,
char delimiter) noexcept;
102 static std::string_view
strip(const std::string_view& s,
char to_strip_from_s) noexcept;
113 static std::
string to_string(std::unordered_map<std::
string, std::
string> const& m) noexcept;
124 static std::
string to_string(const std::reference_wrapper<const
args>& a) noexcept;
Command-line argument handler with JSON support.
Definition args.h:17
Holds mazes and provides search functions.
Definition lab.h:24
String helper class.
Definition string_view_utils.h:24
static std::string_view strip_json_quotes(const std::string_view &s) noexcept
Strip quotes from a JSON string value.
static std::string trim(const std::string &str) noexcept
Trim whitespace from both ends of a string.
static void to_pixels(const std::string &s, std::vector< std::uint8_t > &pixels, int &width, int &height, int stride=4) noexcept
Converts a string representation of an image to a pixel array.
static std::string to_string(std::unordered_map< std::string, std::string > const &m) noexcept
Convert a map to a formatted string with each key-value pair on a line.
static std::string_view strip(const std::string_view &s, char to_strip_from_s) noexcept
Strip specific characters from the beginning and end of a string view.
static std::string_view find_first_of(const std::string_view &s, const std::string_view &chars) noexcept
Find the first occurrence of any character from a set in a string view.
static std::string get_file_extension(const std::string &filename) noexcept
Extract file extension from a filename.
static bool ends_with(const std::string &str, const std::string &suffix) noexcept
Check if a string ends with a specific suffix.
static void to_pixels_colored(const std::string &s, std::vector< std::uint8_t > &pixels, int &width, int &height, int stride=4) noexcept
Converts a maze to a pixel representation.
static bool contains(const std::string &str, const std::string &substr) noexcept
Check if a string contains a substring.
static void objectify(lab &labyrinth, std::string_view sv=std::string_view{}) noexcept
Compute the 3D geometries of a maze.
static std::vector< std::string > split(const std::string &str, char delimiter) noexcept
Split a string by delimiter.
static void objectify(const std::unique_ptr< maze > &m, std::vector< std::tuple< int, int, int, int > > &vertices, std::vector< std::vector< std::uint32_t > > &faces, std::string_view sv=std::string_view{}) noexcept
Compute the 3D geometries of a maze.
Namespace for the maze builder.
Definition algo_interface.h:9