ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
object_intf.h
Go to the documentation of this file.
1
7#pragma once
8
9#define _ADTF_UCOM_ANT_OBJECT_INTERFACE_INCLUDES_HEADER_
10
11#include <adtfucom3/adtf_iid.h>
12
13namespace adtf
14{
15namespace ucom
16{
17namespace ant
18{
19
20namespace detail
21{
22
23//forward declaration needed for friend classes in different namespaces
24class object_reference_counter;
25
26}//ns detail
33{
34public:
39 ADTF_IID(IObject, "object.ant.ucom.adtf.iid");
40
41private:
43 friend class detail::object_reference_counter;
44
46 template<typename InterfaceType, bool>
47 friend struct detail::ucom_cast_to_implicit_cast;
48
49 // ucom_cast functionality
70 virtual tResult GetInterface(const char* i_strIID, void*& o_pInterface) = 0;
71
76 virtual tResult GetInterface(const char* i_strIID, const void*& o_pInterface) const = 0;
77
97 [[deprecated("Use of Destroy results in a mismatched deallocation. Use adtf::ucom::allocate_object_ptr "
98 "instead.")]] virtual void
99 Destroy() const = 0;
100
101protected:
103 ~IObject() = default;
104}; // class IObject
105
106} // namespace ant
107
110
111} // namespace ucom
112} // namespace adtf
113
114//*************************************************************************************************
Copyright © Audi Electronics Venture GmbH.
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Base class for every interface type within the uCOM.
Definition object_intf.h:33
virtual tResult GetInterface(const char *i_strIID, const void *&o_pInterface) const =0
Provides const correct interface querying.
ADTF_IID(IObject, "object.ant.ucom.adtf.iid")
Marks the IObject to be castable with the ucom_cast()
virtual tResult GetInterface(const char *i_strIID, void *&o_pInterface)=0
Query interfaces on an object.
~IObject()=default
Protected destructor --> Only the final implementation can be destroyed!
virtual void Destroy() const =0
Destruct and deallocate instantiations of type IObject.
Namespace for all internally used uCOM functionality implemented.
Namespace for all functionality provided since v3.0.
Namespace for the ADTF uCOM3 SDK.
ant::IObject IObject
Alias always bringing the latest version of ant::IObject into scope.
Namespace for entire ADTF SDK.