21 template<
typename INTERFACE>
25 std::shared_ptr<IRPCObjectClient> m_pObjectCLient;
26 INTERFACE* m_pInterface =
nullptr;
29 rpc_object_client_ptr() =
default;
30 rpc_object_client_ptr(
const rpc_object_client_ptr& oVal):
31 m_pObjectCLient(oVal.m_pObjectCLient), m_pInterface(oVal.m_pInterface)
34 rpc_object_client_ptr& operator=(
const rpc_object_client_ptr& oVal)
36 m_pObjectCLient = oVal.m_pObjectCLient;
37 m_pInterface = oVal.m_pInterface;
40 rpc_object_client_ptr(rpc_object_client_ptr&& oVal)
42 std::swap(m_pObjectCLient, oVal.m_pObjectCLient);
43 std::swap(m_pInterface, oVal.m_pInterface);
45 rpc_object_client_ptr& operator=(rpc_object_client_ptr&& oVal)
47 std::swap(m_pObjectCLient, oVal.m_pObjectCLient);
48 std::swap(m_pInterface, oVal.m_pInterface);
52 rpc_object_client_ptr(
const std::shared_ptr<IRPCObjectClient>& pObjectCLient)
56 rpc_object_client_ptr& operator=(
const std::shared_ptr<IRPCObjectClient>& pObjectCLient)
62 ~rpc_object_client_ptr()
67 explicit operator bool()
const
69 return (m_pInterface !=
nullptr);
72 const std::shared_ptr<IRPCObjectClient>& GetObjectClient()
const
74 return m_pObjectCLient;
77 INTERFACE& GetInterface()
const
82 INTERFACE* operator->()
const
87 tResult Reset(
const std::shared_ptr<IRPCObjectClient>& oObject)
override
93 if constexpr (std::is_base_of_v<ucom::IObject, INTERFACE>)
99 m_pInterface =
dynamic_cast<INTERFACE*
>(oObject.get());
102 m_pObjectCLient = oObject;
113 m_pInterface =
nullptr;
114 m_pObjectCLient.reset();
118 template<
typename INTERFACE,
typename RPC_CLIENT_OBJECT_FACTORY>
126 template<
typename INTERFACE,
typename RPC_CLIENT_OBJECT_FACTORY>
136 using ant::rpc_object_client_ptr;
137 using ant::make_rpc_object_client_ptr;
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Definition result.h:29
#define RETURN_IF_POINTER_NULL(_ptr)
Return ERR_POINTER if _ptr is nullptr, which requires the calling function's return type to be tResul...
Definition result.h:49
Definition rpc_object_client_intf.h:27
Definition rpc_object_client.h:23
Namespace for all functionality of the ADTF Remote SDK provided since v3.0.
Definition adtf_remote_clock_intf.h:16
Namespace for the ADTF Remote SDK.
Definition adtf_client_connector.h:16
InterfacePointerType ucom_cast(ObjectPointerType i_pObject) noexcept
Alias always bringing the latest version of ant::ucom_cast() into scope.
Definition ucom_cast.h:157
constexpr const char * get_iid() noexcept
Alias bringing the latest version of ant::get_iid() into scope.
Definition adtf_iid.h:429
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14