HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
Loading...
Searching...
No Matches
AsciiArtGenerator.h
Go to the documentation of this file.
1
27#pragma once
28
29#include <map>
30#include <memory>
31#include <string>
32#include <vector>
33
62public:
66 AsciiArtGenerator() noexcept;
67
71 ~AsciiArtGenerator() noexcept = default;
72
78 std::string Generate(const std::string& input) const noexcept;
79
85 void AddCustomCharacter(char character, const std::vector<std::string>& art_lines) noexcept;
86
91 void RemoveCustomCharacter(char character) noexcept;
92
96 void ClearCustomCharacters() noexcept;
97
103 bool IsCharacterSupported(char character) const noexcept;
104
109 std::string GetSupportedCharacters() const noexcept;
110
111private:
112 //==============================================================================
113 // PRIVATE MEMBERS
114 //==============================================================================
115
116 std::map<char, std::vector<std::string>> custom_characters_;
117
118 //==============================================================================
119 // PRIVATE METHODS
120 //==============================================================================
121
127 std::vector<std::string> GetCharacterArt(char character) const noexcept;
128};
Simple ASCII art generator.
Definition AsciiArtGenerator.h:61
std::map< char, std::vector< std::string > > custom_characters_
Custom character mappings.
Definition AsciiArtGenerator.h:116
void ClearCustomCharacters() noexcept
Clear all custom character mappings.
Definition AsciiArtGenerator.cpp:160
std::string Generate(const std::string &input) const noexcept
Generate ASCII art from string.
Definition AsciiArtGenerator.cpp:119
bool IsCharacterSupported(char character) const noexcept
Check if character is supported.
Definition AsciiArtGenerator.cpp:164
void RemoveCustomCharacter(char character) noexcept
Remove custom character mapping.
Definition AsciiArtGenerator.cpp:156
void AddCustomCharacter(char character, const std::vector< std::string > &art_lines) noexcept
Add custom character mapping.
Definition AsciiArtGenerator.cpp:149
AsciiArtGenerator() noexcept
Default constructor.
Definition AsciiArtGenerator.cpp:111
std::string GetSupportedCharacters() const noexcept
Get supported characters.
Definition AsciiArtGenerator.cpp:169
std::vector< std::string > GetCharacterArt(char character) const noexcept
Get art lines for a character.
Definition AsciiArtGenerator.cpp:184
~AsciiArtGenerator() noexcept=default
Destructor.