25 行
322 B
C++
25 行
322 B
C++
#pragma once
|
|
|
|
#include "csp/db/sqlite_db.h"
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
namespace csp {
|
|
|
|
class AppState {
|
|
public:
|
|
static AppState& Instance();
|
|
|
|
void Init(const std::string& sqlite_path);
|
|
|
|
db::SqliteDb& db();
|
|
|
|
private:
|
|
AppState() = default;
|
|
|
|
std::unique_ptr<db::SqliteDb> db_;
|
|
};
|
|
|
|
} // namespace csp
|