Base status manager. More...
#include <mi32/mistatus.h>

Classes | |
| class | CONTEXT_PRIV |
| Base for private manager-specific info to store with context. More... | |
| class | SAVERESTORE |
Public Member Functions | |
| MISTATUSMANAGER () | |
| virtual | ~MISTATUSMANAGER () |
| MTIMER & | GetTimer () |
| bool | IsCancelled () |
| bool | ReportTimeElapsed () |
| void | ReportTimerValue (const MTIMER &timer) |
| void | ResetCancelled () |
| void | RestartTimer () |
| void | SetAsActive () |
| void | SetCancelEnabled (bool enabled) |
Static Public Member Functions | |
| static MISTATUSMANAGER * | GetActiveManager () |
| static MISTATUSMANAGER * | SetActiveManager (MISTATUSMANAGER *manager) |
| static void | SetCreator (FastDelegate< MISTATUSMANAGER *()> DelegateCreateManager) |
Protected Types | |
| typedef MILIST< MISTATUSCONTEXT * > | CONTEXTLIST |
Protected Member Functions | |
| void | ClearContextList () |
| const CONTEXTLIST & | GetContextList (MITHREAD::CRITICALSECTION::LOCK &Lock) const |
| MISYSTEM::THREAD_ID | GetCreatorThreadID () const |
| bool | IsCancelSet () const |
| void | ReportMessage (MISTATUSCONTEXT &context, const MISTRING &msgstr) |
| void | SetCancelled () |
Private Member Functions | |
Overridables | |
| virtual CONTEXT_PRIV * | v_ContextPrivCreate (MISTATUSCONTEXT &Context) |
| virtual bool | v_IsCancelled () |
| virtual void | v_ReportBegin (MISTATUSCONTEXT &context, const MISTRING &msgstr) |
| virtual void | v_ReportEnd (MISTATUSCONTEXT &context, const MISTRING &msgstr, const MISTRING &timerstr) |
| virtual void | v_ReportMessage (MISTATUSCONTEXT &context, const MISTRING &msgstr) |
| virtual void | v_ReportProgress (MISTATUSCONTEXT &context, double pctdone) |
| virtual void | v_ReportTimerValue (const MTIMER &timer) |
| virtual void | v_ResetCancelled () |
| virtual void | v_SetCancelEnabled (bool enabled) |
| virtual void | v_UpdateUI () |
Base status manager.
Most methods should not be called directly as they are called by MISTATUSCONTEXT where needed.
typedef MILIST<MISTATUSCONTEXT*> MISTATUSMANAGER::CONTEXTLIST [protected] |
| MISTATUSMANAGER::MISTATUSMANAGER | ( | ) |
Default constructor.
Will set newly constructed manager as active manager for current thread.
| virtual MISTATUSMANAGER::~MISTATUSMANAGER | ( | ) | [virtual] |
Destructor.
If this instance is the active manager for the current thread, the active manager will be set to NULL.
| void MISTATUSMANAGER::ClearContextList | ( | ) | [protected] |
Clear current context list.
| static MISTATUSMANAGER* MISTATUSMANAGER::GetActiveManager | ( | ) | [static] |
Get active status manager for current thread.
Typically only used if creating status context is conditional upon having enough steps in a task for reporting to be worthwhile.
| const CONTEXTLIST& MISTATUSMANAGER::GetContextList | ( | MITHREAD::CRITICALSECTION::LOCK & | Lock | ) | const [protected] |
Get list of pointers to attached contexts.
| Lock | Must be a LOCK that is not assigned to a Critical section, This method will assign it. |
| MISYSTEM::THREAD_ID MISTATUSMANAGER::GetCreatorThreadID | ( | ) | const [inline, protected] |
Get ID of thread in which manager was created.
| MTIMER& MISTATUSMANAGER::GetTimer | ( | ) | [inline] |
Get timer.
| bool MISTATUSMANAGER::IsCancelled | ( | ) |
Check if operation has been cancelled.
When cancelled state is first detected, all attached contexts will be set as cancelled.
| bool MISTATUSMANAGER::IsCancelSet | ( | ) | const [inline, protected] |
Determine if "cancelled" state has been set.
| void MISTATUSMANAGER::ReportMessage | ( | MISTATUSCONTEXT & | context, | |
| const MISTRING & | msgstr | |||
| ) | [inline, protected] |
Report message.
Used internally by STATUSCONTEXT, not usually called directly.
| bool MISTATUSMANAGER::ReportTimeElapsed | ( | ) |
Report time elapsed.
| void MISTATUSMANAGER::ReportTimerValue | ( | const MTIMER & | timer | ) | [inline] |
Report timer value.
| void MISTATUSMANAGER::ResetCancelled | ( | ) |
Reset cancelled state.
Does not reset cancelled state of already attached contexts.
| void MISTATUSMANAGER::RestartTimer | ( | ) | [inline] |
Reset and start timer.
| static MISTATUSMANAGER* MISTATUSMANAGER::SetActiveManager | ( | MISTATUSMANAGER * | manager | ) | [static] |
Set active status manager for current thread.
| void MISTATUSMANAGER::SetAsActive | ( | ) | [inline] |
Set instance to be active status manager.
| void MISTATUSMANAGER::SetCancelEnabled | ( | bool | enabled | ) |
Set whether cancel is enabled.
| void MISTATUSMANAGER::SetCancelled | ( | ) | [protected] |
Set "cancelled" state.
When cancelled state is first set, all attached contexts will be set as cancelled.
| static void MISTATUSMANAGER::SetCreator | ( | FastDelegate< MISTATUSMANAGER *()> | DelegateCreateManager | ) | [static] |
Set status manager creator for current thread.
For interactive applications this is usually only called for main application thread. The creator is used when no active manager is set and a STATUSCONTEXT is constructed.
| virtual CONTEXT_PRIV* MISTATUSMANAGER::v_ContextPrivCreate | ( | MISTATUSCONTEXT & | Context | ) | [private, virtual] |
Create private manager-specific information for context.
Default implementation needs no private info and so returns NULL.
| virtual bool MISTATUSMANAGER::v_IsCancelled | ( | ) | [private, virtual] |
Determine if cancel has been requested.
Default implementation always returns false.
| virtual void MISTATUSMANAGER::v_ReportBegin | ( | MISTATUSCONTEXT & | context, | |
| const MISTRING & | msgstr | |||
| ) | [private, virtual] |
| virtual void MISTATUSMANAGER::v_ReportEnd | ( | MISTATUSCONTEXT & | context, | |
| const MISTRING & | msgstr, | |||
| const MISTRING & | timerstr | |||
| ) | [private, virtual] |
| virtual void MISTATUSMANAGER::v_ReportMessage | ( | MISTATUSCONTEXT & | context, | |
| const MISTRING & | msgstr | |||
| ) | [private, virtual] |
| virtual void MISTATUSMANAGER::v_ReportProgress | ( | MISTATUSCONTEXT & | context, | |
| double | pctdone | |||
| ) | [private, virtual] |
Report progress.
Default implementation does nothing.
| virtual void MISTATUSMANAGER::v_ReportTimerValue | ( | const MTIMER & | timer | ) | [private, virtual] |
Report timer value.
Default implementation does nothing.
| virtual void MISTATUSMANAGER::v_ResetCancelled | ( | ) | [private, virtual] |
Reset cancelled state.
Default implementation does nothing.
| virtual void MISTATUSMANAGER::v_SetCancelEnabled | ( | bool | enabled | ) | [private, virtual] |
Set whether cancel is enabled.
Only needs to be implemented to update user interface, as state is retained by STATUSMANAGER itself.
| virtual void MISTATUSMANAGER::v_UpdateUI | ( | ) | [private, virtual] |
Update user interface display.
Default implementation does nothing.
1.6.1