DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Protected Attributes | List of all members
dd4hep::detail::CopyDeleteExtension< Q, T > Class Template Reference

Implementation class for the object extension mechanism. More...

#include <ExtensionEntry.h>

Inheritance diagram for dd4hep::detail::CopyDeleteExtension< Q, T >:
dd4hep::ExtensionEntry

Public Member Functions

 CopyDeleteExtension ()=delete
 Default constructor. More...
 
 CopyDeleteExtension (T *p)
 Initializing constructor. More...
 
 CopyDeleteExtension (const CopyDeleteExtension &copy)=default
 Copy constructor. More...
 
virtual ~CopyDeleteExtension ()=default
 Default destructor. More...
 
CopyDeleteExtensionoperator= (const CopyDeleteExtension &copy)=default
 Assignment operator. More...
 
virtual void * copy (void *) const override
 Virtual object copy operator. More...
 
virtual void destruct () const override
 Virtual object destructor. More...
 
virtual void * object () const override
 Virtual object accessor. More...
 
virtual ExtensionEntryclone (void *arg) const override
 Virtual entry clone function. More...
 
virtual unsigned long long int hash64 () const override
 Hash value. More...
 
- Public Member Functions inherited from dd4hep::ExtensionEntry
virtual ~ExtensionEntry ()=default
 Default destructor. More...
 
void invalidCall (const char *tag) const
 Callback on invalid call invokation. More...
 

Protected Attributes

T * ptr = 0
 
Q * iface = 0
 

Additional Inherited Members

- Protected Member Functions inherited from dd4hep::ExtensionEntry
 ExtensionEntry ()=default
 Default constructor. More...
 
 ExtensionEntry (const ExtensionEntry &copy)=default
 Copy constructor. More...
 

Detailed Description

template<typename Q, typename T>
class dd4hep::detail::CopyDeleteExtension< Q, T >

Implementation class for the object extension mechanism.

This implementation class supports the object extension mechanism for dd4hep. It is ensured, that on the object destruction or on request the reference to the user object may be destructed.

Note: User object must be taken from the heap using "new". Note: The double-template implementation is necessary to support extensions using a virtual inheritance relationship between the interface and the concrete implementation of the extension object.

Author
M.Frank
Date
13.08.2013

Definition at line 168 of file ExtensionEntry.h.

Constructor & Destructor Documentation

◆ CopyDeleteExtension() [1/3]

template<typename Q , typename T >
dd4hep::detail::CopyDeleteExtension< Q, T >::CopyDeleteExtension ( )
delete

Default constructor.

◆ CopyDeleteExtension() [2/3]

template<typename Q , typename T >
dd4hep::detail::CopyDeleteExtension< Q, T >::CopyDeleteExtension ( T *  p)
inline

Initializing constructor.

Definition at line 176 of file ExtensionEntry.h.

◆ CopyDeleteExtension() [3/3]

template<typename Q , typename T >
dd4hep::detail::CopyDeleteExtension< Q, T >::CopyDeleteExtension ( const CopyDeleteExtension< Q, T > &  copy)
default

Copy constructor.

◆ ~CopyDeleteExtension()

template<typename Q , typename T >
virtual dd4hep::detail::CopyDeleteExtension< Q, T >::~CopyDeleteExtension ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ clone()

template<typename Q , typename T >
virtual ExtensionEntry* dd4hep::detail::CopyDeleteExtension< Q, T >::clone ( void *  arg) const
inlineoverridevirtual

Virtual entry clone function.

Implements dd4hep::ExtensionEntry.

Definition at line 191 of file ExtensionEntry.h.

◆ copy()

template<typename Q , typename T >
virtual void* dd4hep::detail::CopyDeleteExtension< Q, T >::copy ( void *  ) const
inlineoverridevirtual

Virtual object copy operator.

Implements dd4hep::ExtensionEntry.

Definition at line 184 of file ExtensionEntry.h.

◆ destruct()

template<typename Q , typename T >
virtual void dd4hep::detail::CopyDeleteExtension< Q, T >::destruct ( ) const
inlineoverridevirtual

Virtual object destructor.

Implements dd4hep::ExtensionEntry.

Definition at line 186 of file ExtensionEntry.h.

◆ hash64()

template<typename Q , typename T >
virtual unsigned long long int dd4hep::detail::CopyDeleteExtension< Q, T >::hash64 ( ) const
inlineoverridevirtual

Hash value.

Implements dd4hep::ExtensionEntry.

Definition at line 194 of file ExtensionEntry.h.

◆ object()

template<typename Q , typename T >
virtual void* dd4hep::detail::CopyDeleteExtension< Q, T >::object ( ) const
inlineoverridevirtual

Virtual object accessor.

Implements dd4hep::ExtensionEntry.

Definition at line 188 of file ExtensionEntry.h.

◆ operator=()

template<typename Q , typename T >
CopyDeleteExtension& dd4hep::detail::CopyDeleteExtension< Q, T >::operator= ( const CopyDeleteExtension< Q, T > &  copy)
default

Assignment operator.

Member Data Documentation

◆ iface

template<typename Q , typename T >
Q* dd4hep::detail::CopyDeleteExtension< Q, T >::iface = 0
mutableprotected

Definition at line 171 of file ExtensionEntry.h.

◆ ptr

template<typename Q , typename T >
T* dd4hep::detail::CopyDeleteExtension< Q, T >::ptr = 0
protected

Definition at line 170 of file ExtensionEntry.h.


The documentation for this class was generated from the following file: