diff --git a/SpecProject/CMakeLists.txt b/SpecProject/CMakeLists.txt index 1f8b6d1..457621e 100644 --- a/SpecProject/CMakeLists.txt +++ b/SpecProject/CMakeLists.txt @@ -24,7 +24,7 @@ target_include_directories(SpecProject PUBLIC ) target_sources(SpecProject PRIVATE - ./src/main.cpp + ./src/SPSApp.cpp ./src/MassMap.cpp ./src/MassMap.h ./src/SPSAnalysisStage.cpp diff --git a/SpecProject/imgui_log.txt b/SpecProject/imgui_log.txt new file mode 100644 index 0000000..c9370eb --- /dev/null +++ b/SpecProject/imgui_log.txt @@ -0,0 +1,9 @@ +(?) +[ Copy "Hello, world!" to clipboard ] +### Window options ### +### Widgets ### +### Layout & Scrolling ### +### Popups & Modal windows ### +### Tables & Columns ### +### Filtering ### +### Inputs, Navigation & Focus ### diff --git a/SpecProject/src/SPSApp.cpp b/SpecProject/src/SPSApp.cpp new file mode 100644 index 0000000..dc632d9 --- /dev/null +++ b/SpecProject/src/SPSApp.cpp @@ -0,0 +1,29 @@ +/* + main.cpp + Entry point for the example SpecProject. Also contains example of a simple user Specter::Application. + + GWM -- Feb 2022 +*/ +#include "Specter.h" +#include "SPSAnalysisStage.h" +#include "SPSInputLayer.h" + +//Including this inserts the predefined main function for Specter projects +//Can only be included once per project! +#include "Specter/Core/EntryPoint.h" + +//User application class. Pushes user analysis stages. +class SPSApp : public Specter::Application +{ +public: + SPSApp(const Specter::ApplicationArgs& args) : + Specter::Application(args) + { + PushLayer(new Specter::SPSInputLayer(m_manager)); + //PushLayer(new Navigator::TestServerLayer()); + PushAnalysisStage(new Specter::SPSAnalysisStage(m_manager)); + } +}; + +//Define the creation function to make our user application +Specter::Application* Specter::CreateApplication(const ApplicationArgs& args) { return new SPSApp(args); } \ No newline at end of file diff --git a/SpecProject/src/main.cpp b/SpecProject/src/main.cpp deleted file mode 100644 index 8fa06a0..0000000 --- a/SpecProject/src/main.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - main.cpp - Entry point for the example NavProject. Also contains example of a simple user Navigator::Application. - - GWM -- Feb 2022 -*/ -#include "Specter.h" -#include "SPSAnalysisStage.h" -#include "SPSInputLayer.h" -#include - -//User application class. Pushes user analysis stages. -class SPSApp : public Specter::Application -{ -public: - SPSApp(const Specter::ApplicationArgs& args) : - Specter::Application(args) - { - PushLayer(new Specter::SPSInputLayer(m_manager)); - //PushLayer(new Navigator::TestServerLayer()); - PushAnalysisStage(new Specter::SPSAnalysisStage(m_manager)); - } -}; - -//Define the creation function to make our user application -Specter::Application* Specter::CreateApplication(const ApplicationArgs& args) { return new SPSApp(args); } - -//Make sure to initialize log BEFORE creating application. -int main(int argc, const char** argv) -{ - Specter::Logger::Init(); - SPEC_INFO("Logger Initialized"); - - Specter::ApplicationArgs args; - args.name = "SPS Specter"; - args.runtimePath = std::filesystem::current_path(); - - SPEC_PROFILE_BEGIN_SESSION("Startup", "navprofile_startup.json"); - auto app = Specter::CreateApplication(args); - SPEC_PROFILE_END_SESSION(); - - SPEC_PROFILE_BEGIN_SESSION("Runtime", "navprofile_runtime.json"); - app->Run(); - SPEC_PROFILE_END_SESSION(); - - SPEC_PROFILE_BEGIN_SESSION("Shutdown", "navprofile_shutdown.json"); - delete app; - SPEC_PROFILE_END_SESSION(); -} \ No newline at end of file