mirror of
				https://github.com/TheLartians/ModernCppStarter.git
				synced 2025-10-31 18:21:35 +01:00 
			
		
		
		
	move includes into project directory and create version header
This commit is contained in:
		
							parent
							
								
									47f89bf102
								
							
						
					
					
						commit
						81fdc61cb1
					
				
					 6 changed files with 17 additions and 5 deletions
				
			
		
							
								
								
									
										31
									
								
								include/greeter/greeter.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								include/greeter/greeter.h
									
										
									
									
									
										Normal 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
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue