ATLAS Offline Software
Public Types | Public Member Functions | List of all members
SG::CopyConversion< SRC, DST > Class Template Referenceabstract

Base class for copy conversions, templated on source and destination classes. More...

#include <BaseInfo.h>

Inheritance diagram for SG::CopyConversion< SRC, DST >:
Collaboration diagram for SG::CopyConversion< SRC, DST >:

Public Types

typedef DST target_type
 The destination class. More...
 

Public Member Functions

virtual void * create () const
 Create an instance of the destination class. More...
 
virtual void destroy (void *p) const
 Destroy an instance of the destination class. More...
 
virtual void convertUntyped (const void *src, void *dst) const
 Convert the contents of an instance of the source class SRC to an instance of the destination class DST. More...
 
virtual void convert (const SRC &src, DST &dst) const =0
 Convert the contents of an instance of the source class SRC to an instance of the destination class DST. More...
 

Detailed Description

template<class SRC, class DST>
class SG::CopyConversion< SRC, DST >

Base class for copy conversions, templated on source and destination classes.

Definition at line 406 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.

Member Typedef Documentation

◆ target_type

template<class SRC , class DST >
typedef DST SG::CopyConversion< SRC, DST >::target_type

The destination class.

Definition at line 411 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.

Member Function Documentation

◆ convert()

template<class SRC , class DST >
virtual void SG::CopyConversion< SRC, DST >::convert ( const SRC &  src,
DST &  dst 
) const
pure virtual

Convert the contents of an instance of the source class SRC to an instance of the destination class DST.

(Type-safe version.)

Implemented in IParticleLinkContainerToIParticleContainerConverter, and INav4MomLinkContainerToINavigable4MomentumCollectionConverter.

◆ convertUntyped()

template<class SRC , class DST >
virtual void SG::CopyConversion< SRC, DST >::convertUntyped ( const void *  src,
void *  dst 
) const
inlinevirtual

Convert the contents of an instance of the source class SRC to an instance of the destination class DST.

Implements SG::CopyConversionBase.

Definition at line 421 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.

422  {
423  convert (*reinterpret_cast<const SRC*>(src),
424  *reinterpret_cast<DST*>(dst));
425  }

◆ create()

template<class SRC , class DST >
virtual void* SG::CopyConversion< SRC, DST >::create ( ) const
inlinevirtual

Create an instance of the destination class.

Implements SG::CopyConversionBase.

Definition at line 414 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.

414 { return new DST; }

◆ destroy()

template<class SRC , class DST >
virtual void SG::CopyConversion< SRC, DST >::destroy ( void *  p) const
inlinevirtual

Destroy an instance of the destination class.

Implements SG::CopyConversionBase.

Definition at line 417 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.

417 { delete reinterpret_cast<DST*>(p); }

The documentation for this class was generated from the following file:
WriteCellNoiseToCool.src
src
Definition: WriteCellNoiseToCool.py:513
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
SG::CopyConversion::convert
virtual void convert(const SRC &src, DST &dst) const =0
Convert the contents of an instance of the source class SRC to an instance of the destination class D...