17#include <lyra/lyra.hpp>
100 template<
typename... Args>
explicit TApplication(Args&&... args) : mApplication(
std::forward<Args>(args)...) {}
109 if(!mApplication.prepareStartUp()) {
112 mApplication.startUp();
113 return mApplication.run();
#define CE_SCRIPT_EXPORT(...)
The CE_SCRIPT_EXPORT macro marks a class or method as exportable and available in scripting environme...
Definition Macros.hpp:247
A base class to be used by all engine applications.
Definition Application.hpp:27
int run()
Runs the engine main loop.
virtual void startUp()
A method called to perform the application for start-up.
virtual bool prepareStartUp()
A method called to prepare the application for start-up.
virtual void update()
A method called by the application on every update loop.
SteadyClockDate mLastRenderTime
The last time a frame was rendered by the engine.
Definition Application.hpp:39
static Application & shared() noexcept
virtual void shutDown()
A method called to perform the application for shutdown.
const Vector< StringView > arguments
The argument given to the application command line.
Definition Application.hpp:30
~Application() override
Destroys the application instance.
bool mShouldExitProgram
A flag set by Window::didClose to indicate that the engine's main loop should exit when the window ge...
Definition Application.hpp:35
virtual void createCommandLineParser(CommandLineInterface &cli)
A method called by the engine whenever it is creating the command line parser.
void updateFromPlatform()
A temporary function that must be invoked by the platform on every update tick.
Application(const char *argv[], int argc)
Creates a new application instance.
A template class that helps initializing an application.
Definition Application.hpp:93
int run()
A method called to perform the application for start-up.
Definition Application.hpp:108
T mApplication
The application instance.
Definition Application.hpp:96
~TApplication()
A method called to perform the application for shutdown.
Definition Application.hpp:103
TApplication(Args &&... args)
Creates a new application instance.
Definition Application.hpp:100
Definition Application.hpp:19
TDate< SteadyClock, TimeInterval > SteadyClockDate
Represents a point in time.
Definition Chrono.hpp:86
lyra::args CommandLineArguments
Definition Application.hpp:22
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
Application & gApplication() noexcept
lyra::opt CommandLineOption
Definition Application.hpp:23
lyra::cli CommandLineInterface
Definition Application.hpp:21