ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
d_ptr.h File Reference

Copyright © Audi Electronics Venture GmbH. More...

Go to the source code of this file.

Classes

class  d_ptr_impl< _PARENT, _PRIVATE_D >
 Template to implement the Private class of the global d_pointer definitions. More...
 
class  d_ptr< _PARENT, _PRIVATE_D >
 Template class for the d-pointer Reference class withing the Parent Class. More...
 

Namespaces

namespace  A_UTILS_NS
 ADTF A_UTIL Namespace - Within adtf this is used as util or adtf_util.
 

Macros

#define A_UTILS_D_CLASS(__dclassname_, __pclassname_)
 Concrete d-pointer definition.
 
#define A_UTILS_D(__pclassname_)
 Helper macro for d-pattern definitions.
 
#define A_UTILS_D_CREATE_CLASS(__classname_)
 concrete d-pointer instance
 
#define A_UTILS_D_CREATE(__classname_)
 helper macro for d-pattern usage.
 
#define A_UTILS_DECLARE_LOCAL_D(__classname_)
 helper macro that defines a local variable "_D" that points to the private implementation.
 
#define A_UTILS_P_DECLARE_CLASS(__d_classname_, __p_classname_)
 Helper Macro to declare the class header.
 
#define A_UTILS_P_DECLARE(__p_classname_)
 Helper Macro to generate the private class name and to declare the class header.
 
#define A_UTILS_P_CLASS(__p_classname_)
 Helper Macro to generate the private class name.
 
#define A_UTILS_P_DECLARE_CLASS_PRE(__d_classname_, __p_classname_)
 Helper Macro to declare the private class which has no implementation yet.
 
#define A_UTILS_P_DECLARE_PRE(__p_classname_)
 Helper Macro to declare the private class which has no implementation yet.
 

Functions

template<typename _PARENT, typename _PRIVATE_D>
tVoid swap (A_UTILS_NS::d_ptr< _PARENT, _PRIVATE_D > &i_oLHS, A_UTILS_NS::d_ptr< _PARENT, _PRIVATE_D > &i_oRHS)
 std::swap specialization for AUTILSDPtr for perfect fit on ADL
 

Detailed Description

Copyright © Audi Electronics Venture GmbH.

All rights reserved

Definition in file d_ptr.h.

Macro Definition Documentation

◆ A_UTILS_D

#define A_UTILS_D ( __pclassname_)
Value:
A_UTILS_D_CLASS(__pclassname_ ## Private, __pclassname_)
#define A_UTILS_D_CLASS(__dclassname_, __pclassname_)
Concrete d-pointer definition.
Definition d_ptr.h:256

Helper macro for d-pattern definitions.

this macro should be used by developer It declares the the Private Class see A_UTILS_D_CLASS.

Parameters
[in]__pclassname_parent class name
See also
page_d_pointer

Definition at line 270 of file d_ptr.h.

◆ A_UTILS_D_CLASS

#define A_UTILS_D_CLASS ( __dclassname_,
__pclassname_ )
Value:
private: \
class __dclassname_; \
friend class __dclassname_;
Template class for the d-pointer Reference class withing the Parent Class.
Definition d_ptr.h:117

Concrete d-pointer definition.

This d-Pointer definition is used to create a d-Pointer Reference to the Private implementation of the class. To do so it will use the d_ptr template.

Parameters
[in]__dclassname_d pointer class name.
[in]__pclassname_parent class name.
See also
d_ptr, page_d_pointer

Definition at line 256 of file d_ptr.h.

◆ A_UTILS_D_CREATE

