mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-07-16 17:47:22 +00:00
Update doxygen comments
This commit is contained in:
@@ -17,7 +17,9 @@ class IExportService {
|
||||
public:
|
||||
IExportService() = default;
|
||||
|
||||
/// @brief Virtual destructor for polymorphic cleanup.
|
||||
/**
|
||||
* @brief Virtual destructor for polymorphic cleanup.
|
||||
*/
|
||||
virtual ~IExportService() = default;
|
||||
|
||||
IExportService(const IExportService&) = delete;
|
||||
@@ -25,7 +27,9 @@ class IExportService {
|
||||
IExportService(IExportService&&) = delete;
|
||||
IExportService& operator=(IExportService&&) = delete;
|
||||
|
||||
/// @brief Prepares the export destination for a new run.
|
||||
/**
|
||||
* @brief Prepares the export destination for a new run.
|
||||
*/
|
||||
virtual void Initialize() = 0;
|
||||
|
||||
/**
|
||||
@@ -42,7 +46,9 @@ class IExportService {
|
||||
*/
|
||||
virtual uint64_t ProcessRecord(const UserRecord& user) = 0;
|
||||
|
||||
/// @brief Finalizes the export destination.
|
||||
/**
|
||||
* @brief Finalizes the export destination.
|
||||
*/
|
||||
virtual void Finalize() = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
*/
|
||||
class IDateTimeProvider {
|
||||
public:
|
||||
/// @brief Virtual destructor for polymorphic cleanup.
|
||||
/**
|
||||
* @brief Virtual destructor for polymorphic cleanup.
|
||||
*/
|
||||
virtual ~IDateTimeProvider() = default;
|
||||
|
||||
IDateTimeProvider() = default;
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
*/
|
||||
class IEnrichmentService {
|
||||
public:
|
||||
/// @brief Virtual destructor for polymorphic cleanup.
|
||||
/**
|
||||
* @brief Virtual destructor for polymorphic cleanup.
|
||||
*/
|
||||
virtual ~IEnrichmentService() = default;
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,21 +15,29 @@
|
||||
#include "services/logging/logger.h"
|
||||
#include "web_client/web_client.h"
|
||||
|
||||
/// @brief Provides Wikipedia summary lookups backed by cached raw extracts.
|
||||
/**
|
||||
* @brief Provides Wikipedia summary lookups backed by cached raw extracts.
|
||||
*/
|
||||
class WikipediaEnrichmentService final : public IEnrichmentService {
|
||||
public:
|
||||
/// @brief Creates a new Wikipedia service with the provided web client.
|
||||
/**
|
||||
* @brief Creates a new Wikipedia service with the provided web client.
|
||||
*/
|
||||
explicit WikipediaEnrichmentService(std::unique_ptr<WebClient> client,
|
||||
std::shared_ptr<ILogger> logger);
|
||||
|
||||
/// @brief Returns the Wikipedia-derived context for a location.
|
||||
/**
|
||||
* @brief Returns the Wikipedia-derived context for a location.
|
||||
*/
|
||||
[[nodiscard]] std::string GetLocationContext(const Location& loc) override;
|
||||
|
||||
private:
|
||||
std::string FetchExtract(std::string_view query);
|
||||
std::unique_ptr<WebClient> client_;
|
||||
std::shared_ptr<ILogger> logger_;
|
||||
/// @brief Canonical cache for raw Wikipedia query extracts.
|
||||
/**
|
||||
* @brief Canonical cache for raw Wikipedia query extracts.
|
||||
*/
|
||||
std::unordered_map<std::string, std::string> extract_cache_;
|
||||
};
|
||||
|
||||
|
||||
@@ -20,10 +20,22 @@
|
||||
* @brief Severity levels supported by the logging infra.
|
||||
*/
|
||||
enum class LogLevel {
|
||||
Debug, ///< Development/debugging information.
|
||||
Info, ///< General informational messages.
|
||||
Warn, ///< Warning conditions.
|
||||
Error, ///< Error conditions.
|
||||
/**
|
||||
* @brief Development/debugging information.
|
||||
*/
|
||||
Debug,
|
||||
/**
|
||||
* @brief General informational messages.
|
||||
*/
|
||||
Info,
|
||||
/**
|
||||
* @brief Warning conditions.
|
||||
*/
|
||||
Warn,
|
||||
/**
|
||||
* @brief Error conditions.
|
||||
*/
|
||||
Error,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -34,14 +46,38 @@ enum class LogLevel {
|
||||
* pipeline that emitted it.
|
||||
*/
|
||||
enum class PipelinePhase {
|
||||
Startup, ///< Initialization and validation.
|
||||
Enrichment, ///< Location/context enrichment (e.g. Wikipedia lookups).
|
||||
UserGeneration, ///< User profile generation.
|
||||
BreweryAndBeerGeneration, ///< Brewery and beer data generation.
|
||||
CheckinGeneration, ///< Checkin (visit) record generation.
|
||||
RatingGeneration, ///< Rating and review generation.
|
||||
FollowGeneration, ///< Follow relationship generation.
|
||||
Teardown, ///< Finalization and cleanup.
|
||||
/**
|
||||
* @brief Initialization and validation.
|
||||
*/
|
||||
Startup,
|
||||
/**
|
||||
* @brief Location/context enrichment (e.g. Wikipedia lookups).
|
||||
*/
|
||||
Enrichment,
|
||||
/**
|
||||
* @brief User profile generation.
|
||||
*/
|
||||
UserGeneration,
|
||||
/**
|
||||
* @brief Brewery and beer data generation.
|
||||
*/
|
||||
BreweryAndBeerGeneration,
|
||||
/**
|
||||
* @brief Checkin (visit) record generation.
|
||||
*/
|
||||
CheckinGeneration,
|
||||
/**
|
||||
* @brief Rating and review generation.
|
||||
*/
|
||||
RatingGeneration,
|
||||
/**
|
||||
* @brief Follow relationship generation.
|
||||
*/
|
||||
FollowGeneration,
|
||||
/**
|
||||
* @brief Finalization and cleanup.
|
||||
*/
|
||||
Teardown,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -66,22 +102,34 @@ struct LogDTO {
|
||||
* before the entry is dispatched.
|
||||
*/
|
||||
struct LogEntry {
|
||||
/// @brief Timestamp when the entry was created.
|
||||
/**
|
||||
* @brief Timestamp when the entry was created.
|
||||
*/
|
||||
std::chrono::system_clock::time_point timestamp{};
|
||||
|
||||
/// @brief Source location where the log call was made.
|
||||
/**
|
||||
* @brief Source location where the log call was made.
|
||||
*/
|
||||
std::source_location origin{};
|
||||
|
||||
/// @brief Thread responsible for emitting the log.
|
||||
/**
|
||||
* @brief Thread responsible for emitting the log.
|
||||
*/
|
||||
std::thread::id thread_id{};
|
||||
|
||||
/// @brief Severity level of this entry.
|
||||
/**
|
||||
* @brief Severity level of this entry.
|
||||
*/
|
||||
LogLevel level;
|
||||
|
||||
/// @brief Pipeline phase associated with the entry.
|
||||
/**
|
||||
* @brief Pipeline phase associated with the entry.
|
||||
*/
|
||||
PipelinePhase phase;
|
||||
|
||||
/// @brief Log message text.
|
||||
/**
|
||||
* @brief Log message text.
|
||||
*/
|
||||
std::string message;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user