Struct IAppControl#
Defined in File app.h
Inheritance Relationships#
Derived Type#
public CAppControl
(Class CAppControl)
Struct Documentation#
-
struct IAppControl#
Local application control.
Subclassed by CAppControl
Public Functions
-
virtual bool Startup(const sdv::u8string &ssConfig, IInterfaceAccess *pEventHandler) = 0#
Start the application.
The core will prepare for an application start based on the provided configuration. Per default, the application will be in running mode after successful startup.
- Parameters:
ssConfig – [in] String containing the configuration to be used by the core during startup. This configuration is optional. If not provided the application runs as standalone application without any RPC support.
pEventHandler – [in] Pointer to the event handler receiving application events. For the handler to receive events, the handler needs to expose the IAppEvent interface. This pointer is optionally and can be NULL.
- Returns:
Returns ‘true’ on successful start-up and ‘false’ on failed startup.
-
virtual void RunLoop() = 0#
Running loop until shutdown request is triggered.
-
virtual void Shutdown(bool bForce) = 0#
Initiate a shutdown of the application.
The objects will be called to shutdown allowing them to clean up and gracefully shutdown. If, for some reason, the object cannot shut down (e.g. pointers are still in use or threads are not finalized), the object will be kept alive and the application state will stay in shutting-down-state. In that case the exception is called. A new call to the shutdown function using the force-flag might force a shutdown. Alternatively the application can wait until the application state changes to not-started.
Remark
Application shutdown is only possible when all components are released.
- Parameters:
bForce – [in] When set, forces an application shutdown. This might result in loss of data and should only be used as a last resort.
- boolean Startup (in u8string ssConfig, in IInterfaceAccess pEventHandler)
Start the application.
The core will prepare for an application start based on the provided configuration. Per default, the application will be in running mode after successful startup.
- Parameters:
ssConfig – [in] String containing the configuration to be used by the core during startup. This configuration is optional. If not provided the application runs as standalone application without any RPC support.
pEventHandler – [in] Pointer to the event handler receiving application events. For the handler to receive events, the handler needs to expose the IAppEvent interface. This pointer is optionally and can be NULL.
- Returns:
Returns ‘true’ on successful start-up and ‘false’ on failed startup.
-
void RunLoop()
Running loop until shutdown request is triggered.
- void Shutdown (in boolean bForce)
Initiate a shutdown of the application.
The objects will be called to shutdown allowing them to clean up and gracefully shutdown. If, for some reason, the object cannot shut down (e.g. pointers are still in use or threads are not finalized), the object will be kept alive and the application state will stay in shutting-down-state. In that case the exception is called. A new call to the shutdown function using the force-flag might force a shutdown. Alternatively the application can wait until the application state changes to not-started.
Remark
Application shutdown is only possible when all components are released.
- Parameters:
bForce – [in] When set, forces an application shutdown. This might result in loss of data and should only be used as a last resort.
Public Static Attributes
-
static ::sdv::interface_id _id = 0xED694A7D83569900#
Interface ID.
-
virtual bool Startup(const sdv::u8string &ssConfig, IInterfaceAccess *pEventHandler) = 0#