XFcApp class Reference

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XFcApp Class Reference

Defines an X-Forge application. More...

List of all members.

## Public Member Functions

XFCIMPORT | XFcApp ()
| Constructor; sets application to be found with XFcCore::getApp().
virtual XFCIMPORT | ~XFcApp ()
| Virtual destructor.
virtual XFCIMPORT void | onAppInit ()
| Called upon application init.
virtual XFCIMPORT void | onTick ()
| Called every frame (before rendering).
virtual XFCIMPORT void | onAppDeinit ()
| Called on application quit (cleanup).
virtual XFCIMPORT INT | onDeviceStateEvent (INT32 aEvent, INT32 aSeverity, void *aMoreInfo)
| Called when the device state changes in a way that affects the application.

## Detailed Description

Defines an X-Forge application.

Each X-Forge application has exactly one copy of an application class. This object is owned by the core. The XFcApp-extended class is usually instantiated in the xfcAppInit() function. Since the default constructor stores a pointer to the class within the core, the application does not need to keep track of the object. (And since static global data is illegal, the application couldn't keep track of the object even if it wanted).

## Constructor & Destructor Documentation

XFCIMPORT XFcApp::XFcApp | ( |  | ) |

| Constructor; sets application to be found with XFcCore::getApp(). This constructor registers the application instance into the core. If more than one instance of XFcApp-extended classes are created, the application quits.

virtual XFCIMPORT XFcApp::~XFcApp | ( |  | ) | `[virtual]`

| Virtual destructor. The destructor is called by the core when application quits.

## Member Function Documentation

virtual XFCIMPORT void XFcApp::onAppDeinit | ( |  | ) | `[virtual]`

| Called on application quit (cleanup). You should do most of your clean-up in this function. The core calls this function when it is shutting down.

virtual XFCIMPORT void XFcApp::onAppInit | ( |  | ) | `[virtual]`

| Called upon application init. Once the core has been initialized, the application onAppInit() method is called.

virtual XFCIMPORT INT XFcApp::onDeviceStateEvent | ( | INT32 | aEvent,
|  | INT32 | aSeverity,
|  | void * | aMoreInfo
| ) | `[virtual]`

Called when the device state changes in a way that affects the application.

It is highly recommended that the application overrides this method and acts according to the events. If severity is medium, it is recommended that the application goes to pause mode, and it is especially critical that all audio is paused. If severity is critical, the application should shut down its threads and quit.

Parameters:

  aEvent | See XFCDEVICESTATEEVENTS enumerated type.
  aSeverity | See XFCDEVICESTATEEVENTSEVERITY enumerated type.
  aMoreInfo | More information of the event; depends on the event type and platform.

Returns:
  Undefined, should return 0.

  Platform specific behavior
  | XFCDSE_FOCUSLOST
  DesktopWindows | Supported, XFCDSE_SEVERITY_MODERATE
  PocketPC | Supported, XFCDSE_SEVERITY_MODERATE
  Smartphone2002 | Supported, XFCDSE_SEVERITY_MODERATE
  Series60 | Supported, XFCDSE_SEVERITY_MODERATE
  UIQ | Supported, XFCDSE_SEVERITY_MODERATE
  Palm | Supported, XFCDSE_SEVERITY_MODERATE
  | XFCDSE_FOCUSGAIN
  DesktopWindows | Supported, XFCDSE_SEVERITY_NOTE
  PocketPC | Supported, XFCDSE_SEVERITY_NOTE
  Smartphone2002 | Supported, XFCDSE_SEVERITY_NOTE
  Series60 | Supported, XFCDSE_SEVERITY_NOTE
  UIQ | Supported, XFCDSE_SEVERITY_NOTE
  Palm | Supported, XFCDSE_SEVERITY_NOTE
  | XFCDSE_AUDIOLOST
  DesktopWindows | Unsupported
  PocketPC | Unsupported
  Smartphone2002 | Unsupported
  Series60 | Supported, XFCDSE_SEVERITY_MODERATE
  UIQ | Supported, XFCDSE_SEVERITY_MODERATE
  Palm | Unsupported
  | XFCDSE_KILLSIGNAL
  DesktopWindows | Supported, XFCDSE_SEVERITY_CRITICAL
  PocketPC | Supported, XFCDSE_SEVERITY_CRITICAL
  Smartphone2002 | Supported, XFCDSE_SEVERITY_CRITICAL
  Series60 | Supported, XFCDSE_SEVERITY_CRITICAL
  UIQ | Supported, XFCDSE_SEVERITY_CRITICAL
  Palm | Supported, XFCDSE_SEVERITY_CRITICAL
  | XFCDSE_MEDIACHANGED
  DesktopWindows | Unsupported
  PocketPC | Unsupported
  Smartphone2002 | Unsupported
  Series60 | Unsupported
  UIQ | Unsupported
  Palm | Supported, XFCDSE_SEVERITY_NOTE
  | XFCDSE_LOWMEMORY
  DesktopWindows | Unsupported
  PocketPC | Unsupported
  Smartphone2002 | Unsupported
  Series60 | Unsupported
  UIQ | Unsupported
  Palm | Unsupported
  | XFCDSE_PHONEEVENT
  DesktopWindows | Unsupported
  PocketPC | Unsupported
  Smartphone2002 | Unsupported
  Series60 | Unsupported
  UIQ | Unsupported
  Palm | Unsupported

virtual XFCIMPORT void XFcApp::onTick | ( |  | ) | `[virtual]`

| Called every frame (before rendering). This is a good candidate for events that must occur everywhere in the application, regardless of the current renderer.

|  | X-Forge Documentation Confidential Copyright © 2002-2003 Fathammer |  | Documentation generated with doxygen by Dimitri van Heesch