Application Class Reference

#include <application.h>

Detailed Description

Application wide functions. Implement this interface to be able to link against the kernel library.

Static Public Member Functions

static MAXON_METHOD Result< UrlGetUrl (APPLICATION_URLTYPE urlType)
 
static MAXON_METHOD Result< UrlGetTempUrl (const Url &directory)
 
static MAXON_METHOD Result< BaseArray< Url > > GetModulePaths ()
 
static MAXON_METHOD Int GetCommandLineArgCount ()
 
static MAXON_METHOD String GetCommandLineArg (Int idx)
 
static MAXON_METHOD DataDictionary GetMachineInfo ()
 
static MAXON_METHOD APPLICATIONMODE GetApplicationMode ()
 
static MAXON_METHOD APPLICATIONTYPE GetApplicationType ()
 
static MAXON_METHOD Bool SetApplicationMode (APPLICATIONMODE mode)
 
static MAXON_METHOD Result< void > GetVersion (Int &version, String &buildID)
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (Application, MAXON_REFERENCE_NONE, "net.maxon.interface.application")
 

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( Application  ,
MAXON_REFERENCE_NONE  ,
"net.maxon.interface.application"   
)
private

◆ GetUrl()

static MAXON_METHOD Result<Url> GetUrl ( APPLICATION_URLTYPE  urlType)
static

Returns the requested url.

Parameters
[in]urlTypeType of the url, see APPLICATION_URLTYPE.
Returns
Url containing the requested.

◆ GetTempUrl()

static MAXON_METHOD Result<Url> GetTempUrl ( const Url directory)
static

Returns a new unique url for a temporary file. A typical use for this is Url tempfile = Application::GetTempUrl(tempDirectory);

Parameters
[in]directoryDirectory url where the temporary file should be created in.
Returns
Url pointing to the temporary file.

◆ GetModulePaths()

static MAXON_METHOD Result<BaseArray<Url> > GetModulePaths ( )
static

Returns all module paths configured through g_modulePath, g_additionalModulePath and user preferences.

Returns
Array containing all paths that are searched for modules.

◆ GetCommandLineArgCount()

static MAXON_METHOD Int GetCommandLineArgCount ( )
static

Returns the number of command line arguments delivered to the app on startup.

Returns
Number of arguments to request via GetCommandLineArg().

◆ GetCommandLineArg()

static MAXON_METHOD String GetCommandLineArg ( Int  idx)
static

Returns a command line argument.

Parameters
[in]idxThe index of the argument. (0 >= idx < GetCommandLineArgCount()).
Returns
The requested argument.

◆ GetMachineInfo()

static MAXON_METHOD DataDictionary GetMachineInfo ( )
static

Returns information about the system and processor. See maxon::MACHINEINFO for DataDictionary properties.

◆ GetApplicationMode()

static MAXON_METHOD APPLICATIONMODE GetApplicationMode ( )
static

Retrieves the current application mode. This mode defines the behavior after the startup is done.

Returns
The current application mode.

◆ GetApplicationType()

static MAXON_METHOD APPLICATIONTYPE GetApplicationType ( )
static

Retrieves the current application type. This type defines what kind of application this is.

◆ SetApplicationMode()

static MAXON_METHOD Bool SetApplicationMode ( APPLICATIONMODE  mode)
static

Sets a new application mode. This mode defines the behavior after the startup is done. Please note that it's only possible to raise the mode from APPLICATIONMODE::DONTWAIT to APPLICATIONMODE::KEEPRUNNING.

Parameters
[in]modeThe new mode to be set.
Returns
True if the function changed the mode successfully.

◆ GetVersion()

static MAXON_METHOD Result<void> GetVersion ( Int version,
String buildID 
)
static

Gets the version number and build ID.

Parameters
[out]versionThe version number will be assigned to this value.
[out]buildIDVariable that will hold the buildID.