21 template<
typename INTERFACE>
25 std::shared_ptr<IRPCObjectClient> m_pObjectCLient;
26 INTERFACE* m_pInterface =
nullptr;
32 Reset(oVal.m_pObjectCLient);
36 Reset(oVal.m_pObjectCLient);
41 std::swap(m_pObjectCLient, oVal.m_pObjectCLient);
42 std::swap(m_pInterface, oVal.m_pInterface);
46 std::swap(m_pObjectCLient, oVal.m_pObjectCLient);
47 std::swap(m_pInterface, oVal.m_pInterface);
66 explicit operator bool()
const
68 return (m_pInterface !=
nullptr);
71 const std::shared_ptr<IRPCObjectClient>& GetObjectClient()
const
73 return m_pObjectCLient;
76 INTERFACE& GetInterface()
const
81 INTERFACE* operator->()
const
86 tResult Reset(
const std::shared_ptr<IRPCObjectClient>& oObject)
override
92 if (strIID.IsEqual(adtf::ucom::get_iid<INTERFACE>()))
94 m_pInterface =
dynamic_cast<INTERFACE*
>(oObject.get());
96 m_pObjectCLient = oObject;
113 m_pInterface =
nullptr;
114 m_pObjectCLient.reset();
118 template<
typename INTERFACE,
typename RPC_CLIENT_OBJECT_FACTORY>
122 RPC_CLIENT_OBJECT_FACTORY::CreateClient(oObj, adtf::ucom::get_iid<INTERFACE>(), strFullURL);
126 template<
typename INTERFACE,
typename RPC_CLIENT_OBJECT_FACTORY>
130 RPC_CLIENT_OBJECT_FACTORY::CreateClient(oObj, adtf::ucom::get_iid<INTERFACE>(), strHostURL, strObjectName);
136 using ant::rpc_object_client_ptr;
137 using ant::make_rpc_object_client_ptr;
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
#define RETURN_ERROR(code)
Return specific error code, which requires the calling function's return type to be tResult.
#define RETURN_IF_POINTER_NULL(_ptr)
Return ERR_POINTER if _ptr is nullptr, which requires the calling function's return type to be tResul...
A common result class usable as return value throughout.
string_base< cStackString > cString
cString implementation for a stack string which works on stack if string is lower than A_UTILS_DEFAUL...
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.
#define adtf_string_intf(__string__)
The adtf_string_intf Macro helps to easily create a rvalue reference of a adtf::util::cString.