diff options
Diffstat (limited to 'oop2eindopdr/PokemonCard.h')
-rw-r--r-- | oop2eindopdr/PokemonCard.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/oop2eindopdr/PokemonCard.h b/oop2eindopdr/PokemonCard.h index ea1a18f..1bbd3c7 100644 --- a/oop2eindopdr/PokemonCard.h +++ b/oop2eindopdr/PokemonCard.h @@ -10,19 +10,26 @@ class Pokedex; /** @brief single pokemon card */ class PokemonCard { private: + /** @brief raw API card data */ nlohmann::json raw_data; + /** @brief load card data from json data (see named constructor) */ virtual void raw_load_json(nlohmann::json raw_data); + /** @brief load card data from cache (see named constructor) */ virtual void raw_load_cache(const char* cache_path); + /** @brief pokedex reference (for API access in ::fetch_market_value) */ Pokedex* pokedex = nullptr; /** @brief add cache path before filename */ virtual std::string prefix_cache_path(const char* filename); + /** @brief thread that creates `complete` file when both images are downloaded */ std::thread* image_download_thread = nullptr; + /** @brief image API url */ std::string url_card_normal = ""; + /** @brief image API url */ std::string url_card_hires = ""; public: @@ -38,6 +45,7 @@ public: double value = 0.f; /** @brief pokemon card current market value */ std::vector<std::string> attacks = {}; /** @brief list of possible attacks */ + /** @brief get short card identifier: "Name (ID)" */ virtual std::string short_identifier(); /** @brief use API to fetch `this->hp` */ |