CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
edm::Wrapper< T > Class Template Reference

#include <BasicHandle.h>

Inheritance diagram for edm::Wrapper< T >:
edm::WrapperBase

Public Types

typedef T value_type
 
typedef T wrapped_type
 

Public Member Functions

T const * operator-> () const
 
T const * product () const
 
 Wrapper ()
 
 Wrapper (std::unique_ptr< T > ptr)
 
 Wrapper (T *)
 
virtual ~Wrapper ()
 
- Public Member Functions inherited from edm::WrapperBase
std::type_info const & dynamicTypeInfo () const
 
void fillPtrVector (std::type_info const &iToType, std::vector< unsigned long > const &iIndicies, std::vector< void const * > &oPtr) const
 
void fillView (ProductID const &id, std::vector< void const * > &view, helper_vector_ptr &helpers) const
 
bool hasIsProductEqual () const
 
bool isMergeable () const
 
bool isPresent () const
 
bool isProductEqual (WrapperBase const *newProduct) const
 
bool mergeProduct (WrapperBase const *newProduct)
 
bool sameType (WrapperBase const &other) const
 
void setPtr (std::type_info const &iToType, unsigned long iIndex, void const *&oPtr) const
 
std::type_info const & wrappedTypeInfo () const
 
 WrapperBase ()
 
virtual ~WrapperBase ()
 

Static Public Member Functions

static short Class_Version ()
 
static std::type_info const & productTypeInfo ()
 
static std::type_info const & typeInfo ()
 

Private Member Functions

virtual void do_fillPtrVector (std::type_info const &iToType, std::vector< unsigned long > const &iIndices, std::vector< void const * > &oPtr) const
 
virtual void do_fillView (ProductID const &id, std::vector< void const * > &pointers, helper_vector_ptr &helpers) const
 
virtual void do_setPtr (std::type_info const &iToType, unsigned long iIndex, void const *&oPtr) const
 
virtual std::type_info const & dynamicTypeInfo_ () const
 
virtual bool hasIsProductEqual_ () const
 
virtual bool isMergeable_ () const
 
virtual bool isPresent_ () const
 
virtual bool isProductEqual_ (WrapperBase const *newProduct) const
 
virtual bool mergeProduct_ (WrapperBase const *newProduct)
 
Wrapper< T > & operator= (Wrapper< T > const &)
 
virtual std::type_info const & wrappedTypeInfo_ () const
 
 Wrapper (Wrapper< T > const &rh)
 

Private Attributes

T obj
 
bool present
 

Detailed Description

template<typename T>
class edm::Wrapper< T >

Definition at line 43 of file BasicHandle.h.

Member Typedef Documentation

template<typename T>
typedef T edm::Wrapper< T >::value_type

Definition at line 31 of file Wrapper.h.

template<typename T>
typedef T edm::Wrapper< T >::wrapped_type

Definition at line 32 of file Wrapper.h.

Constructor & Destructor Documentation

template<typename T>
edm::Wrapper< T >::Wrapper ( )
inline

Definition at line 33 of file Wrapper.h.

33 : WrapperBase(), present(false), obj() {}
bool present
Definition: Wrapper.h:79
template<typename T>
edm::Wrapper< T >::Wrapper ( std::unique_ptr< T ptr)
explicit

Definition at line 281 of file Wrapper.h.

References edm::Wrapper< T >::obj, edm::Wrapper< T >::present, and relativeConstraints::value.

281  :
282  WrapperBase(),
283  present(ptr.get() != 0),
284  obj() {
285  if (present) {
286  // The following will call swap if T has such a function,
287  // and use assignment if T has no such function.
289  DoSwap<T>,
290  DoAssign<T> >::type swap_or_assign;
291  swap_or_assign(obj, *ptr);
292  }
293  }
type
Definition: HCALResponse.h:21
bool present
Definition: Wrapper.h:79
template<typename T>
virtual edm::Wrapper< T >::~Wrapper ( )
inlinevirtual

Definition at line 37 of file Wrapper.h.

37 {}
template<typename T>
edm::Wrapper< T >::Wrapper ( T ptr)

Definition at line 296 of file Wrapper.h.

References edm::Wrapper< T >::obj, edm::Wrapper< T >::present, groupFilesInBlocks::temp, and relativeConstraints::value.

296  :
297  WrapperBase(),
298  present(ptr != 0),
299  obj() {
300  std::unique_ptr<T> temp(ptr);
301  if (present) {
302  // The following will call swap if T has such a function,
303  // and use assignment if T has no such function.
305  DoSwap<T>,
306  DoAssign<T> >::type swap_or_assign;
307  swap_or_assign(obj, *ptr);
308  }
309 
310  }
type
Definition: HCALResponse.h:21
bool present
Definition: Wrapper.h:79
template<typename T>
edm::Wrapper< T >::Wrapper ( Wrapper< T > const &  rh)
private

Member Function Documentation

template<typename T>
static short edm::Wrapper< T >::Class_Version ( )
inlinestatic

Definition at line 49 of file Wrapper.h.

51 :
52  virtual bool isPresent_() const GCC11_OVERRIDE {return present;}
#define GCC11_OVERRIDE
bool present
Definition: Wrapper.h:79
virtual bool isPresent_() const
Definition: Wrapper.h:52
string const
Definition: compareJSON.py:14
template<typename T >
void edm::Wrapper< T >::do_fillPtrVector ( std::type_info const &  iToType,
std::vector< unsigned long > const &  iIndices,
std::vector< void const * > &  oPtr 
) const
privatevirtual

Implements edm::WrapperBase.

Definition at line 169 of file Wrapper.h.

