Harl::Harl()
{
- m_levels[0] = "debug";
+ m_levels[0] = "DEBUG";
m_speech[0] = &Harl::debug;
- m_levels[1] = "info";
+ m_levels[1] = "INFO";
m_speech[1] = &Harl::info;
- m_levels[2] = "warning";
+ m_levels[2] = "WARNING";
m_speech[2] = &Harl::warning;
- m_levels[3] = "error";
+ m_levels[3] = "ERROR";
m_speech[3] = &Harl::error;
}
if (selected)
(this->*selected)();
else
- std::cout << "Harl does not know this level.\n";
+ std::cout << "Harl does not know this level.\n\n";
}
void Harl::debug(void)
{
std::cout << "I love having extra bacon for my "
- "7XL-double-cheese-triple-pickle-special-ketchup burger. I really do!\n";
+ "7XL-double-cheese-triple-pickle-special-ketchup burger. I really do!\n\n";
}
void Harl::info(void)
{
std::cout << "I cannot believe adding extra bacon costs more money. "
"You didn’t put enough bacon in my burger! "
- "If you did, I wouldn’t be asking for more!\n";
+ "If you did, I wouldn’t be asking for more!\n\n";
}
void Harl::warning(void)
{
std::cout << "I think I deserve to have some extra bacon for free. "
- "I’ve been coming for ears whereas you started working here since last month.\n";
+ "I’ve been coming for ears whereas you started working here since last month.\n\n";
}
void Harl::error(void)
{
- std::cout << "This is unacceptable! I want to speak to the manager now.\n";
+ std::cout << "This is unacceptable! I want to speak to the manager now.\n\n";
}
{
Harl harl;
- harl.complain("info");
- harl.complain("debug");
- harl.complain("warning");
- harl.complain("error");
- harl.complain("debug");
- harl.complain("info");
- harl.complain("error");
+ harl.complain("INFO");
+ harl.complain("DEBUG");
+ harl.complain("WARNING");
+ harl.complain("ERROR");
+ harl.complain("DEBUG");
+ harl.complain("INFO");
+ harl.complain("ERROR");
return (0);
}