From 31e20e9af0f798f2b63c4812fe9f8d2b21b84160 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Tue, 3 Dec 2024 14:32:28 -0600 Subject: [PATCH] refactor --- repertory/librepertory/include/db/meta_db.hpp | 8 ++--- repertory/librepertory/src/db/meta_db.cpp | 31 +++++++++++++++++++ 2 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 repertory/librepertory/src/db/meta_db.cpp diff --git a/repertory/librepertory/include/db/meta_db.hpp b/repertory/librepertory/include/db/meta_db.hpp index cdaa12aa..c566151f 100644 --- a/repertory/librepertory/include/db/meta_db.hpp +++ b/repertory/librepertory/include/db/meta_db.hpp @@ -23,13 +23,11 @@ #define REPERTORY_INCLUDE_DB_META_DB_HPP_ #include "db/i_meta_db.hpp" -#include "db/sqlite_meta_db.hpp" namespace repertory { -[[nodiscard]] inline auto create_meta_db(const app_config &cfg) - -> std::unique_ptr { - return std::make_unique(cfg); -} +class app_config; + +auto create_meta_db(const app_config &cfg) -> std::unique_ptr; } // namespace repertory #endif // REPERTORY_INCLUDE_DB_META_DB_HPP_ diff --git a/repertory/librepertory/src/db/meta_db.cpp b/repertory/librepertory/src/db/meta_db.cpp new file mode 100644 index 00000000..13763791 --- /dev/null +++ b/repertory/librepertory/src/db/meta_db.cpp @@ -0,0 +1,31 @@ +/* + Copyright <2018-2024> + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ +#include "db/meta_db.hpp" + +#include "app_config.hpp" +#include "db/sqlite_meta_db.hpp" + +namespace repertory { +auto create_meta_db(const app_config &cfg) -> std::unique_ptr { + return std::make_unique(cfg); +} +} // namespace repertory