#define A_UTILS_D_CREATE ( __classname_)
Value:
A_UTILS_D_CREATE_CLASS(__classname_ ## Private)
#define A_UTILS_D_CREATE_CLASS(__classname_)
concrete d-pointer instance
Definition d_ptr.h:277

helper macro for d-pattern usage.

Parameters
[in]__classname_parent class name
See also
page_d_pointer

Definition at line 286 of file d_ptr.h.

◆ A_UTILS_D_CREATE_CLASS

#define A_UTILS_D_CREATE_CLASS ( __classname_)
Value:
_d = new __classname_(); \
_d->Set_p(this)

concrete d-pointer instance

Parameters
[in]__classname_parent class
See also
page_d_pointer

Definition at line 277 of file d_ptr.h.

◆ A_UTILS_DECLARE_LOCAL_D

#define A_UTILS_DECLARE_LOCAL_D ( __classname_)
Value:
__classname_ ## Private* _D = _d.Get_d()

helper macro that defines a local variable "_D" that points to the private implementation.

Parameters
[in]__classname_parent class name
See also
page_d_pointer

Definition at line 293 of file d_ptr.h.

◆ A_UTILS_P_CLASS

#define A_UTILS_P_CLASS ( __p_classname_)
Value:
__p_classname_::__p_classname_ ## Private

Helper Macro to generate the private class name.

Parameters
[in]__p_classname_The Parent Class

Definition at line 312 of file d_ptr.h.

◆ A_UTILS_P_DECLARE

#define A_UTILS_P_DECLARE ( __p_classname_)
Value:
A_UTILS_P_DECLARE_CLASS(__p_classname_ ## Private, __p_classname_)
#define A_UTILS_P_DECLARE_CLASS(__d_classname_, __p_classname_)
Helper Macro to declare the class header.
Definition d_ptr.h:300

Helper Macro to generate the private class name and to declare the class header.

Parameters
[in]__p_classname_The Parent Class

Definition at line 306 of file d_ptr.h.

◆ A_UTILS_P_DECLARE_CLASS

#define A_UTILS_P_DECLARE_CLASS ( __d_classname_,
__p_classname_ )
Value:
class __p_classname_::__d_classname_ : public A_UTILS_NS::d_ptr_impl<__p_classname_, __p_classname_::__d_classname_>
Template to implement the Private class of the global d_pointer definitions.
Definition d_ptr.h:22

Helper Macro to declare the class header.

Parameters
[in]__d_classname_The Private D Class
[in]__p_classname_The Parent Class

Definition at line 300 of file d_ptr.h.

◆ A_UTILS_P_DECLARE_CLASS_PRE

#define A_UTILS_P_DECLARE_CLASS_PRE ( __d_classname_,
__p_classname_ )
Value:
A_UTILS_P_DECLARE_CLASS(__d_classname_, __p_classname_)\
{ \
friend class __p_classname_; \
public: \
__d_classname_(){}; \
virtual ~__d_classname_(){}; \
};

Helper Macro to declare the private class which has no implementation yet.

Parameters
[in]__d_classname_The Private D Class
[in]__p_classname_The Parent Class

Definition at line 319 of file d_ptr.h.

◆ A_UTILS_P_DECLARE_PRE

#define A_UTILS_P_DECLARE_PRE ( __p_classname_)
Value:
A_UTILS_P_DECLARE_CLASS_PRE(__p_classname_ ## Private, __p_classname_)
#define A_UTILS_P_DECLARE_CLASS_PRE(__d_classname_, __p_classname_)
Helper Macro to declare the private class which has no implementation yet.
Definition d_ptr.h:319

Helper Macro to declare the private class which has no implementation yet.

It will generate the private classname.

Parameters
[in]__p_classname_The Parent Class

Definition at line 333 of file d_ptr.h.

Function Documentation

◆ swap()

template<typename _PARENT, typename _PRIVATE_D>
tVoid swap ( A_UTILS_NS::d_ptr< _PARENT, _PRIVATE_D > & i_oLHS,
A_UTILS_NS::d_ptr< _PARENT, _PRIVATE_D > & i_oRHS )
inline

std::swap specialization for AUTILSDPtr for perfect fit on ADL

Template Parameters
_PARENTParent type for both d_ptr implementations
_PRIVATE_DPrivate type for both d_ptr implementations
Parameters
[in,out]i_oLHSLeft hand side swap object
[in,out]i_oRHSRight hand side swap object
Postcondition
i_oLHS and i_oRHS swapped contents.

Definition at line 237 of file d_ptr.h.

References d_ptr< _PARENT, _PRIVATE_D >::Swap().