ADTF  3.18.2
object_info_intf.h
Go to the documentation of this file.
1 
8 #ifndef _ADTF_UCOM_ANT_OBJECT_INFO_INTERFACE_INCLUDES_HEADER_
9 #define _ADTF_UCOM_ANT_OBJECT_INFO_INTERFACE_INCLUDES_HEADER_
10 
11 namespace adtf
12 {
13 namespace ucom
14 {
15 namespace ant
16 {
17 
22 class DOEXPORT IObjectInfo : public IClassInfo
23 {
24 public:
29  ADTF_IID(IObjectInfo, "object_info.ant.ucom.adtf.iid");
30 
31 public:
41  virtual void SetOID(const char* strName) = 0;
42 
50  virtual const char* GetOID() const = 0;
51 
52 
53 
54 protected:
56  ~IObjectInfo() = default;
57 };
58 
59 }//namespace ant
60 
63 
64 #define ADTF_OBJECT_INFO_IMPL(_variable_) \
65  adtf::util::cString _variable_; \
66  void SetOID(const char* strOID) override \
67  { \
68  _variable_ = strOID; \
69  } \
70  const char* GetOID() const override \
71  { \
72  return _variable_.GetPtr(); \
73  } \
74 
75 
76 
77 
78 }//namespace ucom
79 }//namespace adtf
80 
81 #endif //_ADTF_UCOM_ANT_OBJECT_INFO_INTERFACE_INCLUDES_HEADER_
@ brief The IClassInfo interface provides a standardized way to access type information.
The IObjectInfo interface provides methods for getting and setting class information.
ADTF_IID(IObjectInfo, "object_info.ant.ucom.adtf.iid")
Marks the IObjectInfo to be castable with the ucom_cast<>
~IObjectInfo()=default
Protected destructor --> Use implemented Destroy() instead of delete!
virtual const char * GetOID() const =0
Returns the object instance name.
virtual void SetOID(const char *strName)=0
Sets the object instance name.
ant::IObjectInfo IObjectInfo
Alias always bringing the latest version of ant::IObjectInfo into scope.
Namespace for entire ADTF SDK.