Open 3D Engine AzFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzFramework::Application Class Reference

Inherits AZ::ComponentApplication, AZ::UserSettingsFileLocatorBus::Handler, and ApplicationRequests::Bus::Handler.

Classes

class  Implementation
 

Public Member Functions

 AZ_RTTI (Application, "{0BD2388B-F435-461C-9C84-D0A96CAF32E4}", AZ::ComponentApplication)
 
 AZ_CLASS_ALLOCATOR (Application, AZ::SystemAllocator)
 
 Application (int *argc, char ***argv)
 recommended: supply &argc and &argv from void main(...) here.
 
 Application ()
 for backward compatibility. If you call this, GetArgC and GetArgV will return nullptr.
 
virtual void Start (const Descriptor &descriptor, const StartupParameters &startupParameters=StartupParameters())
 
virtual void Stop ()
 
void Tick () override
 
AZ::ComponentTypeList GetRequiredSystemComponents () const override
 
void CreateStaticModules (AZStd::vector< AZ::Module * > &outModules) override
 
void ResolveEnginePath (AZStd::string &engineRelativePath) const override
 ApplicationRequests::Bus::Handler.
 
void CalculateBranchTokenForEngineRoot (AZStd::string &token) const override
 
bool IsEditorModeFeedbackEnabled () const override
 
bool IsPrefabSystemEnabled () const override
 
bool ArePrefabWipFeaturesEnabled () const override
 
void SetPrefabSystemEnabled (bool enable) override
 
bool IsPrefabSystemForLevelsEnabled () const override
 
bool ShouldAssertForLegacySlicesUsage () const override
 
const CommandLine * GetCommandLine () override
 
const CommandLine * GetApplicationCommandLine () override
 
void MakePathRootRelative (AZStd::string &fullPath) override
 
void MakePathAssetRootRelative (AZStd::string &fullPath) override
 
void MakePathRelative (AZStd::string &fullPath, const char *rootPath) override
 
void NormalizePath (AZStd::string &path) override
 
void NormalizePathKeepCase (AZStd::string &path) override
 
void PumpSystemEventLoopOnce () override
 
void PumpSystemEventLoopUntilEmpty () override
 
void PumpSystemEventLoopWhileDoingWorkInNewThread (const AZStd::chrono::milliseconds &eventPumpFrequency, const AZStd::function< void()> &workForNewThread, const char *newThreadName) override
 
void RunMainLoop () override
 
void ExitMainLoop () override
 
bool WasExitMainLoopRequested () override
 
void TerminateOnError (int errorCode) override
 
AZ::Uuid GetComponentTypeId (const AZ::EntityId &entityId, const AZ::ComponentId &componentId) override
 

Static Public Member Functions

static void Exit (int errorCode)
 

Protected Member Functions

virtual void StartCommon (AZ::Entity *systemEntity)
 
void SetFileIOAliases ()
 
void RegisterCoreComponents () override
 AZ::ComponentApplication.
 
void Reflect (AZ::ReflectContext *context) override
 
AZStd::string ResolveFilePath (AZ::u32 providerId) override
 UserSettingsFileLocatorBus.
 
AZ::Component * EnsureComponentAdded (AZ::Entity *systemEntity, const AZ::Uuid &typeId)
 
template<typename ComponentType >
AZ::Component * EnsureComponentAdded (AZ::Entity *systemEntity)
 
virtual const char * GetCurrentConfigurationName () const
 
void CreateReflectionManager () override
 

Protected Attributes

AZ::StringFunc::Path::FixedString m_configFilePath
 
AZStd::unique_ptr< AZ::IO::LocalFileIOm_directFileIO
 
AZStd::unique_ptr< AZ::IO::FileIOBase > m_archiveFileIO
 

‍The Direct file IO instance is a LocalFileIO.


 
AZStd::unique_ptr< AZ::IO::Archivem_archive
 

‍The Default file IO instance is a ArchiveFileIO.


 
AZStd::unique_ptr< Implementationm_pimpl
 

‍The AZ::IO::Instance


 
AZStd::unique_ptr< AZ::NativeUI::NativeUIRequests > m_nativeUI
 
AZStd::unique_ptr< AZ::InstancePoolManager > m_poolManager
 
bool m_ownsConsole = false
 
bool m_exitMainLoopRequested = false
 

Constructor & Destructor Documentation

◆ Application()

AzFramework::Application::Application ( int *  argc,
char ***  argv 
)

recommended: supply &argc and &argv from void main(...) here.

You can pass your command line parameters from main here so that they are thus available in GetCommandLine later, and can be retrieved. see notes in GetArgC() and GetArgV() for details about the arguments.

Member Function Documentation

◆ SetFileIOAliases()

void AzFramework::Application::SetFileIOAliases ( )
protected

set the LocalFileIO and ArchiveFileIO instances file aliases if the FileIOBase environment variable is pointing to the instances owned by the application

◆ Start()

virtual void AzFramework::Application::Start ( const Descriptor &  descriptor,
const StartupParameters &  startupParameters = StartupParameters() 
)
virtual

Executes the AZ:ComponentApplication::Create method and initializes Application constructs. Uses a variant to maintain backwards compatibility with both the Start(const Descriptor& descriptor, const StartupParamters&) and the Start(const char* descriptorFile, const StaartupParameters&) overloads

◆ StartCommon()

virtual void AzFramework::Application::StartCommon ( AZ::Entity *  systemEntity)
protectedvirtual

Called by Start method. Override to add custom startup logic.

◆ Stop()

virtual void AzFramework::Application::Stop ( )
virtual

Executes AZ::ComponentApplication::Destroy, and shuts down Application specific constructs.


The documentation for this class was generated from the following file: