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>

Public Types

typedef T value_type
 
typedef T wrapped_type
 

Public Member Functions

std::type_info const & dynamicTypeInfo () const
 
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 * > &pointers, helper_vector_ptr &helpers) const
 
bool hasIsProductEqual () const
 
bool isMergeable () const
 
bool isPresent () const
 
bool isProductEqual (Wrapper< T > const *wrappedNewProduct) const
 
bool mergeProduct (Wrapper< T > const *wrappedNewProduct)
 
T const * operator-> () const
 
T const * product () const
 
void setPtr (std::type_info const &iToType, unsigned long iIndex, void const *&oPtr) const
 
 Wrapper ()
 
 Wrapper (std::auto_ptr< T > ptr)
 
 Wrapper (T *)
 
 ~Wrapper ()
 

Static Public Member Functions

static WrapperInterface< T >
const * 
getInterface ()
 
static std::type_info const & productTypeInfo ()
 
static std::type_info const & typeInfo ()
 

Private Member Functions

Wrapper< T > & operator= (Wrapper< T > const &)
 
 Wrapper (Wrapper< T > const &rh)
 

Private Attributes

T obj
 
bool present
 

Detailed Description

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

Definition at line 45 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 : present(false), obj() {}
bool present
Definition: Wrapper.h:81
template<typename T>
edm::Wrapper< T >::Wrapper ( std::auto_ptr< T ptr)
explicit

Definition at line 287 of file Wrapper.h.

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

287  :
288  present(ptr.get() != 0),
289  obj() {
290  if (present) {
291  // The following will call swap if T has such a function,
292  // and use assignment if T has no such function.
294  DoSwap<T>,
295  DoAssign<T> >::type swap_or_assign;
296  swap_or_assign(obj, *ptr);
297  }
298  }
type
Definition: HCALResponse.h:21
bool present
Definition: Wrapper.h:81
template<typename T>
edm::Wrapper< T >::~Wrapper ( )
inline

Definition at line 35 of file Wrapper.h.

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

Definition at line 301 of file Wrapper.h.

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

301  :
302  present(ptr != 0),
303  obj() {
304  std::auto_ptr<T> temp(ptr);
305  if (present) {
306  // The following will call swap if T has such a function,
307  // and use assignment if T has no such function.
309  DoSwap<T>,
310  DoAssign<T> >::type swap_or_assign;
311  swap_or_assign(obj, *ptr);
312  }
313 
314  }
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>
std::type_info const& edm::Wrapper< T >::dynamicTypeInfo ( ) const
inline

Definition at line 61 of file Wrapper.h.

61 {return dynamicTypeInfo_();}
std::type_info const & dynamicTypeInfo_() const
Definition: Wrapper.h:64
template<typename T>
std::type_info const& edm::Wrapper< T >::dynamicTypeInfo_ ( ) const
inline

Definition at line 64 of file Wrapper.h.

Referenced by edm::Wrapper< L1GctEmCandCollection >::dynamicTypeInfo().

64 {return typeid(T);}
long double T
template<typename T >
void edm::Wrapper< T >::fillPtrVector ( std::type_info const &  iToType,
std::vector< unsigned long > const &  iIndicies,
std::vector< void const * > &  oPtr 
) const

Definition at line 176 of file Wrapper.h.

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

178  {
180  DoSetPtr<T>,
181  DoNotSetPtr<T> >::type maybe_filler;
182  maybe_filler(this->obj, iToType, iIndices, oPtr);
183  }
type
Definition: HCALResponse.h:21
template<typename T >
void edm::Wrapper< T >::fillView ( ProductID const &  id,
std::vector< void const * > &  pointers,
helper_vector_ptr helpers 
) const
inline

Definition at line 115 of file Wrapper.h.

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

117  {
118  // This should never be called with non-empty arguments, or an
119  // invalid ID; any attempt to do so is an indication of a coding error.
120  assert(id.isValid());
121  assert(pointers.empty());
122  assert(helpers.get() == 0);
124  DoFillView<T>,
125  DoNotFillView<T> >::type maybe_filler;
126  maybe_filler(obj, id, pointers, helpers);
127  }
type
Definition: HCALResponse.h:21
template<typename T >
WrapperInterface< T > const * edm::Wrapper< T >::getInterface ( )
static

Definition at line 468 of file Wrapper.h.

References instance.

468  {
469  static const WrapperInterface<T> instance;
470  return &instance;
471  }
static PFTauRenderPlugin instance
template<typename T >
bool edm::Wrapper< T >::hasIsProductEqual ( ) const

Definition at line 334 of file Wrapper.h.

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

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

Definition at line 318 of file Wrapper.h.

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

318  {
320  IsMergeable<T>,
321  IsNotMergeable<T> >::type is_mergeable;
322  return is_mergeable(obj);
323  }
type
Definition: HCALResponse.h:21
template<typename T>
bool edm::Wrapper< T >::isPresent ( ) const
inline

Definition at line 63 of file Wrapper.h.

63 {return present;}
bool present
Definition: Wrapper.h:81
template<typename T>
bool edm::Wrapper< T >::isProductEqual ( Wrapper< T > const *  wrappedNewProduct) const

Definition at line 342 of file Wrapper.h.

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

342  {
344  DoIsProductEqual<T>,
345  DoNotIsProductEqual<T> >::type is_equal;
346  return is_equal(obj, wrappedNewProduct->obj);
347  }
type
Definition: HCALResponse.h:21
template<typename T>
bool edm::Wrapper< T >::mergeProduct ( Wrapper< T > const *  wrappedNewProduct)

Definition at line 326 of file Wrapper.h.

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

326  {
328  DoMergeProduct<T>,
329  DoNotMergeProduct<T> >::type merge_product;
330  return merge_product(obj, wrappedNewProduct->obj);
331  }
type
Definition: HCALResponse.h:21
template<typename T>
T const* edm::Wrapper< T >::operator-> ( ) const
inline

Definition at line 37 of file Wrapper.h.

37 {return product();}
T const * product() const
Definition: Wrapper.h:36
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 40 of file Wrapper.h.

40 { return typeid(T);}
long double T
template<typename T >
void edm::Wrapper< T >::setPtr ( std::type_info const &  iToType,
unsigned long  iIndex,
void const *&  oPtr 
) const
inline

Definition at line 166 of file Wrapper.h.

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

168  {
170  DoSetPtr<T>,
171  DoNotSetPtr<T> >::type maybe_filler;
172  maybe_filler(this->obj, iToType, iIndex, oPtr);
173  }
type
Definition: HCALResponse.h:21
template<typename T>
static std::type_info const& edm::Wrapper< T >::typeInfo ( )
inlinestatic

Member Data Documentation

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