mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-07-16 17:47:22 +00:00
31 lines
939 B
C++
31 lines
939 B
C++
#ifndef BIERGARTEN_PIPELINE_INCLUDES_SERVICES_POSTAL_CODE_POSTAL_CODE_SERVICE_H_
|
|
#define BIERGARTEN_PIPELINE_INCLUDES_SERVICES_POSTAL_CODE_POSTAL_CODE_SERVICE_H_
|
|
|
|
/**
|
|
* @file services/postal_code/postal_code_service.h
|
|
* @brief Abstraction for generating a postal code for a location.
|
|
*/
|
|
|
|
#include <string>
|
|
|
|
#include "data_model/models.h"
|
|
|
|
/**
|
|
* @brief Interface for services that generate a postal code string matching
|
|
* a location's postal code format (`City::postal_regex`).
|
|
*/
|
|
class IPostalCodeService {
|
|
public:
|
|
virtual ~IPostalCodeService() = default;
|
|
|
|
/**
|
|
* @brief Generates a postal code for the given location.
|
|
*
|
|
* @param location Location whose postal code format to generate for.
|
|
* @return A postal code string matching `location.postal_regex`.
|
|
*/
|
|
virtual std::string GeneratePostalCode(const City& location) = 0;
|
|
};
|
|
|
|
#endif // BIERGARTEN_PIPELINE_INCLUDES_SERVICES_POSTAL_CODE_POSTAL_CODE_SERVICE_H_
|