![]() |
ezEngine
Release 25.03
|
A stand-alone application for the ezFileServer. More...
#include <Fileserve.h>
Public Types | |
using | SUPER = ezApplication |
Public Member Functions | |
virtual ezResult | BeforeCoreSystemsStartup () override |
This function is called before any kind of engine initialization is done. More... | |
virtual void | AfterCoreSystemsStartup () override |
This function is called after basic engine initialization has been done. More... | |
virtual void | BeforeCoreSystemsShutdown () override |
This function is called after the application main loop has run for the last time, before engine deinitialization. More... | |
virtual void | Run () override |
Main run function which is called periodically. This function must be overridden. More... | |
void | FileserverEventHandlerConsole (const ezFileserverEvent &e) |
void | FileserverEventHandler (const ezFileserverEvent &e) |
void | ShaderMessageHandler (ezFileserveClientContext &ref_ctxt, ezRemoteMessage &ref_msg, ezRemoteInterface &ref_clientChannel, ezDelegate< void(const char *)> logActivity) |
![]() | |
ezApplication (ezStringView sAppName) | |
Constructor. | |
virtual | ~ezApplication () |
Virtual destructor. | |
void | SetApplicationName (ezStringView sAppName) |
Changes the application name. | |
const ezString & | GetApplicationName () const |
Returns the application name. | |
virtual void | BeforeHighLevelSystemsShutdown () |
This function is called after the application main loop has run for the last time, before engine deinitialization. More... | |
virtual void | AfterHighLevelSystemsShutdown () |
Called after ezStartup::ShutdownHighLevelSystems() has been executed. | |
virtual void | AfterCoreSystemsShutdown () |
This function is called after ezStartup::ShutdownCoreSystems() has been called. More... | |
virtual void | BeforeEnterBackground () |
This function is called when an application is moved to the background. More... | |
virtual void | BeforeEnterForeground () |
This function is called whenever an application is resumed from background mode. More... | |
void | SetReturnCode (ezInt32 iReturnCode) |
Sets the value that the application will return to the OS. You can call this function at any point during execution to update the return value of the application. Default is zero. | |
ezInt32 | GetReturnCode () const |
Returns the currently set value that the application will return to the OS. | |
virtual const char * | TranslateReturnCode () const |
If the return code is not zero, this function might be called to get a string to print the error code in human readable form. | |
void | SetCommandLineArguments (ezUInt32 uiArgumentCount, const char **pArguments) |
Will set the command line arguments that were passed to the app by the OS. This is automatically called by EZ_APPLICATION_ENTRY_POINT(). | |
ezUInt32 | GetArgumentCount () const |
Returns the number of command line arguments that were passed to the application. More... | |
const char * | GetArgument (ezUInt32 uiArgument) const |
Returns one of the command line arguments that was passed to the application. | |
const char ** | GetArgumentsArray () const |
Returns the complete array of command line arguments that were passed to the application. | |
void | EnableMemoryLeakReporting (bool bEnable) |
bool | IsMemoryLeakReportingEnabled () const |
virtual void | RequestApplicationQuit () |
Calling this function requests that the application quits after the current invocation of Run() finishes. More... | |
EZ_ALWAYS_INLINE bool | ShouldApplicationQuit () const |
Returns whether RequestQuit() was called. | |
Public Attributes | |
ezUInt32 | m_uiSleepCounter = 0 |
ezUInt32 | m_uiConnections = 0 |
ezTime | m_CloseAppTimeout |
ezTime | m_TimeTillClosing |
Additional Inherited Members | |
![]() | |
static ezApplication * | GetApplicationInstance () |
Returns the one instance of ezApplication that is available. | |
![]() | |
bool | m_bWasQuitRequested = false |
A stand-alone application for the ezFileServer.
If EZ_USE_QT is defined, the GUI from the EditorPluginFileserve is used. Otherwise the server runs as a console application.
If the command line option "-fs_wait_timeout seconds" is specified, the server waits for a limited time for any client to connect and closes automatically, if no connection is established. Once a client connects, this timeout becomes irrelevant. If the command line option "-fs_close_timeout seconds" is specified, the application automatically shuts down when no client is connected anymore and a certain timeout is reached. Once a client connects, the timeout is reset. This timeout has no effect as long as no client has connected.
|
overridevirtual |
This function is called after basic engine initialization has been done.
ezApplication will automatically call ezStartup::StartupCoreSystems() to initialize the application. This function can be overridden to do additional application specific initialization. To startup entire subsystems, you should however use the features provided by ezStartup and ezSubSystem.
Reimplemented from ezApplication.
|
overridevirtual |
This function is called after the application main loop has run for the last time, before engine deinitialization.
Override this function to do application specific deinitialization that still requires a running engine. After this function returns ezStartup::ShutdownCoreSystems() is called and thus everything, including allocators, is shut down. To shut down entire subsystems, you should, however, use the features provided by ezStartup and ezSubSystem.
Reimplemented from ezApplication.
|
overridevirtual |
This function is called before any kind of engine initialization is done.
Override this function to be able to configure subsystems, before they are initialized. After this function returns, ezStartup::StartupCoreSystems() is automatically called. If you need to set up custom allocators, this is the place to do this.
Reimplemented from ezApplication.
|
overridevirtual |
Main run function which is called periodically. This function must be overridden.
Call RequestApplicationQuit() at any point to prevent Run() from being called again.
Implements ezApplication.