References getGTfromDQMFile::obj, and relativeConstraints::value.

171  {
173  DoSetPtr<T>,
174  DoNotSetPtr<T> >::type maybe_filler;
175  maybe_filler(this->obj, iToType, iIndices, oPtr);
176  }
type
Definition: HCALResponse.h:21
template<typename T >
void edm::Wrapper< T >::do_fillView ( ProductID const &  id,
std::vector< void const * > &  pointers,
helper_vector_ptr helpers 
) const
inlineprivatevirtual

Implements edm::WrapperBase.

Definition at line 113 of file Wrapper.h.

References getGTfromDQMFile::obj, and relativeConstraints::value.

115  {
117  DoFillView<T>,
118  DoNotFillView<T> >::type maybe_filler;
119  maybe_filler(obj, id, pointers, helpers);
120  }
type
Definition: HCALResponse.h:21
template<typename T >
void edm::Wrapper< T >::do_setPtr ( std::type_info const &  iToType,
unsigned long  iIndex,
void const *&  oPtr 
) const
inlineprivatevirtual

Implements edm::WrapperBase.

Definition at line 159 of file Wrapper.h.

References getGTfromDQMFile::obj, and relativeConstraints::value.

161  {
163  DoSetPtr<T>,
164  DoNotSetPtr<T> >::type maybe_filler;
165  maybe_filler(this->obj, iToType, iIndex, oPtr);
166  }
type
Definition: HCALResponse.h:21
template<typename T>
virtual std::type_info const& edm::Wrapper< T >::dynamicTypeInfo_ ( ) const
inlineprivatevirtual

Implements edm::WrapperBase.

Definition at line 53 of file Wrapper.h.

53 {return typeid(T);}
long double T
template<typename T >
bool edm::Wrapper< T >::hasIsProductEqual_ ( ) const
privatevirtual

Reimplemented from edm::WrapperBase.

Definition at line 333 of file Wrapper.h.

References getGTfromDQMFile::obj, and relativeConstraints::value.

333  {
335  DoHasIsProductEqual<T>,
336  DoNotHasIsProductEqual<T> >::type has_is_equal;
337  return has_is_equal(obj);
338  }
type
Definition: HCALResponse.h:21
template<typename T >
bool edm::Wrapper< T >::isMergeable_ ( ) const
privatevirtual

Reimplemented from edm::WrapperBase.

Definition at line 315 of file Wrapper.h.

References getGTfromDQMFile::obj, and relativeConstraints::value.

315  {
317  IsMergeable<T>,
318  IsNotMergeable<T> >::type is_mergeable;
319  return is_mergeable(obj);
320  }
type
Definition: HCALResponse.h:21
template<typename T>
virtual bool edm::Wrapper< T >::isPresent_ ( ) const
inlineprivatevirtual

Reimplemented from edm::WrapperBase.

Definition at line 52 of file Wrapper.h.

52 {return present;}
bool present
Definition: Wrapper.h:79
template<typename T >
bool edm::Wrapper< T >::isProductEqual_ ( WrapperBase const *  newProduct) const
privatevirtual

Reimplemented from edm::WrapperBase.

Definition at line 341 of file Wrapper.h.

References compareJSON::const, getGTfromDQMFile::obj, and relativeConstraints::value.

341  {
342  Wrapper<T> const* wrappedNewProduct = dynamic_cast<Wrapper<T> const*>(newProduct);
343  assert(wrappedNewProduct != nullptr);
345  DoIsProductEqual<T>,
346  DoNotIsProductEqual<T> >::type is_equal;
347  return is_equal(obj, wrappedNewProduct->obj);
348  }
type
Definition: HCALResponse.h:21
string const
Definition: compareJSON.py:14
template<typename T >
bool edm::Wrapper< T >::mergeProduct_ ( WrapperBase const *  newProduct)
privatevirtual

Reimplemented from edm::WrapperBase.

Definition at line 323 of file Wrapper.h.

References compareJSON::const, getGTfromDQMFile::obj, and relativeConstraints::value.

323  {
324  Wrapper<T> const* wrappedNewProduct = dynamic_cast<Wrapper<T> const*>(newProduct);
325  assert(wrappedNewProduct != nullptr);
327  DoMergeProduct<T>,
328  DoNotMergeProduct<T> >::type merge_product;
329  return merge_product(obj, wrappedNewProduct->obj);
330  }
type
Definition: HCALResponse.h:21
string const
Definition: compareJSON.py:14
template<typename T>
T const* edm::Wrapper< T >::operator-> ( ) const
inline

Definition at line 39 of file Wrapper.h.

39 {return product();}
T const * product() const
Definition: Wrapper.h:38
template<typename T>
Wrapper<T>& edm::Wrapper< T >::operator= ( Wrapper< T > const &  )
private
template<typename T>
T const* edm::Wrapper< T >::product ( ) const
inline
template<typename T>
static std::type_info const& edm::Wrapper< T >::productTypeInfo ( )
inlinestatic

Definition at line 42 of file Wrapper.h.

42 {return typeid(T);}
long double T
template<typename T>
static std::type_info const& edm::Wrapper< T >::typeInfo ( )
inlinestatic
template<typename T>
virtual std::type_info const& edm::Wrapper< T >::wrappedTypeInfo_ ( ) const
inlineprivatevirtual

Implements edm::WrapperBase.

Definition at line 54 of file Wrapper.h.

54 {return typeid(Wrapper<T>);}

Member Data Documentation

template<typename T>
T edm::Wrapper< T >::obj
private
template<typename T>
bool edm::Wrapper< T >::present
private