/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* harl.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/09 17:15:01 by adjoly #+# #+# */ /* Updated: 2024/11/09 19:16:07 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ #include "harl.hpp" #include void Harl::complain(std::string level) { std::string complainLevel[4] = {"DEBUG", "INFO", "WARNING", "ERROR"}; void (Harl::*func[4])(void) = {&Harl::debug, &Harl::info, &Harl::warning, &Harl::error}; uint8_t i = 0; while (i < 4 && level != complainLevel[i]) i++; if (i < 4) (this->*func[i])(); return ; } void Harl::debug(void) { std::cout << "[DEBUG]: NixOS is the only true answer" << std::endl; } void Harl::info(void) { std::cout << "[INFO]: NixOS is on 24.05" << std::endl; } void Harl::warning(void) { std::cout << "[WARNING]: Please no Ubuntu here" << std::endl; } void Harl::error(void) { std::cout << "[ERROR]: Arch issue switch to NixOS please for god sake" << std::endl; }