CommandObserverInterface Class Reference

#include <commandobservable.h>

Inheritance diagram for CommandObserverInterface:

Detailed Description

Implements Observables for the command system.

Public Member Functions

 MAXON_OBSERVABLE (Result< void >, ObservableCommandStatus,(const Id &commandId, const DataDictionary &statusMessage), ObservableCombinerRunAllComponent)
 
 MAXON_OBSERVABLE (Result< void >, ObservableCommandInvoked,(const Id &commandId, const Result< COMMANDRESULT > &result), ObservableCombinerRunAllComponent)
 
 MAXON_OBSERVABLE (Result< void >, ObservableCommandPrepareInfo,(const Id &commandId, const CommandDataRef &data), ObservableCombinerRunAllComponent)
 
 MAXON_OBSERVABLE (Result< void >, ObservableCommandInvokedInfo,(const Id &commandId, const Result< COMMANDRESULT > &result, const CommandDataRef &data, const InvocationState &interactionState), ObservableCombinerRunAllComponent)
 

Private Member Functions

 MAXON_INTERFACE (CommandObserverInterface, MAXON_REFERENCE_NORMAL, "net.maxon.command.interface.observer")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( CommandObserverInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.command.interface.observer"   
)
private

◆ MAXON_OBSERVABLE() [1/4]

MAXON_OBSERVABLE ( Result< void >  ,
ObservableCommandStatus  ,
(const Id &commandId, const DataDictionary &statusMessage)  ,
ObservableCombinerRunAllComponent   
)

ObservableCommandStatus can be sent from each command to update the progress of the command execution. Can be subscribed for example to update status bars.

Parameters
[in]commandIdThe command id.
[in]statusMessageA dictionary containing the status messages.

◆ MAXON_OBSERVABLE() [2/4]

MAXON_OBSERVABLE ( Result< void >  ,
ObservableCommandInvoked  ,
(const Id &commandId, const Result< COMMANDRESULT > &result ,
ObservableCombinerRunAllComponent   
)

ObservableCommandInvoked is sent by the command system whenever a command is invoked.

Parameters
[in]commandIdThe command id.
[in]resultThe result of the command invocation.

◆ MAXON_OBSERVABLE() [3/4]

MAXON_OBSERVABLE ( Result< void >  ,
ObservableCommandPrepareInfo  ,
(const Id &commandId, const CommandDataRef &data)  ,
ObservableCombinerRunAllComponent   
)

ObservableCommandPrepareInfo is sent by the command system between the GetState and the Execute calls.

Parameters
[in]commandIdThe command id.
[in]dataThe command data.

◆ MAXON_OBSERVABLE() [4/4]

MAXON_OBSERVABLE ( Result< void >  ,
ObservableCommandInvokedInfo  ,
(const Id &commandId, const Result< COMMANDRESULT > &result, const CommandDataRef &data, const InvocationState &interactionState)  ,
ObservableCombinerRunAllComponent   
)

ObservableCommandInvokedInfo is sent by the command system at each stage of the command invokation.

Parameters
[in]commandIdThe command id.
[in]resultThe result of the command invocation.
[in]dataThe command data.
[in]interactionStateThe stage of interaction.