major: initial release

* initial development

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* ci/cd

* ci/cd

* ci/cd

* ci/cd

* ci/cd

* ci/cd

* ci/cd

* pokemon

* pokemon

* pokemon

* pokemon

* pokemon

* pokemon

* improvements

* improvements

* ci/cd

* ci/cd

* improvements

* improvements

* improvements

* improvements

* improvements

* improvements

* improvements

* improvements

* improvements

---------

Co-authored-by: sdine <sdine@sdine.com>
This commit is contained in:
Sebastian Dine
2026-05-09 11:05:47 +02:00
committed by GitHub
parent 13262fa015
commit 55ace147bc
149 changed files with 12611 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
#pragma once
// SetService: high-level operations for fetching and caching set data.
// Wraps an ISetRepository (cache) and dispatches to the correct ISetSource
// based on the active IGameModule.
#include "ccm/domain/Enums.hpp"
#include "ccm/domain/Set.hpp"
#include "ccm/games/IGameModule.hpp"
#include "ccm/ports/ISetRepository.hpp"
#include "ccm/util/Result.hpp"
#include <unordered_map>
#include <vector>
namespace ccm {
class SetService {
public:
explicit SetService(ISetRepository& repo);
// Register a game module so this service can route fetch requests.
// Pointer must remain valid for the lifetime of the SetService.
void registerModule(IGameModule* module);
// Force a fresh fetch from the API for `game`, persist it via the
// repository, and return the new list.
Result<std::vector<Set>> updateSets(Game game);
// Cached read; returns an error if no local data exists yet.
Result<std::vector<Set>> getSets(Game game);
private:
ISetRepository& repo_;
std::unordered_map<Game, IGameModule*> modules_;
};
} // namespace ccm