1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-08-30 13:41:13 +02:00

Create version header and update readme (#44)

* add note on github pages

* add version information to standalone. closes #35.

* update version info

* move includes into project directory and create version header

* fix style

* add comment for version header location
This commit is contained in:
Lars Melchior 2020-06-03 16:25:44 +02:00 committed by GitHub
parent 032e506c12
commit 92adf2db25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 7 deletions

31
include/greeter/greeter.h Normal file
View file

@ -0,0 +1,31 @@
#pragma once
#include <string>
namespace greeter {
/** Language codes to be used with the Greeter class */
enum class LanguageCode { EN, DE, ES, FR };
/**
* A class for saying hello in multiple languages
*/
class Greeter {
std::string name;
public:
/**
* Creates a new greeter
* @param name the name to greet
*/
Greeter(std::string name);
/**
* 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;
};
} // namespace greeter