mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-07-16 17:47:22 +00:00
Update user generation
This commit is contained in:
@@ -7,11 +7,13 @@
|
||||
*/
|
||||
|
||||
#include <filesystem>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#include "data_model/models.h"
|
||||
#include "data_model/names_by_country.h"
|
||||
|
||||
using forename_list = std::unordered_set<ForenameEntry>;
|
||||
using surname_list = std::unordered_set<std::string>;
|
||||
/**
|
||||
* @brief Interface for services that load curated data used to seed
|
||||
* brewery/user generation.
|
||||
@@ -38,16 +40,10 @@ class ICuratedDataService {
|
||||
virtual std::vector<UserPersona> LoadPersonas(
|
||||
const std::filesystem::path& filepath) = 0;
|
||||
|
||||
/**
|
||||
* @brief Loads the names-by-country fixture pair into a sampling-capable
|
||||
* NamesByCountry.
|
||||
*
|
||||
* @param forenames_filepath Path to forenames-by-country.json.
|
||||
* @param surnames_filepath Path to surnames-by-country.json.
|
||||
*/
|
||||
virtual NamesByCountry LoadNamesByCountry(
|
||||
const std::filesystem::path& forenames_filepath,
|
||||
virtual std::unordered_map<std::string, forename_list> LoadForenamesByCountry(
|
||||
const std::filesystem::path& forenames_filepath) = 0;
|
||||
virtual std::unordered_map<std::string, surname_list> LoadSurnamesByCountry(
|
||||
const std::filesystem::path& surnames_filepath) = 0;
|
||||
};
|
||||
|
||||
#endif // BIERGARTEN_PIPELINE_INCLUDES_SERVICES_CURATED_DATA_CURATED_DATA_SERVICE_H_
|
||||
#endif // BIERGARTEN_PIPELINE_INCLUDES_SERVICES_CURATED_DATA_CURATED_DATA_SERVICE_H_
|
||||
Reference in New Issue
Block a user