ADTF  3.18.2
named_graph_object< INTERFACE >

Default convenient implementation for INamedGraphObject. More...

Inheritance diagram for named_graph_object< INTERFACE >:
[legend]

Public Member Functions

 named_graph_object ()
 CTOR.
 
virtual ~named_graph_object ()=default
 DTOR.
 
 named_graph_object (const char *strName)
 CTOR with name. More...
 
tResult SetName (const char *strName) override
 Sets the Name of the object. More...
 
tResult GetName (base::ant::IString &&strName) const override
 Gets the Name of the object. More...
 
tResult SetParent (const ucom::ant::IObject *poParentObject) override
 Sets Parent of the object. More...
 
tResult GetParent (const ucom::ant::IObject *&poParentObject) const override
 Gets the Parent of the object. More...
 
- Public Member Functions inherited from object< INamedGraphObject, INamedGraphObject >
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object. More...
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying. More...
 
void Destroy () const override
 Destruct and deallocate instantiations of type IObject. More...
 
- Public Member Functions inherited from IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 Marks the IObject to be castable with the ucom_cast() More...
 

Protected Member Functions

 named_graph_object (const named_graph_object &)=delete
 delete copy CTOR
 
 named_graph_object (named_graph_object &&)=delete
 delete move CTOR
 
named_graph_objectoperator= (const named_graph_object &)=delete
 delete copy operator
 
named_graph_objectoperator= (named_graph_object &&)=delete
 delete move operator
 
void LogNamedMessage (const char *strMessage)
 Helper to log a message with the full name of the object. More...
 
- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 

Private Attributes

const ucom::ant::IObjectm_pParent = nullptr
 parent of the named object
 
adtf_util::cString m_strName
 name of the
 

Detailed Description

template<typename INTERFACE = INamedGraphObject>
class adtf::streaming::ant::named_graph_object< INTERFACE >

Default convenient implementation for INamedGraphObject.

If your own type is derived from INamedGraphObject and you want to use this default implementation use the derived type as parameter Interface to prevent multiple inheritance.

Template Parameters
Interfacetype that derives from INamedGraphObject.

Definition at line 30 of file named_graph_object.h.

Constructor & Destructor Documentation

◆ named_graph_object()

named_graph_object ( const char *  strName)
inline

CTOR with name.

Parameters
[in]strNameName of object

Definition at line 56 of file named_graph_object.h.

Member Function Documentation

◆ GetName()

tResult GetName ( base::ant::IString &&  strName) const
inlineoverride

Gets the Name of the object.

Parameters
[in,out]strNameName of object
Returns
Standard Result Code of adtf::base::IString::Set

Definition at line 74 of file named_graph_object.h.

References named_graph_object< INTERFACE >::m_strName, and RETURN_NOERROR.

◆ GetParent()

tResult GetParent ( const ucom::ant::IObject *&  poParentObject) const
inlineoverride

Gets the Parent of the object.

Parameters
[out]poParentObjectParent of object returned
Returns
Standard Result Code
Return values
ERR_NOT_INITIALIZEDNo Parent set.

Definition at line 97 of file named_graph_object.h.

References named_graph_object< INTERFACE >::m_pParent, RETURN_ERROR, and RETURN_NOERROR.

◆ LogNamedMessage()

void LogNamedMessage ( const char *  strMessage)
inlineprotected

Helper to log a message with the full name of the object.

Parameters
[in]strMessageMessage to log
Returns
void

Definition at line 116 of file named_graph_object.h.

References string_base< cStackString >::Format(), adtf::streaming::ant::get_named_graph_object_full_name(), and LOG_DUMP.

◆ SetName()

tResult SetName ( const char *  strName)
inlineoverride

Sets the Name of the object.

Parameters
[in]strNameName of object
Returns
Standard Result Code

Definition at line 64 of file named_graph_object.h.

References named_graph_object< INTERFACE >::m_strName, and RETURN_NOERROR.

Referenced by binding_proxy< INTERFACE, INTERFACE_CHECK >::binding_proxy().

◆ SetParent()

tResult SetParent ( const ucom::ant::IObject poParentObject)
inlineoverride

Sets Parent of the object.

Parameters
[in]poParentObjectParent of object
Remarks
Make sure the parent lives longer then the child.
Returns
Standard Result Code

Definition at line 85 of file named_graph_object.h.

References named_graph_object< INTERFACE >::m_pParent, and RETURN_NOERROR.