MachineInterface Class Reference

#include <machine.h>

Inheritance diagram for MachineInterface:

详细描述

This class is the entry point to access machine interfaces. So there is no difference if the machine is running local or remote via rpc.

公共成员函数

MAXON_METHOD String   GetUniqueId () const
MAXON_METHOD Result < DataDictionary >  GetMachineInfo () const
MAXON_METHOD Result < ObjectRef >  GetInterface (const Id &interfaceName)
template<typename INTERFACE >
MAXON_FUNCTION Result < INTERFACE >  GetInterface ()
MAXON_METHOD MACHINESTATE   GetState () const
MAXON_METHOD Bool   SetState ( MACHINESTATE stateMask, MACHINESTATE stateFlags)
MAXON_METHOD String   ToString (const FormatStatement *formatStatement=nullptr) const
  MAXON_OBSERVABLE (void, ObservableMessageReceived,(const MachineRef &machine, const DataDictionary &data), ObservableCombinerRunAllComponent)

私有成员函数

  MAXON_INTERFACE ( MachineInterface , MAXON_REFERENCE_NORMAL , "net.maxon.interface.machine")

成员函数文档编制

◆  MAXON_INTERFACE()

MAXON_INTERFACE ( MachineInterface   ,
MAXON_REFERENCE_NORMAL   ,
"net.maxon.interface.machine"   
)
private

◆  GetUniqueId()

MAXON_METHOD String GetUniqueId ( ) const

Returns the service name of the local machine. This name is a unique name which allows to identify the machine.

◆  GetMachineInfo()

MAXON_METHOD Result <DataDictionary> GetMachineInfo ( ) const

Returns information about the system and processor. See maxon::MACHINEINFO for DataDictionary properties.

◆  GetInterface() [1/2]

MAXON_METHOD Result <ObjectRef> GetInterface ( const Id interfaceName )

Returns a interface of this machine. E.g. write OSClipboardRef clipboard = machine.GetInterface<OSClipboardRef>(); to get the clipboard interface handle. Don't use the Interface function but the overloaded NetworkRPCMachine::GetInterface<>() template instead. THREADSAFE. It automatically detects the interfaceName and casts the type.

参数
[in] interfaceName INTERFACE::_interface.GetId().
返回
If successful the handle to the interface is returned.

◆  GetInterface() [2/2]

MAXON_FUNCTION Result <INTERFACE> GetInterface ( )

Returns a interface of a machine. e.g. write OSClipboardRef clipboard = machine.GetInterface<OSClipboardRef>(); to get the clipboard interface handle. At the moment supported are: OSGuiRef, OSClipboardRef, GameServerRef, CaptureDeviceListRef, UpdaterRef.

返回
If the function is successful the handle to the interface is returned.

◆  GetState()

MAXON_METHOD MACHINESTATE GetState ( ) const

Returns the machine state of the given machine. See MACHINEINFO 了解细节。

◆  SetState()

MAXON_METHOD Bool SetState ( MACHINESTATE   stateMask ,
MACHINESTATE   stateFlags  
)

** private ** Sets the machine state of the given machine. This function should not be called by users. It's private for internal functions.

参数
[in] stateMask Mask of flags that should be changed.
[in] stateFlags Values of flags that be set.
返回
True if the function succeeded.

◆  ToString()

MAXON_METHOD String ToString ( const FormatStatement formatStatement = nullptr ) const

Returns a readable string of the content.

参数
[in] formatStatement Nullptr or additional formatting instruction. Use "{N}" for nive formatting of the name only. Otherwise the unique id is printed together with the name.
返回
The converted result.

◆  MAXON_OBSERVABLE()

MAXON_OBSERVABLE ( void  ,
ObservableMessageReceived  ,
(const MachineRef &machine, const DataDictionary &data)  ,
ObservableCombinerRunAllComponent   
)