Proxy for the top-level INCA COM automation object. More...
#include <IncaProxy.hpp>


Public Member Functions | |
| IncaProxy (pacemaker::inca::detail::unique_com_ptr<::IDispatch > idispatch) | |
Constructs the proxy by narrowing a generic IDispatch to Inca_Dispatch. | |
| IncaProxy (IncaProxy &&)=default | |
| Move constructor transfers ownership of the COM connection. | |
| IncaProxy & | operator= (IncaProxy &&)=default |
| Move assignment transfers ownership of the COM connection. | |
| ~IncaProxy () | |
Destructor; calls DisconnectFromTool() if the COM pointer is valid. | |
| auto | GetOpenedExperiment () -> pacemaker::inca::detail::unique_com_ptr<::IDispatch > |
| Returns the COM object representing the currently open experiment. | |
| auto | GetOpenedExperimentView () -> pacemaker::inca::detail::unique_com_ptr<::IDispatch > |
| Returns the COM object representing the currently open experiment view. | |
Proxy for the top-level INCA COM automation object.
IncaProxy wraps the Inca_Dispatch COM interface, which is the root entry point of the INCA autoamation API. It provides access to the currently open experiment and experiment-view objects.
On destruction, DisconnectFromTool() is called on the underlying COM object so that INCA is notified that the client has disconnected. This ensures INCA is not left in a stale connected state after the session ends.
The class is move-only; copying is deleted to prevent accidental duplication of the COM connection.
IDispatch pointer via CoCreateIntance(CLSID_Inca, ...) before constructing.Definition at line 33 of file IncaProxy.hpp.
| IncaProxy | ( | pacemaker::inca::detail::unique_com_ptr<::IDispatch > | idispatch | ) |
Constructs the proxy by narrowing a generic IDispatch to Inca_Dispatch.
Calls QueryInterface internally via pacemaker::inca::detail::query_interface.
| idispatch | Owning pointer to a generic IDispatch obtained from CoCreateInstance. Ownership is transferred to the proxy. |
| std::invalid_argument | if idispatch is nullptr. |
| std::runtime_error | if QueryInterface fails to obtain Inca_Dispatch. |
| ~IncaProxy | ( | ) |
Destructor; calls DisconnectFromTool() if the COM pointer is valid.
Notifies INCA that automation client is disconnecting. This method is safe to call even if the proxy was move-constructed from, in which case the internal pointer is nullptr and no COM call is made.
Move assignment transfers ownership of the COM connection.
|
nodiscard |
Returns the COM object representing the currently open experiment.
The returned pointer wraps an IDispatch that can be narrowed to IncaOnlineExperiment_Dispatch by constructing an IncaOnlineExperimentProxy.
IDispatch pointer for the open experiment.| std::runtime_error | if the underlying COM call fails or returns a nullptr. |
|
nodiscard |
Returns the COM object representing the currently open experiment view.
The returned pointer wraps an IDispatch that can be narrowed to IncaExperimentView_Dispatch by constructing an IncaExperimentViewProxy.
IDispatch pointer to the open experiment view.| std::runtime_error | if the underlying COM call fails or returns a nullptr. |