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 edm::ViewTypeChecker

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 ()
 
- Public Member Functions inherited from edm::ViewTypeChecker
std::type_info const & memberTypeInfo () const
 
std::type_info const & valueTypeInfo () const
 
 ViewTypeChecker ()
 
virtual ~ViewTypeChecker ()
 

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 std::type_info const & memberTypeInfo_ () const
 
virtual bool mergeProduct_ (WrapperBase const *newProduct)
 
Wrapper< T > & operator= (Wrapper< T > const &)
 
virtual std::type_info const & valueTypeInfo_ () 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 42 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:81
template<typename T>
edm::Wrapper< T >::Wrapper ( std::unique_ptr< T ptr)
explicit

Definition at line 318 of file Wrapper.h.

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

318  :
319  WrapperBase(),
320  present(ptr.get() != 0),
321  obj() {
322  if (present) {
323  // The following will call swap if T has such a function,
324  // and use assignment if T has no such function.
326  DoSwap<T>,
327  DoAssign<T> >::type swap_or_assign;
328  swap_or_assign(obj, *ptr);
329  }
330  }
type
Definition: HCALResponse.h:21
bool present
Definition: Wrapper.h:81
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 333 of file Wrapper.h.

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

333  :
334  WrapperBase(),
335  present(ptr != 0),
336  obj() {
337  std::unique_ptr<T> temp(ptr);
338  if (present) {
339  // The following will call swap if T has such a function,
340  // and use assignment if T has no such function.
342  DoSwap<T>,
343  DoAssign<T> >::type swap_or_assign;
344  swap_or_assign(obj, *ptr);
345  }
346 
347  }
type
Definition: HCALResponse.h:21
bool present
Definition: Wrapper.h:81
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:81
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 171 of file Wrapper.h.

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

173  {
175  DoSetPtr<T>,
176  DoNotSetPtr<T> >::type maybe_filler;
177  maybe_filler(this->obj, iToType, iIndices, oPtr);
178  }
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 115 of file Wrapper.h.

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

117  {
119  DoFillView<T>,
120  DoNotFillView<T> >::type maybe_filler;
121  maybe_filler(obj, id, pointers, helpers);
122  }
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 161 of file Wrapper.h.

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

163  {
165  DoSetPtr<T>,
166  DoNotSetPtr<T> >::type maybe_filler;
167  maybe_filler(this->obj, iToType, iIndex, oPtr);
168  }
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 382 of file Wrapper.h.

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

382  {
384  DoHasIsProductEqual<T>,
385  DoNotHasIsProductEqual<T> >::type has_is_equal;
386  return has_is_equal(obj);
387  }
type
Definition: HCALResponse.h:21
template<typename T >
bool edm::Wrapper< T >::isMergeable_ ( ) const
privatevirtual

Reimplemented from edm::WrapperBase.

Definition at line 364 of file Wrapper.h.

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

364  {
366  IsMergeable<T>,
367  IsNotMergeable<T> >::type is_mergeable;
368  return is_mergeable(obj);
369  }
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:81
template<typename T >
bool edm::Wrapper< T >::isProductEqual_ ( WrapperBase const *  newProduct) const
privatevirtual

Reimplemented from edm::WrapperBase.

Definition at line 390 of file Wrapper.h.

References assert(), compareJSON::const, getGTfromDQMFile::obj, and relativeConstraints::value.

390  {
391  Wrapper<T> const* wrappedNewProduct = dynamic_cast<Wrapper<T> const*>(newProduct);
392  assert(wrappedNewProduct != nullptr);
394  DoIsProductEqual<T>,
395  DoNotIsProductEqual<T> >::type is_equal;
396  return is_equal(obj, wrappedNewProduct->obj);
397  }
type
Definition: HCALResponse.h:21
assert(m_qm.get())
string const
Definition: compareJSON.py:14
template<typename T >
std::type_info const & edm::Wrapper< T >::memberTypeInfo_ ( ) const
privatevirtual

Implements edm::ViewTypeChecker.

Definition at line 357 of file Wrapper.h.

357  {
358  return detail::getMemberType<T>()();
359  }
template<typename T >
bool edm::Wrapper< T >::mergeProduct_ ( WrapperBase const *  newProduct)
privatevirtual

Reimplemented from edm::WrapperBase.

Definition at line 372 of file Wrapper.h.

References assert(), compareJSON::const, getGTfromDQMFile::obj, and relativeConstraints::value.

372  {
373  Wrapper<T> const* wrappedNewProduct = dynamic_cast<Wrapper<T> const*>(newProduct);
374  assert(wrappedNewProduct != nullptr);
376  DoMergeProduct<T>,
377  DoNotMergeProduct<T> >::type merge_product;
378  return merge_product(obj, wrappedNewProduct->obj);
379  }
type
Definition: HCALResponse.h:21
assert(m_qm.get())
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 >
std::type_info const & edm::Wrapper< T >::valueTypeInfo_ ( ) const
privatevirtual

Implements edm::ViewTypeChecker.

Definition at line 352 of file Wrapper.h.

352  {
353  return detail::getValueType<T>()();
354  }
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