1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-09-01 06:30:52 +02:00
ModernCppStarter/include/greeter/greeter.h
ClausKlein 88781d22ab add build time dependency to static lib
the header only fmt lib is used to show this
2021-02-10 22:33:08 +01:00

34 lines
751 B
C++

#pragma once
#include <string>
namespace greeter {
/** Language codes to be used with the Greeter class */
enum class LanguageCode { EN, DE, ES, FR };
/**
* @brief A class for saying hello in multiple languages
*/
class Greeter {
std::string name;
public:
/**
* @brief Creates a new greeter
* @param name the name to greet
*/
Greeter(std::string name);
/**
* @brief Creates a localized string containing the greeting
* @param lang the language to greet in
* @return a string containing the greeting
*/
std::string greet(LanguageCode lang = LanguageCode::EN) const;
/// @brief Return an iso date string
std::string getIsoDate() const;
};
} // namespace greeter