diff --git a/libcockatrice_card/libcockatrice/card/database/card_database.h b/libcockatrice_card/libcockatrice/card/database/card_database.h index 337e4b158..b10e3c726 100644 --- a/libcockatrice_card/libcockatrice/card/database/card_database.h +++ b/libcockatrice_card/libcockatrice/card/database/card_database.h @@ -54,18 +54,6 @@ protected: /** @brief Querier for higher-level card lookups. */ CardDatabaseQuerier *querier; -public: - /** - * @brief Check for sets that are unknown and emit signals if needed. - * - * Called from MainWindow::startupConfigCheck() after signal connections are - * live (the front-loaded parse in main() runs before MainWindow exists, so - * signals emitted there would have no receivers). May also be called by - * the loader via the friend declaration. Has side effects: enables all - * sets when none are enabled (first-run), marks all sets as known. - */ - void checkUnknownSets(); - private: /** * @brief Refreshes the cached reverse-related cards for all cards. @@ -150,6 +138,17 @@ public: */ void notifyEnabledSetsChanged(bool recomputeCachedSets = true); + /** + * @brief Check for sets that are unknown and emit signals if needed. + * + * Called from MainWindow::startupConfigCheck() after signal connections are + * live (the front-loaded parse in main() runs before MainWindow exists, so + * signals emitted there would have no receivers). May also be called by + * the loader via the friend declaration. Has side effects: enables all + * sets when none are enabled (first-run), marks all sets as known. + */ + void checkUnknownSets(); + ICardSetPriorityController *getPriorityController() { return setPriorityController; diff --git a/libcockatrice_card/libcockatrice/card/database/card_database_cache.h b/libcockatrice_card/libcockatrice/card/database/card_database_cache.h index a745d9e3d..40ff96541 100644 --- a/libcockatrice_card/libcockatrice/card/database/card_database_cache.h +++ b/libcockatrice_card/libcockatrice/card/database/card_database_cache.h @@ -6,30 +6,29 @@ #include #include -class CardDatabaseCache +namespace CardDatabaseCache { -public: - /** - * @brief Writes a fully-built database snapshot to a binary cache file. - * @param cachePath Path of the cache file to write. - * @param data The snapshot to serialize. - * @param sourceHash Hash of the source XML used to validate the cache later. - * @return True if the cache was written successfully. - */ - static bool write(const QString &cachePath, const CardDatabaseData &data, const QByteArray &sourceHash); +/** + * @brief Writes a fully-built database snapshot to a binary cache file. + * @param cachePath Path of the cache file to write. + * @param data The snapshot to serialize. + * @param sourceHash Hash of the source XML used to validate the cache later. + * @return True if the cache was written successfully. + */ +bool write(const QString &cachePath, const CardDatabaseData &data, const QByteArray &sourceHash); - /** - * @brief Reads a database snapshot from a binary cache file. - * @param cachePath Path of the cache file to read. - * @param data Snapshot to populate. - * @param sourceHash Expected hash of the source XML; read fails if it differs. - * @param priorityController Controller used to reconstruct CardSet state. - * @return True if a valid, up-to-date cache was read. - */ - static bool read(const QString &cachePath, - CardDatabaseData &data, - const QByteArray &sourceHash, - ICardSetPriorityController *priorityController); -}; +/** + * @brief Reads a database snapshot from a binary cache file. + * @param cachePath Path of the cache file to read. + * @param data Snapshot to populate. + * @param sourceHash Expected hash of the source XML; read fails if it differs. + * @param priorityController Controller used to reconstruct CardSet state. + * @return True if a valid, up-to-date cache was read. + */ +bool read(const QString &cachePath, + CardDatabaseData &data, + const QByteArray &sourceHash, + ICardSetPriorityController *priorityController); +} // namespace CardDatabaseCache #endif // CARDDATABASE_CACHE_H