mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-06-01 01:54:00 +00:00
55 lines
1.6 KiB
C++
55 lines
1.6 KiB
C++
#ifndef BIERGARTEN_PIPELINE_DATA_GENERATION_MOCK_GENERATOR_H_
|
|
#define BIERGARTEN_PIPELINE_DATA_GENERATION_MOCK_GENERATOR_H_
|
|
|
|
/**
|
|
* @file data_generation/mock_generator.h
|
|
* @brief Deterministic mock implementation of DataGenerator.
|
|
*/
|
|
|
|
#include <string>
|
|
#include <string_view>
|
|
#include <vector>
|
|
|
|
#include "data_generation/data_generator.h"
|
|
|
|
/**
|
|
* @brief Mock generator used for deterministic, model-free outputs.
|
|
*/
|
|
class MockGenerator final : public DataGenerator {
|
|
public:
|
|
/**
|
|
* @brief Generates deterministic brewery data for a location.
|
|
*
|
|
* @param location City and country names.
|
|
* @param region_context Unused for mock generation.
|
|
* @return Generated brewery result.
|
|
*/
|
|
BreweryResult GenerateBrewery(const BreweryLocation& location,
|
|
const std::string& region_context) override;
|
|
|
|
/**
|
|
* @brief Generates deterministic user data for a locale.
|
|
*
|
|
* @param locale Locale hint.
|
|
* @return Generated user result.
|
|
*/
|
|
UserResult GenerateUser(const std::string& locale) override;
|
|
|
|
private:
|
|
/**
|
|
* @brief Combines two strings into a stable hash value.
|
|
*
|
|
* @param location City and country names.
|
|
* @return Deterministic hash value.
|
|
*/
|
|
static std::size_t DeterministicHash(const BreweryLocation& location);
|
|
|
|
static const std::vector<std::string> kBreweryAdjectives;
|
|
static const std::vector<std::string> kBreweryNouns;
|
|
static const std::vector<std::string> kBreweryDescriptions;
|
|
static const std::vector<std::string> kUsernames;
|
|
static const std::vector<std::string> kBios;
|
|
};
|
|
|
|
#endif // BIERGARTEN_PIPELINE_DATA_GENERATION_MOCK_GENERATOR_H_
|