#include <mw/coemain.h>
class CCoeStatic : public CBase |
Public Member Enumerations | |
---|---|
enum | anonymous { EDefaultDestructionPriority } |
enum | TScope { EThread, EApp } |
Public Member Functions | |
---|---|
~CCoeStatic() |
Protected Member Functions | |
---|---|
CCoeStatic() | |
CCoeStatic(TUid, TScope) | |
CCoeStatic(TUid, TInt, TScope) |
Base class for creating singleton objects that will be stored by CCoeEnv.
Each object must have a unique TUid.
Symbian OS does not provide writeable global static data. Singleton objects provide its equivalent in thread local storage, which is supported.
This behaviour is useful for objects in which only one copy is ever needed in the thread or application, e.g. in alert windows.
Constructor specifying a unique UID and the destruction priority and scope of the object.
Parameter | Description |
---|---|
aUid | The unique UID. |
aDestructionPriority | Priority determining the order of destruction relative to other CCoeStatic-derived objects. The higher the destruction-priority of the object, the earlier that object is deleted. Objects with a positive destruction-priority are destroyed before the CCoeAppUi object is destroyed. Objects with a negative destruction-priority are destroyed after the CCoeAppUi object is destroyed. |
aScope | The scope of access to the object. By default, the object can be accessed from anywhere in the thread (EThread). |