c00c2c71ac
* scratch adding histogram to image views Histograms should come from some sort of histogram service. This is currently just a POC. * custom logger implementation w/o spdlog * missing cmake file * fix tests * use operator<< over direct stream exposure * rm print header * add threading test + refactor towards interface libraries omits the need for =target_include_directories= calls /everywhere/ * rm print header * rm constexpr * templated thread_pool * fix doxyfile * default enable doc building * czi reader refactor * rm erroneous include expression * clang-format * single lib include with PUBLIC visibility * compile imgui stdlib * clang format * documentation update centralize `LogLevelToString` to `ILog.hpp` update docs and examples
34 lines
973 B
C++
34 lines
973 B
C++
#include <memory>
|
|
|
|
#include "DefaultApp.hpp"
|
|
#include "ILog.hpp"
|
|
#include "SpdLogger.hpp"
|
|
#include "resource.hpp"
|
|
|
|
using namespace pixelarium;
|
|
using namespace std;
|
|
using Log = utils::log::ILog;
|
|
using Pool = resources::ImageResourcePool;
|
|
|
|
// setup a logger
|
|
#ifdef _WIN32
|
|
const auto logger{utils::log::SpdLogger(string(getenv("APPDATA")) + "/pixelarium/simple_app.log", "default")};
|
|
#else
|
|
const auto logger{
|
|
utils::log::SpdLogger(string(getenv("HOME")) + "/.cache/pixelarium/simple_app.log", "default")};
|
|
#endif
|
|
|
|
int main()
|
|
{
|
|
// some initial log message and default log level setting
|
|
logger.Info(format("{}: Starting Application {}", __FUNCTION__, "Pixelarium"));
|
|
logger.ChangeLevel(utils::log::LogLevel::kDebug);
|
|
|
|
// instantiate an image pool for the application
|
|
resources::ImageResourcePool image_pool;
|
|
|
|
// create an application, inject its dependencies and start it
|
|
auto app{application::DefaultApp(logger, image_pool)};
|
|
app.Start();
|
|
}
|