24template <
typename ...Classes>
28 template<
typename ...InnerClasses>
43 template<
typename Class,
typename ...InnerClasses>
44 struct dispatch<Class, InnerClasses...>
48 const tChar* strNameOfObject =
"")
59 oObject.
Reset(pCreatedObject);
60 if (oObject.
Get() ==
nullptr)
72 return dispatch<InnerClasses...>::CreateInstance(strCID, oObject, strNameOfObject);
80 dispatch<InnerClasses...>::AddClassInfo(lstOfClasses);
87 class_factory& operator=(
const class_factory&) =
delete;
88 class_factory& operator=(class_factory&&) =
delete;
118 const tChar* strNameOfObject =
"")
const
124 adtf_util::cString strClassToCreate(strCID);
126 if (strClassToCreate.IsEmpty())
131 return dispatch<Classes...>::CreateInstance(strCID, oObject, strNameOfObject);
142 dispatch<Classes...>::AddClassInfo(lstOfClasses);
150using ant::class_factory;
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define RETURN_ERROR_DESC(_code,...)
Same as RETURN_ERROR(_error) using a printf like parameter list for detailed error description.
Definition result.h:44
#define RETURN_CURRENT_EXCEPTION()
returns the current exception as a tResult, use it in a catch block.
Definition result.h:111
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Definition result.h:29
#define RETURN_ERROR(code)
Return specific error code, which requires the calling function's return type to be tResult.
Definition result.h:42
#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
virtual ~class_factory()
Definition class_factory.h:101
class_factory()
Definition class_factory.h:94
virtual tResult CreateInstance(const char *strCID, iobject_ptr< IObject > &oObject, const tChar *strNameOfObject="") const
Definition class_factory.h:116
tResult GetClasses(iobject_enum< const IClassInfo > &lstOfClasses) const
Enumerates all classes supported by the class factory and pushes it to lstOfClasses This method shoul...
Definition class_factory.h:140
Definition object_list.h:22
virtual tResult PushObject(const value_type &oObject)=0
virtual tResult Reset(const iobject_ptr< T > &i_oOther)=0
Reset this object_ptr<> with the content of another iobject_ptr<>
virtual T * Get() const =0
Get raw pointer to shared object.
Base object pointer to realize binary compatible reference counting in interface methods.
Definition object_ptr_intf.h:112
Definition object_ptr.h:384
Namespace for all functionality of the ADTF UCOM SDK provided since v3.0.
Definition test_runtime.h:14
constexpr const char * get_class_id()
Definition class_id.h:110
object_ptr< const adtf::ucom::ant::IClassInfo > get_class_info()
Definition class_info.h:109
object_ptr< Implementation > make_object_ptr(Args &&... args)
Create an instance of type object_ptr with Implementation as the shared resource.
Definition object_ptr_utilities.h:129
Namespace for the ADTF uCOM SDK.
Definition adtf_system.h:324
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14