From 3dbf5e95c3abac862abc4ed0d29f03f165b673f9 Mon Sep 17 00:00:00 2001 From: lucaspalomodevelop Date: Tue, 3 Oct 2023 16:27:51 +0200 Subject: [PATCH] add lpstd https://github.com/lucaspalomodevelop/lpstd --- .gitignore | 8 +++++++- src/command.h | 3 ++- src/commands.h | 7 +++++++ src/main.h | 2 +- src/setup.h | 3 ++- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 83e4035..76d0e61 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,10 @@ *.app # VSCode -.vscode \ No newline at end of file +.vscode + +# lpstd +lib/lpstd/ + +# +*.drawio \ No newline at end of file diff --git a/src/command.h b/src/command.h index 56bd64a..0a16b8c 100644 --- a/src/command.h +++ b/src/command.h @@ -8,6 +8,7 @@ #include #include #include +#include "../lib/lpstd/lpstd.hpp" struct commandInfo { @@ -16,7 +17,7 @@ struct commandInfo void (*func)(int argc, char *argv[]); }; -class Command +class Command : public lpstd::Singleton { private: diff --git a/src/commands.h b/src/commands.h index b16ea9d..8042f8c 100644 --- a/src/commands.h +++ b/src/commands.h @@ -35,6 +35,13 @@ namespace commands std::cout << "search" << std::endl; } + // not implemented + void collect(int argc, char *argv[]) + { + // lpstd::NotImplementedException(); + std::cout << "collect" << std::endl; + } + void help(int argc, char *argv[]) { std::cout << "help" << std::endl; diff --git a/src/main.h b/src/main.h index 77dfbeb..13a3d44 100644 --- a/src/main.h +++ b/src/main.h @@ -3,5 +3,5 @@ #include "./command.h" #include "./commands.h" -Setup setup; +Setup setup = Setup(); Command command; \ No newline at end of file diff --git a/src/setup.h b/src/setup.h index 1f97bcc..54e1d6a 100644 --- a/src/setup.h +++ b/src/setup.h @@ -8,8 +8,9 @@ #include #include #include +#include "../lib/lpstd/lpstd.hpp" -class Setup +class Setup : public lpstd::Singleton { private: public: